mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07:00
75adfefc85
- Added 'spell' option to extmarks: Extmarks with this set will have the region spellchecked. - Added 'noplainbuffer' option to 'spelloptions': This is used to tell Neovim not to spellcheck the buffer. The old behaviour was to spell check the whole buffer unless :syntax was set. - Added spelling support to the treesitter highlighter: @spell captures in highlights.scm are used to define regions which should be spell checked. - Added support for navigating spell errors for extmarks: Works for both ephemeral and static extmarks - Added '_on_spell_nav' callback for decoration providers: Since ephemeral callbacks are only drawn for the visible screen, providers must implement this callback to instruct Neovim which regions in the buffer need can be spell checked. The callback takes a start position and an end position. Note: this callback is subject to change hence the _ prefix. - Added spell captures for built-in support languages Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
165 lines
2.1 KiB
Scheme
165 lines
2.1 KiB
Scheme
(identifier) @variable
|
|
|
|
[
|
|
"const"
|
|
"default"
|
|
"enum"
|
|
"extern"
|
|
"inline"
|
|
"return"
|
|
"sizeof"
|
|
"static"
|
|
"struct"
|
|
"typedef"
|
|
"union"
|
|
"volatile"
|
|
"goto"
|
|
"register"
|
|
] @keyword
|
|
|
|
[
|
|
"while"
|
|
"for"
|
|
"do"
|
|
"continue"
|
|
"break"
|
|
] @repeat
|
|
|
|
[
|
|
"if"
|
|
"else"
|
|
"case"
|
|
"switch"
|
|
] @conditional
|
|
|
|
"#define" @constant.macro
|
|
[
|
|
"#if"
|
|
"#ifdef"
|
|
"#ifndef"
|
|
"#else"
|
|
"#elif"
|
|
"#endif"
|
|
(preproc_directive)
|
|
] @keyword
|
|
|
|
"#include" @include
|
|
|
|
[
|
|
"="
|
|
|
|
"-"
|
|
"*"
|
|
"/"
|
|
"+"
|
|
"%"
|
|
|
|
"~"
|
|
"|"
|
|
"&"
|
|
"^"
|
|
"<<"
|
|
">>"
|
|
|
|
"->"
|
|
|
|
"<"
|
|
"<="
|
|
">="
|
|
">"
|
|
"=="
|
|
"!="
|
|
|
|
"!"
|
|
"&&"
|
|
"||"
|
|
|
|
"-="
|
|
"+="
|
|
"*="
|
|
"/="
|
|
"%="
|
|
"|="
|
|
"&="
|
|
"^="
|
|
">>="
|
|
"<<="
|
|
"--"
|
|
"++"
|
|
] @operator
|
|
|
|
[
|
|
(true)
|
|
(false)
|
|
] @boolean
|
|
|
|
[ "." ";" ":" "," ] @punctuation.delimiter
|
|
|
|
(conditional_expression [ "?" ":" ] @conditional)
|
|
|
|
|
|
[ "(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
|
|
|
(string_literal) @string
|
|
(string_literal) @spell
|
|
(system_lib_string) @string
|
|
|
|
(null) @constant.builtin
|
|
(number_literal) @number
|
|
(char_literal) @number
|
|
|
|
(call_expression
|
|
function: (identifier) @function)
|
|
(call_expression
|
|
function: (field_expression
|
|
field: (field_identifier) @function))
|
|
(function_declarator
|
|
declarator: (identifier) @function)
|
|
(preproc_function_def
|
|
name: (identifier) @function.macro)
|
|
[
|
|
(preproc_arg)
|
|
(preproc_defined)
|
|
] @function.macro
|
|
|
|
(field_identifier) @property
|
|
(statement_identifier) @label
|
|
|
|
[
|
|
(type_identifier)
|
|
(primitive_type)
|
|
(sized_type_specifier)
|
|
(type_descriptor)
|
|
] @type
|
|
|
|
(declaration (type_qualifier) @type)
|
|
(cast_expression type: (type_descriptor) @type)
|
|
(sizeof_expression value: (parenthesized_expression (identifier) @type))
|
|
|
|
((identifier) @constant
|
|
(#match? @constant "^[A-Z][A-Z0-9_]+$"))
|
|
|
|
;; Preproc def / undef
|
|
(preproc_def
|
|
name: (_) @constant)
|
|
(preproc_call
|
|
directive: (preproc_directive) @_u
|
|
argument: (_) @constant
|
|
(#eq? @_u "#undef"))
|
|
|
|
|
|
(comment) @comment
|
|
(comment) @spell
|
|
|
|
;; Parameters
|
|
(parameter_declaration
|
|
declarator: (identifier) @parameter)
|
|
|
|
(parameter_declaration
|
|
declarator: (pointer_declarator) @parameter)
|
|
|
|
(preproc_params
|
|
(identifier)) @parameter
|
|
|
|
(ERROR) @error
|