perf(comments): vim.schedule
ts-context-commentstring integration
This commit is contained in:
@ -190,11 +190,13 @@ return {
|
||||
},
|
||||
init = function()
|
||||
if vim.fn.has("nvim-0.10") == 1 then
|
||||
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
|
||||
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,
|
||||
},
|
||||
|
Reference in New Issue
Block a user