mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
Update CONTRIBUTING.md
This makes it more readable
This commit is contained in:
parent
09c2e6e0a7
commit
35dfd7e1f4
1 changed files with 59 additions and 49 deletions
108
CONTRIBUTING.md
108
CONTRIBUTING.md
|
|
@ -39,64 +39,73 @@ effect on highlighting. We will work on improving highlighting in the near futur
|
|||
|
||||
|
||||
#### Misc
|
||||
`@comment`
|
||||
`@error` for error `(ERROR)` nodes.
|
||||
`@punctuation.delimiter` for `;` `.` `,`
|
||||
`@punctuation.bracket` for `()` or `{}`
|
||||
```
|
||||
@comment
|
||||
@error for error (ERROR` nodes.
|
||||
@punctuation.delimiter for `;` `.` `,`
|
||||
@punctuation.bracket for `()` or `{}`
|
||||
```
|
||||
|
||||
Some captures are related to language injection (like markdown code blocks). As this is not supported by neovim yet, these
|
||||
are optional and will not have any effect for now.
|
||||
`@embedded`
|
||||
`@injection`
|
||||
`language`
|
||||
`content`
|
||||
|
||||
```
|
||||
@embedded
|
||||
@injection
|
||||
language
|
||||
content
|
||||
```
|
||||
#### Constants
|
||||
`@constant`
|
||||
`builtin`
|
||||
`macro`
|
||||
`@string`
|
||||
`regex`
|
||||
`escape`
|
||||
`@character`
|
||||
`@number`
|
||||
`@boolean`
|
||||
`@float`
|
||||
```
|
||||
@constant
|
||||
builtin
|
||||
macro
|
||||
@string
|
||||
regex
|
||||
escape
|
||||
@character
|
||||
@number
|
||||
@boolean
|
||||
@float
|
||||
```
|
||||
|
||||
#### Functions
|
||||
`@function`
|
||||
`builtin`
|
||||
`macro`
|
||||
`@parameter`
|
||||
```
|
||||
@function
|
||||
builtin
|
||||
macro
|
||||
@parameter
|
||||
|
||||
`@method`
|
||||
`@field` or `@property`
|
||||
@method
|
||||
@field or @property
|
||||
|
||||
`@constructor`
|
||||
@constructor
|
||||
```
|
||||
|
||||
#### Keywords
|
||||
`@conditional`
|
||||
`@repeat`
|
||||
`@label` for C/Lua-like labels
|
||||
`@operator`
|
||||
`@keyword`
|
||||
`@exception`
|
||||
`@include` keywords for including modules (e.g. import/from in Python)
|
||||
|
||||
`@type`
|
||||
`builtin`
|
||||
`@structure`
|
||||
```
|
||||
@conditional
|
||||
@repeat
|
||||
@label for C/Lua-like labels
|
||||
@operator
|
||||
@keyword
|
||||
@exception
|
||||
@include keywords for including modules (e.g. import/from in Python)
|
||||
|
||||
@type
|
||||
builtin
|
||||
@structure
|
||||
```
|
||||
### Locals
|
||||
|
||||
`@definition` for various definitions
|
||||
`function`
|
||||
`method`
|
||||
`var`
|
||||
`macro`
|
||||
`type`
|
||||
`field`
|
||||
`doc` for documentation adjecent to a definition. E.g.
|
||||
```
|
||||
@definition for various definitions
|
||||
function
|
||||
method
|
||||
var
|
||||
macro
|
||||
type
|
||||
field
|
||||
doc for documentation adjecent to a definition. E.g.
|
||||
```
|
||||
|
||||
```scheme
|
||||
(comment)* @definition.doc
|
||||
|
|
@ -104,7 +113,8 @@ are optional and will not have any effect for now.
|
|||
name: (field_identifier) @definition.method)
|
||||
```
|
||||
|
||||
`@scope`
|
||||
|
||||
`@reference`
|
||||
```
|
||||
@scope
|
||||
@reference
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue