diff --git a/.config/nvim/lua/core/keymaps.lua b/.config/nvim/lua/core/keymaps.lua index dec5e7c..d2be658 100644 --- a/.config/nvim/lua/core/keymaps.lua +++ b/.config/nvim/lua/core/keymaps.lua @@ -119,7 +119,12 @@ keymap( "Lspsaga diagnostic_jump_prev", vim.tbl_extend("force", opts, { desc = "Navigate to the previous diagnostic in the buffer" }) ) -keymap("n", "lr", "Lspsaga rename", vim.tbl_extend("force", opts, { desc = "Open a dialog to rename a code element" })) +keymap( + "n", + "lr", + "Lspsaga rename", + vim.tbl_extend("force", opts, { desc = "Open a dialog to rename a code element" }) +) keymap( "n", "lp", @@ -195,11 +200,7 @@ keymap( "x", "/", "lua require'Comment.api'.toggle.linewise(vim.fn.visualmode())", - vim.tbl_extend( - "force", - opts, - { desc = "Comment/Uncomment code lines on visual block mode" } - ) + vim.tbl_extend("force", opts, { desc = "Comment/Uncomment code lines on visual block mode" }) ) -- Gitdiff diff --git a/.config/nvim/lua/plugins/autopairs.lua b/.config/nvim/lua/plugins/autopairs.lua index d9e5042..16d0d13 100644 --- a/.config/nvim/lua/plugins/autopairs.lua +++ b/.config/nvim/lua/plugins/autopairs.lua @@ -1,4 +1,3 @@ --- Setup nvim-cmp. require("nvim-autopairs").setup({ check_ts = true, disable_filetype = { "TelescopePrompt", "neo-tree" }, diff --git a/.config/nvim/lua/plugins/comment.lua b/.config/nvim/lua/plugins/comment.lua index 5e62812..8d24574 100644 --- a/.config/nvim/lua/plugins/comment.lua +++ b/.config/nvim/lua/plugins/comment.lua @@ -1 +1,9 @@ -require("Comment").setup({}) +require("ts_context_commentstring").setup({ + enable_autocmd = false, +}) + +require("Comment").setup({ + pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), +}) + +vim.g.skip_ts_context_commentstring_module = true diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index 1141255..fdfc58a 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -22,8 +22,4 @@ require("nvim-treesitter.configs").setup({ enable = true, disable = { "python", "css" }, }, - context_commentstring = { - enable = true, - enable_autocmd = false, - }, })