vim-settings/neovim/lua/plugins/treesitter.lua

50 lines
919 B
Lua
Raw Normal View History

-- Configures nvim-treesitter
local M = {}
2023-06-01 23:52:12 +00:00
M.ensure_installed = {
"bash",
"css",
2022-01-13 20:50:59 +00:00
"dockerfile",
"fish",
"go",
"gomod",
2022-01-13 20:50:59 +00:00
"html",
"java",
"javascript",
"json",
2022-01-13 20:50:59 +00:00
"kotlin",
"lua",
2022-01-13 20:50:59 +00:00
"make",
2023-06-27 23:29:21 +00:00
"markdown",
2023-11-15 17:53:28 +00:00
"markdown_inline",
"python",
"rust",
2022-01-13 20:50:59 +00:00
"scala",
"toml",
"typescript",
"vim",
2024-07-19 19:37:12 +00:00
"vimdoc",
"yaml",
}
function M.bootstrap()
2023-06-01 23:52:12 +00:00
require("nvim-treesitter.install").ensure_installed_sync(M.ensure_installed)
end
function M.setup()
require("nvim-treesitter.configs").setup({
incremental_selection = { enable = true },
-- Indent appears to be broken right now
indent = { enable = false },
textobjects = { enable = true },
highlight = {
enable = true,
disable = {},
},
2023-06-01 23:52:12 +00:00
ensure_installed = M.ensure_installed,
2024-07-18 21:02:43 +00:00
auto_install = false,
})
end
return M