🐛 fix(nvim): check if cinnamon plugin is loaded before overwriting movement keys

This commit is contained in:
Sergio Laín 2023-11-17 00:42:27 +01:00
parent 21de798f62
commit 0006a7d21c
No known key found for this signature in database
GPG key ID: 14C9B8080681777B

View file

@ -59,6 +59,7 @@ map("x", "g/", "<esc>/\\%V", { silent = false, desc = "Search inside visual sele
map("x", "*", [[y/\V<C-R>=escape(@", '/\')<CR><CR>]]) map("x", "*", [[y/\V<C-R>=escape(@", '/\')<CR><CR>]])
map("x", "#", [[y?\V<C-R>=escape(@", '?\')<CR><CR>]]) map("x", "#", [[y?\V<C-R>=escape(@", '?\')<CR><CR>]])
if package.loaded["cinnamon"] then
-- DEFAULT_KEYMAPS: -- DEFAULT_KEYMAPS:
-- Half-window movements: -- Half-window movements:
@ -139,3 +140,4 @@ map("n", "gd", "<Cmd>lua Scroll('definition')<CR>")
-- LSP go-to-declaration: -- LSP go-to-declaration:
map("n", "gD", "<Cmd>lua Scroll('declaration')<CR>") map("n", "gD", "<Cmd>lua Scroll('declaration')<CR>")
end