feat(comments): use ts-comments.nvim instead of nvim-ts-context-commentstring on Neovim 0.10

This commit is contained in:
Folke Lemaitre
2024-05-21 19:31:40 +02:00
parent 55b07dee21
commit 8ba7c64a7d
2 changed files with 11 additions and 16 deletions

View File

@ -156,22 +156,10 @@ return {
-- comments
{
"JoosepAlviste/nvim-ts-context-commentstring",
lazy = true,
opts = {
enable_autocmd = false,
},
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,
"folke/ts-comments.nvim",
event = "VeryLazy",
opts = {},
enabled = vim.fn.has("nvim-0.10") == 1,
},
{
import = "lazyvim.plugins.extras.coding.mini-comment",