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:
parent
0bcf84c984
commit
a092c0df01
@ -1,10 +1,27 @@
|
||||
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 " },
|
||||
{ "gc", desc = "> Comment: Line" },
|
||||
{ "gb", desc = "> Comment: Block " },
|
||||
{ "gbc", desc = "Comment: Toggle block comment" },
|
||||
{ "gcc", desc = "Comment: Toggle line comment" },
|
||||
{ "gcO", desc = "Comment: Add comment on line above" },
|
||||
|
@ -3,11 +3,11 @@ return {
|
||||
{
|
||||
"danymat/neogen",
|
||||
keys = {
|
||||
{ "<leader>ng", desc = "> Neogen" },
|
||||
{ "<leader>ngf", "<cmd>Neogen func<CR>", desc = "Neogen: Function Annotation" },
|
||||
{ "<leader>ng", desc = "> Neogen" },
|
||||
{ "<leader>ngf", "<cmd>Neogen func<CR>", desc = "Neogen: Function Annotation" },
|
||||
{ "<leader>ngc", "<cmd>Neogen class<CR>", desc = "Neogen: Class Annotation" },
|
||||
{ "<leader>ngt", "<cmd>Neogen type<CR>", desc = "Neogen: Type Annotation" },
|
||||
{ "<leader>ngb", "<cmd>Neogen file<CR>", desc = "Neogen: File Annotation" },
|
||||
{ "<leader>ngt", "<cmd>Neogen type<CR>", desc = "Neogen: Type Annotation" },
|
||||
{ "<leader>ngb", "<cmd>Neogen file<CR>", desc = "Neogen: File Annotation" },
|
||||
},
|
||||
cmd = {
|
||||
"Neogen",
|
||||
@ -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,
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user