summaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/treesitter.lua
diff options
context:
space:
mode:
author2025-05-13 10:07:17 +0300
committer2025-05-13 10:07:17 +0300
commite9a2f811b7d030cb8701bd8459fd5c842a521eff (patch)
tree2c59e183408f6d814bdb32453cae84f03f8bf88b /nvim/lua/plugins/treesitter.lua
parentПоправил тему zsh (diff)
downloaddotfiles-e9a2f811b7d030cb8701bd8459fd5c842a521eff.tar.gz
dotfiles-e9a2f811b7d030cb8701bd8459fd5c842a521eff.tar.bz2
dotfiles-e9a2f811b7d030cb8701bd8459fd5c842a521eff.tar.xz
dotfiles-e9a2f811b7d030cb8701bd8459fd5c842a521eff.zip
Правки nvim конфига
Diffstat (limited to 'nvim/lua/plugins/treesitter.lua')
-rw-r--r--nvim/lua/plugins/treesitter.lua77
1 files changed, 32 insertions, 45 deletions
diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua
index f6127d7..08d05e9 100644
--- a/nvim/lua/plugins/treesitter.lua
+++ b/nvim/lua/plugins/treesitter.lua
@@ -2,56 +2,42 @@ 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",
+ highlight = {
+ enable = true,
+ additional_vim_regex_highlighting = false,
},
+ ensure_installed = "all",
ignore_install = { "gdhsader", "phpdoc" },
indent = { enable = true },
auto_install = true,
- sync_install = false,
- textobjects = { select = { enable = true, lookahead = true } },
+ sync_install = true,
+ incremental_selection = {
+ enable = true,
+ keymaps = {
+ init_selection = "<C-space>",
+ node_incremental = "<C-space>",
+ scope_incremental = false,
+ node_decremental = "<bs>",
+ },
+ },
+ textobjects = {
+ select = { enable = true, lookahead = true },
+ move = {
+ enable = true,
+ goto_next_start = { ["]f"] = "@function.outer", ["]c"] = "@class.outer", ["]a"] = "@parameter.inner" },
+ goto_next_end = { ["]F"] = "@function.outer", ["]C"] = "@class.outer", ["]A"] = "@parameter.inner" },
+ goto_previous_start = {
+ ["[f"] = "@function.outer",
+ ["[c"] = "@class.outer",
+ ["[a"] = "@parameter.inner",
+ },
+ goto_previous_end = { ["[F"] = "@function.outer", ["[C"] = "@class.outer", ["[A"] = "@parameter.inner" },
+ },
+ },
},
+ build = function()
+ require("nvim-treesitter.install").update({ with_sync = true })()
+ end,
dependencies = {
{ "nvim-treesitter/nvim-treesitter-textobjects" },
{
@@ -62,5 +48,6 @@ return {
line_numbers = true,
},
},
+ { "windwp/nvim-ts-autotag" },
},
}