Skip to content

Commit 07f618e

Browse files
nvim: add notes on how/when to disable treesitter hightlight
1 parent 686e1d3 commit 07f618e

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

nvim/init.lua

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -206,31 +206,32 @@ require('lazy').setup({
206206
ensure_installed = {
207207
'bash',
208208
'c',
209-
'diff',
210-
'html',
209+
'fish',
211210
'javascript',
212211
'lua',
213212
'luadoc',
214213
'markdown',
215214
'python',
216215
'rust',
216+
'tsx',
217217
'typescript',
218218
'vim',
219219
'vimdoc',
220220
},
221-
-- Autoinstall languages that are not installed
221+
-- Autoinstall languages that are not installed.
222222
auto_install = true,
223+
-- Use Treesitter for syntax highlighting.
223224
highlight = {
224225
enable = true,
225-
-- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules.
226-
-- If you are experiencing weird indenting issues, add the language to
227-
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
228-
additional_vim_regex_highlighting = { 'ruby' },
229-
},
230-
indent = { enable = true, disable = { 'ruby' } },
231-
incremental_selection = {
232-
enable = true,
226+
-- Disable when unbearably slow/laggy (can also be a function). Note that this reverts back
227+
-- to Vim's `syntax`, which is very limited. Can't you just clear (or disable) hlsearch?
228+
-- disable = { 'tsx', 'rust' },
229+
-- Keep Vim's regex `syntax` system for ident on some languages (add to this list when
230+
-- experiencing "weird indenting issues").
231+
-- additional_vim_regex_highlighting = { 'ruby' },
233232
},
233+
indent = { enable = true },
234+
incremental_selection = { enable = true },
234235
},
235236
config = function(_, opts)
236237
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
@@ -643,7 +644,7 @@ require('lazy').setup({
643644
dependencies = { 'nvim-lua/plenary.nvim' },
644645
opts = {
645646
signs = false,
646-
keywords = { SAFETY = { color = "hint" }, QUESTION = { color = "info" } },
647+
keywords = { SAFETY = { color = 'hint' }, QUESTION = { color = 'info' } },
647648
},
648649
config = function(_, opts)
649650
local todo = require 'todo-comments'

0 commit comments

Comments
 (0)