feat(comments): use ts-comments.nvim instead of nvim-ts-context-commentstring on Neovim 0.10
This commit is contained in:
@ -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",
|
||||
|
Reference in New Issue
Block a user