aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSantos Gallegos <stsewd@protonmail.com>2021-12-17 20:49:06 -0500
committerStephan Seitz <stephan.seitz@fau.de>2021-12-18 14:50:48 +0100
commit4aa9f6b7f71a18e3d904bd80388bbf05f0534102 (patch)
tree4864b13c95a8619b6bed61761aa6f3701899cb62 /doc
parenthighlights(markdown): highlight link_text as @text.reference (diff)
downloadnvim-treesitter-4aa9f6b7f71a18e3d904bd80388bbf05f0534102.tar
nvim-treesitter-4aa9f6b7f71a18e3d904bd80388bbf05f0534102.tar.gz
nvim-treesitter-4aa9f6b7f71a18e3d904bd80388bbf05f0534102.tar.bz2
nvim-treesitter-4aa9f6b7f71a18e3d904bd80388bbf05f0534102.tar.lz
nvim-treesitter-4aa9f6b7f71a18e3d904bd80388bbf05f0534102.tar.xz
nvim-treesitter-4aa9f6b7f71a18e3d904bd80388bbf05f0534102.tar.zst
nvim-treesitter-4aa9f6b7f71a18e3d904bd80388bbf05f0534102.zip
Make example config more easy to read
Ref https://github.com/nvim-treesitter/nvim-treesitter/issues/2095#issuecomment-992759818
Diffstat (limited to 'doc')
-rw-r--r--doc/nvim-treesitter.txt24
1 files changed, 20 insertions, 4 deletions
diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt
index bf36fd74e..44aff0e60 100644
--- a/doc/nvim-treesitter.txt
+++ b/doc/nvim-treesitter.txt
@@ -40,11 +40,27 @@ To enable supported features, put this in your `init.vim` file:
>
lua <<EOF
require'nvim-treesitter.configs'.setup {
- ensure_installed = "maintained", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
- ignore_install = { "javascript" }, -- List of parsers to ignore installing
+ -- One of "all", "maintained" (parsers with maintainers), or a list of languages
+ ensure_installed = "maintained",
+
+ -- Install languages synchronously (only applied to `ensure_installed`)
+ sync_install = false,
+
+ -- List of parsers to ignore installing
+ ignore_install = { "javascript" },
+
highlight = {
- enable = true, -- false will disable the whole extension
- disable = { "c", "rust" }, -- list of language that will be disabled
+ -- `false` will disable the whole extension
+ enable = true,
+
+ -- list of language that will be disabled
+ disable = { "c", "rust" },
+
+ -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
+ -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
+ -- Using this option may slow down your editor, and you may see some duplicate highlights.
+ -- Instead of true it can also be a list of languages
+ additional_vim_regex_highlighting = false,
},
}
EOF