Nvim: add type annotations to plugin opts
This commit is contained in:
parent
26d0dae2fc
commit
b5498c671d
9 changed files with 50 additions and 58 deletions
|
@ -3,50 +3,46 @@ return {
|
|||
build = function()
|
||||
require("nvim-treesitter.install").update({ with_sync = true })
|
||||
end,
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"css",
|
||||
"dockerfile",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"html",
|
||||
"http",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"json5",
|
||||
"latex",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"php",
|
||||
"python",
|
||||
"rasi",
|
||||
"regex",
|
||||
"rst",
|
||||
"scss",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = { enable = true },
|
||||
context_commentstring = { enable = true },
|
||||
sync_install = true,
|
||||
ignore_install = {},
|
||||
auto_install = true,
|
||||
})
|
||||
|
||||
-- vim.wo.foldmethod = 'expr'
|
||||
-- im.wo.foldexpr = 'nvim_treesitter#foldexpr()'
|
||||
end,
|
||||
---@type TSConfig
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"css",
|
||||
"dockerfile",
|
||||
"git_config",
|
||||
"git_rebase",
|
||||
"gitattributes",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"html",
|
||||
"http",
|
||||
"java",
|
||||
"javascript",
|
||||
"json",
|
||||
"json5",
|
||||
"latex",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"php",
|
||||
"python",
|
||||
"rasi",
|
||||
"regex",
|
||||
"rst",
|
||||
"scss",
|
||||
"toml",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
incremental_selection = { enable = true },
|
||||
context_commentstring = { enable = true },
|
||||
sync_install = true,
|
||||
ignore_install = {},
|
||||
auto_install = true,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue