docs: Update vimdoc file

Adds the new maintainers (that were actually added a long time ago),
fix inconsistent formatting, and unneeded or old/wrong docs.
This commit is contained in:
Thomas Vigouroux 2021-04-15 16:51:36 +02:00
parent afd5d11519
commit a74484a8ac

View file

@ -1,9 +1,15 @@
*nvim-treesitter*
Treesitter configurations and abstraction layer for Neovim.
Minimum version of neovim: nightly
Authors: Yazdani Kiyan <yazdani.kiyan@protonmail.com>
Vigouroux Thomas <tomvig38@gmail.com>
Authors:
Kiyan Yazdani <yazdani.kiyan@protonmail.com>
Thomas Vigouroux <tomvig38@gmail.com>
Stephan Seitz <stephan.seitz@fau.de>
Steven Sojka <Steven.Sojka@tdameritrade.com>
Santos Gallegos <stsewd@protonmail.com>
https://github.com/nvim-treesitter/nvim-treesitter/graphs/contributors
Type |gO| to see the table of contents.
@ -111,7 +117,6 @@ Supported options:
require'nvim-treesitter.configs'.setup {
highlight = {
enable = true,
use_languagetree = false, -- Use this to enable language injection
custom_captures = {
-- Highlight the @foo.bar capture group with the "Identifier" highlight group.
["foo.bar"] = "Identifier",
@ -175,25 +180,6 @@ Supported options:
}
EOF
<
==============================================================================
USER QUERY EXTENSIONS *nvim-treesitter-query-extensions*
Queries are what `nvim-treesitter` uses to extract informations from the syntax tree, and they are
located in the `queries/{lang}/*` runtime directories (like the `queries` folder of this plugin).
`nvim-treesitter` considers queries as any runtime file (see `:h rtp`), that is :
- if the file is in any `after/queries/` folder, then it will be used to extend the already defined
queries.
- Otherwise, it will be used as a base to define the query, the first query found (with the highest
priority) will be the only one to be used.
This hybrid approach is the most standard way, and according to that, here is some ideas on how to
use is :
- If you want to rewrite (or write) a query, don't use `after/queries`.
- If you want to override a part of a query (only one match for example), use the `after/queries`
directory.
==============================================================================
COMMANDS *nvim-treesitter-commands*
@ -444,224 +430,223 @@ Note: This is highly experimental, and folding can break on some types of
==============================================================================
HIGHLIGHTS *nvim-treesitter-highlights*
`TSAnnotation`
*hl-TSAnnotation*
`TSAnnotation`
For C++/Dart attributes, annotations that can be attached to the code to
denote some kind of meta information.
*hl-TSAttribute*
`TSAttribute`
hl-TSAttribute
(unstable) TODO: docs
`TSBoolean`
*hl-TSBoolean*
`TSBoolean`
For booleans.
`TSCharacter`
*hl-TSCharacter*
`TSCharacter`
For characters.
`TSComment`
*hl-TSComment*
`TSComment`
For comment blocks.
`TSConstructor`
*hl-TSConstructor*
`TSConstructor`
For constructor calls and definitions: `{}` in Lua, and Java constructors.
`TSConditional`
*hl-TSConditional*
`TSConditional`
For keywords related to conditionnals.
`TSConstant`
*hl-TSConstant*
`TSConstant`
For constants
`TSConstBuiltin`
*hl-TSConstBuiltin*
`TSConstBuiltin`
For constant that are built in the language: `nil` in Lua.
`TSConstMacro`
*hl-TSConstMacro*
`TSConstMacro`
For constants that are defined by macros: `NULL` in C.
`TSError`
*hl-TSError*
`TSError`
For syntax/parser errors.
`TSException`
*hl-TSException*
`TSException`
For exception related keywords.
`TSField`
*hl-TSField*
`TSField`
For fields.
`TSFloat`
*hl-TSFloat*
`TSFloat`
For floats.
`TSFunction`
*hl-TSFunction*
`TSFunction`
For function (calls and definitions).
`TSFuncBuiltin`
*hl-TSFuncBuiltin*
`TSFuncBuiltin`
For builtin functions: `table.insert` in Lua.
`TSFuncMacro`
*hl-TSFuncMacro*
`TSFuncMacro`
For macro defined fuctions (calls and definitions): each `macro_rules` in
Rust.
`TSInclude`
*hl-TSInclude*
`TSInclude`
For includes: `#include` in C, `use` or `extern crate` in Rust, or `require`
in Lua.
`TSKeyword`
*hl-TSKeyword*
`TSKeyword`
For keywords that don't fall in previous categories.
`TSKeywordFunction`
*hl-TSKeywordFunction*
`TSKeywordFunction`
For keywords used to define a fuction.
`TSLabel`
*hl-TSLabel*
`TSLabel`
For labels: `label:` in C and `:label:` in Lua.
`TSMethod`
*hl-TSMethod*
`TSMethod`
For method calls and definitions.
`TSNamespace`
*hl-TSNamespace*
`TSNamespace`
For identifiers referring to modules and namespaces.
`TSNone`
*hl-None*
`TSNone`
TODO: docs
`TSNumber`
*hl-TSNumber*
`TSNumber`
For all numbers
`TSOperator`
*hl-TSOperator*
`TSOperator`
For any operator: `+`, but also `->` and `*` in C.
`TSParameter`
*hl-TSParameter*
`TSParameter`
For parameters of a function.
`TSParameterReference`
*hl-TSParameterReference*
`TSParameterReference`
For references to parameters of a function.
`TSProperty`
*hl-TSProperty*
`TSProperty`
Same as `TSField`.
`TSPunctDelimiter`
*hl-TSPunctDelimiter*
`TSPunctDelimiter`
For delimiters ie: `.`
`TSPunctBracket`
*hl-TSPunctBracket*
`TSPunctBracket`
For brackets and parens.
`TSPunctSpecial`
*hl-TSPunctSpecial*
`TSPunctSpecial`
For special punctutation that does not fall in the catagories before.
`TSRepeat`
*hl-TSRepeat*
`TSRepeat`
For keywords related to loops.
`TSString`
*hl-TSString*
`TSString`
For strings.
`TSStringRegex`
*hl-TSStringRegex*
`TSStringRegex`
For regexes.
`TSStringEscape`
*hl-TSStringEscape*
`TSStringEscape`
For escape characters within a string.
`TSSymbol`
*hl-TSSymbol*
`TSSymbol`
For identifiers referring to symbols or atoms.
`TSTag`
*hl-TSTag*
`TSTag`
Tags like html tag names.
`TSTagDelimiter`
*hl-TSTagDelimiter*
`TSTagDelimiter`
Tag delimiter like `<` `>` `/`
`TSText`
*hl-TSText*
`TSText`
For strings considered text in a markup language.
`TSStrong`
*hl-TSSTrong*
`TSStrong`
For text to be represented in bold.
`TSEmphasis`
*hl-TSEmphasis*
`TSEmphasis`
For text to be represented with emphasis.
`TSUnderline`
*hl-TSUnderline*
`TSUnderline`
For text to be represented with an underline.
`TSStrike`
*hl-TSStrike*
`TSStrike`
For strikethrough text.
`TSTitle`
*hl-TSTitle*
`TSTitle`
Text that is part of a title.
`TSLiteral`
*hl-TSLiteral*
`TSLiteral`
Literal text.
`TSURI`
*hl-TSURI*
`TSURI`
Any URI like a link or email.
`TSNote`
*hl-TSNote*
`TSNote`
Text representation of an informational note.
`TSWarning`
*TSWarning*
`TSWarning`
Text representation of a warning note.
`TSDanger`
*TSDanger*
`TSDanger`
Text representation of a danger note.
`TSType`
*hl-TSType*
`TSType`
For types.
`TSTypeBuiltin`
*hl-TSTypeBuiltin*
`TSTypeBuiltin`
For builtin types.
`TSVariable`
*hl-TSVariable*
`TSVariable`
Any variable name that does not have another highlight.
`TSVariableBuiltin`
*hl-TSVariableBuiltin*
`TSVariableBuiltin`
Variable names that are defined by the languages, like `this` or `self`.
==============================================================================