Pham Huy Hoang
107e61afb7
refactor: Remove all (ERROR) @error captures
...
As discussed in PR#5421, capturing `@error` is inconsistent, requiring
deep nesting (or priority) in order to correctly have red backgrounds to
it.
Some queries has this capture, some don't. For consistency purposes,
removing all of them is more preferable.
For re-enabling error, either add `(ERROR) @error` or `(ERROR _ @error)`
to your custom queries.
2023-10-25 18:18:50 +02:00
Amaan Qureshi
e0f4782978
feat(c): mention how to highlight K&R functions
2023-08-13 18:57:23 -04:00
Amaan Qureshi
acd9d2115d
feat(c): update highlights
2023-08-11 14:38:50 -04:00
Amaan Qureshi
6aababfca4
chore: update C, improve preproc_arg highlights
2023-07-27 07:29:33 -04:00
Amaan Qureshi
ad3805f5c3
fix(c)!: update C, CPP parsers and queries
...
also update derived parsers (arduino, cuda, glsl, hlsl, ispc, objc)
2023-07-27 09:51:13 +02:00
Christian Clason
a034c7aa25
fix(highlights): lower priority for codeblocks with injections ( #4905 )
2023-06-05 14:09:44 +02:00
Amaan Qureshi
654216eb04
fix(c): types are optional in sized_type_specifier
2023-04-21 04:55:20 -04:00
Amaan Qureshi
b9ed96bb6f
feat(c): highlight parenthesized function pointer decl identifiers as @function
2023-04-21 03:26:13 -04:00
Amaan Qureshi
5a87bc98da
feat: add @comment.documentation where applicable
2023-03-05 17:15:32 -05:00
ObserverOfTime
6ae94e0341
highlights(c): extern in linkage specification
2023-01-26 17:39:24 +01:00
Stephan Seitz
d6a2ecb8b7
highlights: create subscoping for ternary operator
...
After https://github.com/nvim-treesitter/nvim-treesitter/issues/470 ,
we decided to use `@conditional` for ternary operator instead of
operator despite `@conditional` is documented for keywords only.
A sub-scoping can make it easier for people to highlight this operator
group differently.
Also unify the usage of `@conditional...` across languages.
2022-12-02 21:42:11 +01:00
Aaron Rancsik
4b99343d6e
highlights(c): primitive type as builtin
2022-12-01 15:08:07 +01:00
ObserverOfTime
7ce62670b2
highlights(c): use more specific groups
...
Co-Authored-By: Stephan Seitz <stephan.seitz@fau.de>
2022-11-26 13:17:51 +02:00
ObserverOfTime
9b43ab819c
highlights: use @preproc where appropriate
2022-10-15 08:49:01 -07:00
ObserverOfTime
b945aa0aab
highlights(c): highlight standard streams
2022-10-15 08:12:55 -07:00
Lewis Russell
37398c7d68
feat(spell): support more languages
2022-09-26 13:47:12 +01:00
Lewis Russell
2a63ea5665
feat(spell): upstream spell queries from spellsitter
2022-09-06 12:44:19 +01:00
lfenzo
04e62a2027
Split func/method definition from calls in C highlighting queries
2022-08-03 12:05:30 -07:00
Stephan Seitz
f9176e560c
highlights(c/cpp): move attributes to C (again)
...
Let's hope that this time the C tests pass, also for the built-in C
parser.
2022-07-28 08:24:51 +02:00
mliszcz
71395d90c0
highlights(c): Lower the priority of @variable
...
Lower the priority of @variable to prefer @parameter
highlight when identifier appears in parameter_declaration.
Fixes #3061
2022-07-20 17:10:51 +02:00
guijan
8f13ef1563
highlights(c): highlight , operator as operator ( #3107 )
2022-07-08 09:00:56 +02:00
guijan
9832666cfa
highlights(c): highlight member-access as operator ( #3096 )
2022-07-01 15:47:11 +02:00
Stephan Seitz
8c56988d79
highlights(c): highlight field_designator as @property
2022-05-29 11:11:10 +02:00
Stephan Seitz
e4675bc410
highlights(c/cpp): highlight case labels as constants
2022-01-29 13:11:56 +01:00
Stephan Seitz
1d3111ccb1
highlights(c): highlight enum variants as @constant
...
Fixes #2120
2022-01-29 13:11:56 +01:00
John Drouhard
d0158c053d
highlights(c): don't highlight type qualifiers in declarations as types
2022-01-20 08:40:51 +01:00
Lewis Russell
011ac894ec
Prefer lua-match over match
...
as string.find is much quicker than vim.regex:match*
2021-11-23 10:02:06 +01:00
Santos Gallegos
b972f1d985
C: fix preproc parameters
...
This was capturing too much,
we only want to highlight the identifier.
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/1999
2021-11-14 11:02:57 +01:00
Stephan Seitz
18dc243188
highlights(c): add Mircosoft attributes
2021-09-19 20:02:28 +02:00
Stephan Seitz
5fa6e27427
highlights(c): add __attribute__
2021-09-19 14:13:50 +02:00
Stephan Seitz
440d666b68
test
2021-09-17 22:03:47 +02:00
Stephan Seitz
37d93ec017
highlights(c/cpp): react to upstream changes to attributes
2021-09-17 22:03:47 +02:00
Sergio Alejandro Vargas
9446ff4aa4
highlights(c): make sizeof a keyword.operator
2021-09-01 07:07:16 +02:00
Gregory Anders
27f5e99cdd
c: don't treat uppercase functions as constants
...
A macro function such as
#define FOO(x) ...
should be highlighted with @function.macro, even though the name is in
all-caps (which would otherwise be treated as a constant). Similarly,
call sites of such functions, e.g.
int y = FOO(x);
should be highlighted with @function instead of @constant.
This is as simple as moving the query definition for macro functions
after the query definition for constants.
2021-07-18 16:44:40 +00:00
antonk52
90f15d9bf7
feat(keywords) merge return and yield into keyword.return group
2021-07-04 21:49:17 +02:00
antonk52
bd9095e969
feat(keywords) add keyword.return & keyword.yield
2021-07-04 21:49:17 +02:00
Stephan Seitz
506e998da2
highlights(c/c++): "..." also exists in C (variadic macros)
2021-05-18 07:07:16 +02:00
Stephan Seitz
2873d1efda
highlights(c): highlight (escape_sequence)
2021-05-01 09:39:41 +02:00
Stephan Seitz
423fb7b4aa
C highlights: Make char_literal @character
2021-04-21 18:37:38 +02:00
Stephan Seitz
866f39bb71
highlights(c): update declaration and cast_expression
2021-03-02 16:55:18 +01:00
Fabian Viöl
34bb66c48f
Add 'register' as c-keyword
...
See https://en.wikipedia.org/wiki/Register_(keyword)
2021-03-01 09:12:44 -05:00
Thomas Vigouroux
632a9f1e3c
fix(c highlights): add missing operators
2021-01-06 10:48:35 -05:00
Stephan Seitz
40588da97c
Remove usages of @embedded in highlights
2021-01-06 09:12:32 -05:00
Thomas Vigouroux
049028ef3e
c highlights: fix define/undef arguments
2020-11-22 22:33:56 +01:00
John Drouhard
33ffdce690
c/cpp highlights: Fix field declarations and initializers
...
After a recent fix for #446 , declarations in class/struct definitions
stopped being marked as properties or methods. This fix will add
property highlights to field declarations, and method highlight to field
function declarations.
2020-11-20 14:03:06 +01:00
Stephan Seitz
289cdc9da8
Do not highlight Uppercase function as type
2020-11-18 21:54:04 +01:00
Stephan Seitz
3674ad89df
fix(predicates): Fix #446 : highlight property only if not a method
2020-11-18 21:54:04 +01:00
Stephan Seitz
bcf421b4e7
Fix #307 : Use and document TSVariable/TSVariableBuiltin in all languages
2020-09-14 18:27:20 +02:00
Stephan Seitz
da6bc7be20
fix(cpp highlights): Use @include for preproc_include ( fix #445 )
2020-09-13 12:46:52 +02:00
Stephan Seitz
1cdf8bf750
C highlights: make preproc_defined @function.macro
2020-08-30 10:53:41 +02:00