16 lines
459 B
Lua
16 lines
459 B
Lua
|
|
return {
|
||
|
|
"JoosepAlviste/nvim-ts-context-commentstring",
|
||
|
|
event = { "BufReadPre", "BufNewFile" },
|
||
|
|
config = function()
|
||
|
|
require("ts_context_commentstring").setup({
|
||
|
|
enable_autocmd = false,
|
||
|
|
})
|
||
|
|
|
||
|
|
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,
|
||
|
|
}
|