Skip to content

Commit

Permalink
refactor(keymaps): move img-clip plugin keymap to plugin config
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbuhr committed Apr 4, 2024
1 parent f0035f0 commit 6464e7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion lua/config/keymap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ wk.register({
},
i = {
name = '[i]nsert',
i = { ':PasteImage<cr>', '[i]mage from clipboard' },
},
l = {
name = '[l]anguage/lsp',
Expand Down
5 changes: 5 additions & 0 deletions lua/plugins/quarto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ return {
{
'HakonHarnes/img-clip.nvim',
event = 'BufEnter',
ft = { 'markdown', 'quarto', 'latex' },
opts = {
filetypes = {
markdown = {
Expand All @@ -653,6 +654,10 @@ return {
},
},
},
config = function(_, opts)
require('img-clip').setup(opts)
vim.keymap.set('n', '<leader>ii', ':PasteImage<cr>', { desc = 'insert [i]mage from clipboard' })
end,
},

-- preview equations
Expand Down

0 comments on commit 6464e7f

Please sign in to comment.