summaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/treesitter.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua/plugins/treesitter.lua')
-rw-r--r--nvim/lua/plugins/treesitter.lua111
1 files changed, 65 insertions, 46 deletions
diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua
index 623e808..f6127d7 100644
--- a/nvim/lua/plugins/treesitter.lua
+++ b/nvim/lua/plugins/treesitter.lua
@@ -1,47 +1,66 @@
-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",
+return {
+ "nvim-treesitter/nvim-treesitter",
+ build = ":TSUpdate",
+ opts = {
+ 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" },
+ indent = { enable = true },
+ auto_install = true,
+ sync_install = false,
+ textobjects = { select = { enable = true, lookahead = true } },
},
- ignore_install = { "gdhsader", "phpdoc" },
-})
+ dependencies = {
+ { "nvim-treesitter/nvim-treesitter-textobjects" },
+ {
+ "nvim-treesitter/nvim-treesitter-context",
+ opts = {
+ enable = true,
+ mode = "topline",
+ line_numbers = true,
+ },
+ },
+ },
+}