summaryrefslogtreecommitdiff
path: root/nvim/lua
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua')
-rw-r--r--nvim/lua/autocommands.lua3
-rw-r--r--nvim/lua/plugins/treesitter.lua52
2 files changed, 48 insertions, 7 deletions
diff --git a/nvim/lua/autocommands.lua b/nvim/lua/autocommands.lua
index efdace8..4a565db 100644
--- a/nvim/lua/autocommands.lua
+++ b/nvim/lua/autocommands.lua
@@ -67,14 +67,13 @@ vim.api.nvim_create_autocmd("BufWinEnter", {
end,
})
-local treeapi = require("nvim-tree.api")
-
vim.api.nvim_create_autocmd("BufEnter", {
callback = function()
if vim.bo.filetype == "NvimTree" or vim.fn.expand("%") == "" then
return
end
vim.schedule(function()
+ local treeapi = require("nvim-tree.api")
treeapi.tree.find_file({
update_root = false,
focus = false,
diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua
index ff02ec4..623e808 100644
--- a/nvim/lua/plugins/treesitter.lua
+++ b/nvim/lua/plugins/treesitter.lua
@@ -1,5 +1,47 @@
-require('nvim-treesitter.configs').setup{
- ensure_installed = 'all',
- ignore_install = { 'phpdoc' },
- highlight = { enable = true }
-}
+require("nvim-treesitter.configs").setup({
+ highlight = { enable = true },
+ ensure_installed = {
+ "c",
+ "lua",
+ "python",
+ "bash",
+ "go",
+ "html",
+ "css",
+ "javascript",
+ "typescript",
+ "git_config",
+ "git_rebase",
+ "gitattributes",
+ "gitcommit",
+ "gitignore",
+ "gomod",
+ "gosum",
+ "gotmpl",
+ "gowork",
+ "hjson",
+ "ini",
+ "json",
+ "json5",
+ "jsonnet",
+ "latex",
+ "make",
+ "markdown",
+ "markdown_inline",
+ "nginx",
+ "proto",
+ "rust",
+ "templ",
+ "todotxt",
+ "toml",
+ "tsx",
+ "typescript",
+ "vim",
+ "vimdoc",
+ "xml",
+ "yaml",
+ "sql",
+ "ssh_config",
+ },
+ ignore_install = { "gdhsader", "phpdoc" },
+})