Skip to content

Commit 8d6a576

Browse files
committed
refactor(nvim): tweak tree-sitter text object mappings
1 parent c96d133 commit 8d6a576

File tree

1 file changed

+9
-29
lines changed

1 file changed

+9
-29
lines changed

.config/nvim/lua/specs/treesitter.lua

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ Plugin.opts = {
9999
['i,'] = '@assignment.lhs',
100100
['i.'] = '@assignment.rhs',
101101

102+
['ar'] = '@attribute.outer',
103+
['ir'] = '@attribute.inner',
104+
102105
['a;'] = '@block.outer',
103106
['i;'] = '@block.inner',
104107

@@ -116,62 +119,39 @@ Plugin.opts = {
116119

117120
['aa'] = '@parameter.outer',
118121
['ia'] = '@parameter.inner',
119-
120-
['at'] = '@tag.outer',
121-
['it'] = '@tag.inner',
122122
},
123123
},
124124
swap = {
125125
enable = true,
126126
swap_next = {
127-
['g>'] = '@parameter.inner',
127+
['g>a'] = '@parameter.inner',
128+
['g>r'] = '@attribute.outer',
129+
['g>f'] = '@function.outer',
128130
},
129131
swap_previous = {
130-
['g<'] = '@parameter.inner',
132+
['g<a'] = '@parameter.inner',
133+
['g<r'] = '@attribute.outer',
134+
['g<f'] = '@function.outer',
131135
},
132136
},
133137
move = {
134138
enable = true,
135139
set_jumps = true,
136140
goto_next_start = {
137-
[']x'] = '@parameter.outer',
138-
[']i'] = '@import.outer',
139141
[']f'] = '@function.outer',
140142
[']c'] = '@class.outer',
141-
[']s'] = '@assignment.outer',
142-
[']z'] = '@comment.outer',
143143
},
144144
goto_next_end = {
145-
[']X'] = '@parameter.outer',
146-
[']I'] = '@import.outer',
147145
[']F'] = '@function.outer',
148146
[']C'] = '@class.outer',
149-
[']S'] = '@assignment.outer',
150-
[']Z'] = '@comment.outer',
151147
},
152148
goto_previous_start = {
153-
['[x'] = '@parameter.outer',
154-
['[i'] = '@import.outer',
155149
['[f'] = '@function.outer',
156150
['[c'] = '@class.outer',
157-
['[s'] = '@assignment.outer',
158-
['[z'] = '@comment.outer',
159151
},
160152
goto_previous_end = {
161-
['[X'] = '@parameter.outer',
162-
['[I'] = '@import.outer',
163153
['[F'] = '@function.outer',
164154
['[C'] = '@class.outer',
165-
['[S'] = '@assignment.outer',
166-
['[Z'] = '@comment.outer',
167-
},
168-
},
169-
lsp_interop = {
170-
enable = true,
171-
border = 'none',
172-
floating_preview_opts = {},
173-
peek_definition_code = {
174-
['gK'] = '@function.outer',
175155
},
176156
},
177157
},

0 commit comments

Comments
 (0)