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 {
|
return {
|
||||||
{
|
{
|
||||||
"numToStr/Comment.nvim",
|
"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 = {
|
keys = {
|
||||||
{ "gc", desc = "> Comment: Line" },
|
{ "gc", desc = "> Comment: Line" },
|
||||||
{ "gb", desc = "> Comment: Block " },
|
{ "gb", desc = "> Comment: Block " },
|
||||||
{ "gbc", desc = "Comment: Toggle block comment" },
|
{ "gbc", desc = "Comment: Toggle block comment" },
|
||||||
{ "gcc", desc = "Comment: Toggle line comment" },
|
{ "gcc", desc = "Comment: Toggle line comment" },
|
||||||
{ "gcO", desc = "Comment: Add comment on line above" },
|
{ "gcO", desc = "Comment: Add comment on line above" },
|
||||||
|
@ -3,11 +3,11 @@ return {
|
|||||||
{
|
{
|
||||||
"danymat/neogen",
|
"danymat/neogen",
|
||||||
keys = {
|
keys = {
|
||||||
{ "<leader>ng", desc = "> Neogen" },
|
{ "<leader>ng", desc = "> Neogen" },
|
||||||
{ "<leader>ngf", "<cmd>Neogen func<CR>", desc = "Neogen: Function Annotation" },
|
{ "<leader>ngf", "<cmd>Neogen func<CR>", desc = "Neogen: Function Annotation" },
|
||||||
{ "<leader>ngc", "<cmd>Neogen class<CR>", desc = "Neogen: Class Annotation" },
|
{ "<leader>ngc", "<cmd>Neogen class<CR>", desc = "Neogen: Class Annotation" },
|
||||||
{ "<leader>ngt", "<cmd>Neogen type<CR>", desc = "Neogen: Type Annotation" },
|
{ "<leader>ngt", "<cmd>Neogen type<CR>", desc = "Neogen: Type Annotation" },
|
||||||
{ "<leader>ngb", "<cmd>Neogen file<CR>", desc = "Neogen: File Annotation" },
|
{ "<leader>ngb", "<cmd>Neogen file<CR>", desc = "Neogen: File Annotation" },
|
||||||
},
|
},
|
||||||
cmd = {
|
cmd = {
|
||||||
"Neogen",
|
"Neogen",
|
||||||
@ -122,13 +122,11 @@ return {
|
|||||||
"pfeiferj/nvim-hurl",
|
"pfeiferj/nvim-hurl",
|
||||||
config = true,
|
config = true,
|
||||||
},
|
},
|
||||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
"RRethy/nvim-treesitter-endwise",
|
"RRethy/nvim-treesitter-endwise",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup({
|
||||||
parser_install_dir = treesitter_dir,
|
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
ignore_install = { "comment" },
|
ignore_install = { "comment" },
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
@ -176,9 +174,6 @@ return {
|
|||||||
query_linter = {
|
query_linter = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
context_commentstring = {
|
|
||||||
enable = true,
|
|
||||||
},
|
|
||||||
endwise = {
|
endwise = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user