1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
return {
{
"aaronik/treewalker.nvim",
keys = {
{
"<a-k>",
"<cmd>Treewalker Up<cr>",
{ "n", "v" },
silent = true,
desc = "Moves up to the previous neighbor node",
},
{
"<a-j>",
"<cmd>Treewalker Down<cr>",
{ "n", "v" },
silent = true,
desc = "Moves up to the next neighbor node",
},
{
"<a-h>",
"<cmd>Treewalker Left<cr>",
{ "n", "v" },
silent = true,
desc = "Moves to the first ancestor node that's on a different line from the current node",
},
{
"<a-l>",
"<cmd>Treewalker Right<cr>",
{ "n", "v" },
silent = true,
desc = "Moves to the next node down that's indented further than the current node",
},
{
"<cmd>Treewalker SwapUp<cr>",
"<s-a-k>",
silent = true,
desc = "Swaps the highest node on the line upwards in the document",
},
{
"<s-a-j>",
"<cmd>Treewalker SwapDown<cr>",
silent = true,
desc = "Swaps the biggest node on the line downward in the document",
},
{
"<s-a-h>",
"<cmd>Treewalker SwapLeft<cr>",
silent = true,
desc = "Swap the node under the cursor with its previous neighbor",
},
{
"<s-a-l>",
"<cmd>Treewalker SwapRight<cr>",
silent = true,
desc = "Swap the node under the cursor with its next neighbor",
},
},
opts = {},
},
{
"nvim-treesitter/nvim-treesitter",
branch = "main",
lazy = false,
dependencies = {
-- "theHamsta/nvim-treesitter-pairs", -- Reneable once main branch is supported
{
"LiadOz/nvim-dap-repl-highlights",
opts = {},
},
},
build = ":TSUpdate",
config = function()
require("nvim-treesitter").install({
"awk",
"bash",
"c",
"cmake",
"comment",
"cpp",
"css",
"csv",
"diff",
"dockerfile",
"dap_repl",
"doxygen",
"editorconfig",
"fortran",
"git_config",
"git_rebase",
"gitattributes",
"gitcommit",
"gitignore",
"groovy",
"gpg",
"hlsplaylist",
"html",
"http",
"ini",
"javascript",
"jq",
"jsdoc",
"json",
"jsonc",
"just",
"llvm",
"lua",
"luadoc",
"luap",
"make",
"markdown",
"markdown_inline",
"query",
"passwd",
"printf",
"python",
"regex",
"readline",
"requirements",
"rust",
"sql",
"ssh_config",
"strace",
"sxhkdrc",
"tablegen",
"tmux",
"todotxt",
"toml",
"typescript",
"vim",
"vimdoc",
"xcompose",
"xml",
"xresources",
"yaml",
})
end,
},
"RRethy/nvim-treesitter-endwise",
{ "nvim-treesitter/nvim-treesitter-context", opts = {} },
{
"JoosepAlviste/nvim-ts-context-commentstring",
config = function()
require("ts_context_commentstring").setup({
enable_autocmd = false,
})
local get_option = vim.filetype.get_option
vim.filetype.get_option = function(filetype, option)
return option == "commentstring"
and require("ts_context_commentstring.internal").calculate_commentstring()
or get_option(filetype, option)
end
end,
},
}
|