mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +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
|
||||
{
|
||||
"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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue