mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-03 22:14:39 +02:00
feat(comments): use ts-comments.nvim instead of nvim-ts-context-commentstring on Neovim 0.10
This commit is contained in:
parent
55b07dee21
commit
8ba7c64a7d
2 changed files with 11 additions and 16 deletions
|
@ -156,22 +156,10 @@ return {
|
||||||
|
|
||||||
-- comments
|
-- comments
|
||||||
{
|
{
|
||||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
"folke/ts-comments.nvim",
|
||||||
lazy = true,
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {},
|
||||||
enable_autocmd = false,
|
enabled = vim.fn.has("nvim-0.10") == 1,
|
||||||
},
|
|
||||||
init = function()
|
|
||||||
if vim.fn.has("nvim-0.10") == 1 then
|
|
||||||
vim.schedule(function()
|
|
||||||
local get_option = vim.filetype.get_option
|
|
||||||
vim.filetype.get_option = function(filetype, option)
|
|
||||||
return option == "commentstring" and require("ts_context_commentstring.internal").calculate_commentstring()
|
|
||||||
or get_option(filetype, option)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
import = "lazyvim.plugins.extras.coding.mini-comment",
|
import = "lazyvim.plugins.extras.coding.mini-comment",
|
||||||
|
|
|
@ -10,4 +10,11 @@ return {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||||
|
lazy = true,
|
||||||
|
opts = {
|
||||||
|
enable_autocmd = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue