@@ -61,8 +61,83 @@ require 'keymaps'
61
61
require ' telescope-setup'
62
62
63
63
-- [[ Configure Treesitter ]]
64
+ <<<<<<< HEAD
64
65
-- (syntax parser for highlighting)
65
66
require ' treesitter-setup'
67
+ =======
68
+ -- See `:help nvim-treesitter`
69
+ -- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}'
70
+ vim .defer_fn (function ()
71
+ require (' nvim-treesitter.configs' ).setup {
72
+ -- Add languages to be installed here that you want installed for treesitter
73
+ ensure_installed = { ' c' , ' cpp' , ' go' , ' lua' , ' python' , ' rust' , ' tsx' , ' javascript' , ' typescript' , ' vimdoc' , ' vim' , ' bash' },
74
+
75
+ -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
76
+ auto_install = false ,
77
+ -- Install languages synchronously (only applied to `ensure_installed`)
78
+ sync_install = false ,
79
+ -- List of parsers to ignore installing
80
+ ignore_install = {},
81
+ -- You can specify additional Treesitter modules here: -- For example: -- playground = {--enable = true,-- },
82
+ modules = {},
83
+ highlight = { enable = true },
84
+ indent = { enable = true },
85
+ incremental_selection = {
86
+ enable = true ,
87
+ keymaps = {
88
+ init_selection = ' <c-space>' ,
89
+ node_incremental = ' <c-space>' ,
90
+ scope_incremental = ' <c-s>' ,
91
+ node_decremental = ' <M-space>' ,
92
+ },
93
+ },
94
+ textobjects = {
95
+ select = {
96
+ enable = true ,
97
+ lookahead = true , -- Automatically jump forward to textobj, similar to targets.vim
98
+ keymaps = {
99
+ -- You can use the capture groups defined in textobjects.scm
100
+ [' aa' ] = ' @parameter.outer' ,
101
+ [' ia' ] = ' @parameter.inner' ,
102
+ [' af' ] = ' @function.outer' ,
103
+ [' if' ] = ' @function.inner' ,
104
+ [' ac' ] = ' @class.outer' ,
105
+ [' ic' ] = ' @class.inner' ,
106
+ },
107
+ },
108
+ move = {
109
+ enable = true ,
110
+ set_jumps = true , -- whether to set jumps in the jumplist
111
+ goto_next_start = {
112
+ [' ]m' ] = ' @function.outer' ,
113
+ [' ]]' ] = ' @class.outer' ,
114
+ },
115
+ goto_next_end = {
116
+ [' ]M' ] = ' @function.outer' ,
117
+ [' ][' ] = ' @class.outer' ,
118
+ },
119
+ goto_previous_start = {
120
+ [' [m' ] = ' @function.outer' ,
121
+ [' [[' ] = ' @class.outer' ,
122
+ },
123
+ goto_previous_end = {
124
+ [' [M' ] = ' @function.outer' ,
125
+ [' []' ] = ' @class.outer' ,
126
+ },
127
+ },
128
+ swap = {
129
+ enable = true ,
130
+ swap_next = {
131
+ [' <leader>a' ] = ' @parameter.inner' ,
132
+ },
133
+ swap_previous = {
134
+ [' <leader>A' ] = ' @parameter.inner' ,
135
+ },
136
+ },
137
+ },
138
+ }
139
+ end , 0 )
140
+ >>>>>>> 2510 c29 (Removed duplicate line (# 583 ))
66
141
67
142
-- [[ Configure LSP ]]
68
143
-- (Language Server Protocol)
0 commit comments