mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 10:48:45 +02:00
perf(comments): vim.schedule
ts-context-commentstring integration
This commit is contained in:
parent
1d23c98da1
commit
c653c4a9a5
1 changed files with 7 additions and 5 deletions
|
@ -190,11 +190,13 @@ return {
|
||||||
},
|
},
|
||||||
init = function()
|
init = function()
|
||||||
if vim.fn.has("nvim-0.10") == 1 then
|
if vim.fn.has("nvim-0.10") == 1 then
|
||||||
|
vim.schedule(function()
|
||||||
local get_option = vim.filetype.get_option
|
local get_option = vim.filetype.get_option
|
||||||
vim.filetype.get_option = function(filetype, option)
|
vim.filetype.get_option = function(filetype, option)
|
||||||
return option == "commentstring" and require("ts_context_commentstring.internal").calculate_commentstring()
|
return option == "commentstring" and require("ts_context_commentstring.internal").calculate_commentstring()
|
||||||
or get_option(filetype, option)
|
or get_option(filetype, option)
|
||||||
end
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue