mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-22 00:49:01 +02:00
fix: contex-ts-commentstring with comment.nvim integration
This commit is contained in:
parent
6274a2af41
commit
aeb724aa07
2 changed files with 31 additions and 25 deletions
|
@ -182,12 +182,17 @@ return {
|
|||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
lazy = true,
|
||||
event = "InsertEnter",
|
||||
event = "BufWinEnter",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("ts_context_commentstring").setup({
|
||||
enable_autocmd = false,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "InsertEnter",
|
||||
event = "BufWinEnter",
|
||||
config = function()
|
||||
require("user.comment")
|
||||
end,
|
||||
|
@ -248,7 +253,7 @@ return {
|
|||
-- for auto close tag
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
event = "InsertEnter",
|
||||
event = "BufWinEnter",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("nvim-ts-autotag").setup()
|
||||
|
|
|
@ -4,8 +4,9 @@ if not status_ok then
|
|||
end
|
||||
|
||||
comment.setup({
|
||||
pre_hook = function(ctx)
|
||||
local U = require("Comment.utils")
|
||||
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
|
||||
-- pre_hook = function(ctx)
|
||||
-- local U = require("Comment.utils")
|
||||
--
|
||||
-- local status_utils_ok, utils = pcall(require, "ts_context_commentstring.utils")
|
||||
-- if not status_utils_ok then
|
||||
|
@ -28,5 +29,5 @@ comment.setup({
|
|||
-- key = ctx.ctype == U.ctype.line and "__default" or "__multiline",
|
||||
-- location = location,
|
||||
-- })
|
||||
end,
|
||||
-- end,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue