@@ -336,7 +336,7 @@ require('nvim-treesitter.configs').setup {
336
336
ensure_installed = { ' c' , ' cpp' , ' go' , ' lua' , ' java' , ' json' , ' yaml' , ' python' , ' rust' , ' tsx' , ' javascript' , ' typescript' , ' vimdoc' , ' vim' },
337
337
338
338
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
339
- auto_install = true ,
339
+ auto_install = false ,
340
340
341
341
highlight = { enable = true },
342
342
indent = { enable = true },
@@ -352,48 +352,59 @@ require('nvim-treesitter.configs').setup {
352
352
textobjects = {
353
353
select = {
354
354
enable = true ,
355
- lookahead = true , -- Automatically jump forward to textobj, similar to targets.vim
356
355
keymaps = {
357
- -- You can use the capture groups defined in textobjects.scm
358
- [' aa' ] = ' @parameter.outer' ,
359
- [' ia' ] = ' @parameter.inner' ,
360
- [' af' ] = ' @function.outer' ,
361
- [' if' ] = ' @function.inner' ,
362
- [' ac' ] = ' @class.outer' ,
363
- [' ic' ] = ' @class.inner' ,
356
+ init_selection = ' <c-space>' ,
357
+ node_incremental = ' <c-space>' ,
358
+ scope_incremental = ' <c-s>' ,
359
+ node_decremental = ' <M-space>' ,
364
360
},
365
361
},
366
- move = {
367
- enable = true ,
368
- set_jumps = true , -- whether to set jumps in the jumplist
369
- goto_next_start = {
370
- [' ]m' ] = ' @function.outer' ,
371
- [' ]]' ] = ' @class.outer' ,
372
- },
373
- goto_next_end = {
374
- [' ]M' ] = ' @function.outer' ,
375
- [' ][' ] = ' @class.outer' ,
362
+ textobjects = {
363
+ select = {
364
+ enable = true ,
365
+ lookahead = true , -- Automatically jump forward to textobj, similar to targets.vim
366
+ keymaps = {
367
+ -- You can use the capture groups defined in textobjects.scm
368
+ [' aa' ] = ' @parameter.outer' ,
369
+ [' ia' ] = ' @parameter.inner' ,
370
+ [' af' ] = ' @function.outer' ,
371
+ [' if' ] = ' @function.inner' ,
372
+ [' ac' ] = ' @class.outer' ,
373
+ [' ic' ] = ' @class.inner' ,
374
+ },
376
375
},
377
- goto_previous_start = {
378
- [' [m' ] = ' @function.outer' ,
379
- [' [[' ] = ' @class.outer' ,
376
+ move = {
377
+ enable = true ,
378
+ set_jumps = true , -- whether to set jumps in the jumplist
379
+ goto_next_start = {
380
+ [' ]m' ] = ' @function.outer' ,
381
+ [' ]]' ] = ' @class.outer' ,
382
+ },
383
+ goto_next_end = {
384
+ [' ]M' ] = ' @function.outer' ,
385
+ [' ][' ] = ' @class.outer' ,
386
+ },
387
+ goto_previous_start = {
388
+ [' [m' ] = ' @function.outer' ,
389
+ [' [[' ] = ' @class.outer' ,
390
+ },
391
+ goto_previous_end = {
392
+ [' [M' ] = ' @function.outer' ,
393
+ [' []' ] = ' @class.outer' ,
394
+ },
380
395
},
381
- goto_previous_end = {
382
- [' [M' ] = ' @function.outer' ,
383
- [' []' ] = ' @class.outer' ,
396
+ swap = {
397
+ enable = true ,
398
+ swap_next = {
399
+ [' <leader>a' ] = ' @parameter.inner' ,
400
+ },
401
+ swap_previous = {
402
+ [' <leader>A' ] = ' @parameter.inner' ,
403
+ },
384
404
},
385
405
},
386
- swap = {
387
- enable = true ,
388
- swap_next = {
389
- [' <leader>a' ] = ' @parameter.inner' ,
390
- },
391
- swap_previous = {
392
- [' <leader>A' ] = ' @parameter.inner' ,
393
- },
394
- },
395
- },
396
- }
406
+ }
407
+ end , 0 )
397
408
398
409
-- Diagnostic keymaps
399
410
vim .keymap .set (' n' , ' [d' , vim .diagnostic .goto_prev , { desc = ' Go to previous diagnostic message' })
0 commit comments