refactor(nvim): use newer method of setting up ts-context-commentstring

Had a deprecation on old usage as ts module
This commit is contained in:
Price Hiller 2023-11-18 17:36:41 -06:00
parent 0bcf84c984
commit a092c0df01
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
2 changed files with 24 additions and 12 deletions

View File

@ -1,7 +1,24 @@
return {
{
"numToStr/Comment.nvim",
config = true,
config = function()
require("Comment").setup({
pre_hook = require('ts_context_commentstring.integrations.comment_nvim').create_pre_hook(),
})
end,
dependencies = {
{
"JoosepAlviste/nvim-ts-context-commentstring",
opts = function()
vim.g.skip_ts_context_commentstring_module = true
end,
config = function()
require('ts_context_commentstring').setup({
enable_autocmd = false
})
end
},
},
keys = {
{ "gc", desc = "> Comment: Line" },
{ "gb", desc = "> Comment: Block " },

View File

@ -122,13 +122,11 @@ return {
"pfeiferj/nvim-hurl",
config = true,
},
"JoosepAlviste/nvim-ts-context-commentstring",
"nvim-treesitter/nvim-treesitter-textobjects",
"RRethy/nvim-treesitter-endwise",
},
config = function()
require("nvim-treesitter.configs").setup({
parser_install_dir = treesitter_dir,
auto_install = true,
ignore_install = { "comment" },
incremental_selection = {
@ -176,9 +174,6 @@ return {
query_linter = {
enable = true,
},
context_commentstring = {
enable = true,
},
endwise = {
enable = true,
},