2021-08-25 23:21:50 +00:00
|
|
|
-- Configures nvim-treesitter
|
2022-01-03 06:06:47 +00:00
|
|
|
local M = {}
|
|
|
|
|
|
|
|
local ensure_installed = {
|
|
|
|
"bash",
|
|
|
|
"css",
|
2022-01-13 20:50:59 +00:00
|
|
|
"dockerfile",
|
2022-01-03 06:06:47 +00:00
|
|
|
"fish",
|
|
|
|
"go",
|
|
|
|
"gomod",
|
2022-01-13 20:50:59 +00:00
|
|
|
"html",
|
|
|
|
"java",
|
2022-01-03 06:06:47 +00:00
|
|
|
"javascript",
|
|
|
|
"json",
|
2022-01-13 20:50:59 +00:00
|
|
|
"kotlin",
|
2022-01-03 06:06:47 +00:00
|
|
|
"lua",
|
2022-01-13 20:50:59 +00:00
|
|
|
"make",
|
2022-01-03 06:06:47 +00:00
|
|
|
"python",
|
|
|
|
"rust",
|
2022-01-13 20:50:59 +00:00
|
|
|
"scala",
|
|
|
|
"toml",
|
|
|
|
"typescript",
|
|
|
|
"vim",
|
2022-01-03 06:06:47 +00:00
|
|
|
"yaml",
|
|
|
|
}
|
|
|
|
|
|
|
|
function M.bootstrap()
|
|
|
|
require("nvim-treesitter.install").ensure_installed_sync(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 = {},
|
|
|
|
},
|
|
|
|
ensure_installed = ensure_installed,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|