Commit graph

71 commits

Author SHA1 Message Date
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
a4f4fcdd3e feat: add Doxygen 2023-08-26 04:58:36 -04:00
Amaan Qureshi
c58694685d feat: add re2c 2023-08-24 02:52:48 -04:00
Pham Huy Hoang
78b54eb7f6 chore(injections)!: update injection syntax to 0.9
Since 0.9, @lang syntax is still available as fallback but will soon be deprecated.
Because of that, new syntax should be adopted once 0.9 becomes the
baseline requirements for nvim-treesitter

- update health check
- update doc
2023-08-12 17:34:15 +02:00
Yuki Ito
d92bfe2cbd feat(go): add max and min to @function.builtin 2023-08-10 11:18:57 -04:00
ShellCode33
d9e75a1736 queries/*/highlights.scm : remove @spell for strings 2023-08-07 16:39:40 +01:00
Christian Clason
e58bbe83f9 lint(locals): use #set! to keep query linter happy 2023-06-22 08:39:17 +02:00
Amaan Qureshi
6de5ceba03
fix(go): properly highlight chan/map (#4875) 2023-05-30 00:09:37 -04:00
Yuki Ito
ec97c5ec72
fear(go): add clear to @function.builtin 2023-05-26 09:51:51 -04:00
mohsen
f2778bd1a2 highlights(go): add some highlights
- added missing operators
- added iota constant
- added comparable type
- edited  go keyword types
2023-05-21 20:04:40 +02:00
Amaan Qureshi
e2cf8977fd feat(go): highlight constructors, remove _ as @constant 2023-05-02 07:52:45 -04:00
George Harker
cb568af539 use indent.X syntax for captures and properties of set directives
update CONTRIBUTING.md

adjust indents for bass

fix doc capture comment
2023-03-24 13:07:53 -04:00
Amaan Qureshi
5a87bc98da feat: add @comment.documentation where applicable 2023-03-05 17:15:32 -05:00
Evan Phoenix
28f84d69e3 fix(go): Indent on type switch case properly 2023-03-03 23:36:51 -05:00
Amaan Qureshi
a3213e3dd7 fix(go): apply indents in a communication case in a select statement 2023-02-24 01:37:58 -08:00
Laytan Laats
ce0dba96f4 feat(go): add folds for type switch and switch cases 2023-02-19 08:16:30 -08:00
Stephan Seitz
779b4222a3 injections(go): inject regex into some regexp functions 2022-12-22 10:12:14 +01:00
Stephan Seitz
e71dfc1e7a highlights(go): add @label 2022-12-04 11:56:40 +01:00
Viorel Craescu
be5ed65f7f add golang type definition highlight 2022-11-21 14:00:36 +01: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
Stephan Seitz
d1ce3db8ea indents(go): no indent at all composite_literal, indent at struct_type 2022-08-15 13:34:16 -07:00
Stephan Seitz
f68a1b16ce injections(go): avoid running queries on all comments
Fixes #3187
Fixes #3263
2022-08-06 05:37:14 -07:00
ray-x
373b15ecee go folds.scm composit_literal 2022-08-05 13:36:57 -07:00
Stephan Seitz
27424a2040 indents(go): improve @branch rules
- Don't branch at `case`
- Let `import_spec_list`/`var_declaration` behave like
  `const_declaration`

Fixes #2166
2022-08-05 12:32:20 -07:00
lfenzo
2f9ae24ffa Split func/method definition from calls in Go highlighting queries 2022-08-03 12:05:30 -07:00
Viorel Craescu
6f1bf2feec add go1.18 any type 2022-07-10 14:53:27 +02:00
Viorel Craescu
2f340af135 remove type definition 2022-07-09 21:18:03 +02:00
Viorel Craescu
eb3f263bfe add type def highlight, add field declaration highlight and remove constant highlight 2022-07-09 21:18:03 +02:00
Viorel Craescu
32e033a8f5
add method spec highlight and block folds (#3151) 2022-07-09 11:35:10 +00:00
kiyan
6eb35103d0 fix(go): indent const declaration
https://github.com/nvim-treesitter/nvim-treesitter/issues/3104
2022-07-08 00:14:29 +02:00
Pieter van Loon
dcc5895e7c Highlight named fields in struct literals 2022-07-08 00:13:46 +02:00
Akin Sowemimo
eb0eb67bc5 fix(go): reduce indent after },) 2022-04-18 14:11:02 +02:00
kraftwerk28
93de9cc7a0 Add c injection for cgo comments 2022-04-11 10:52:34 +02:00
Stephan Seitz
9f25d66f7d indents(go): perform some changes as go fmt dictates 2022-02-05 18:54:55 +01:00
Stephan Seitz
0d1c1efff5 indents(go): fix aligned_indent for parameter_list 2022-02-05 18:54:55 +01:00
Stephan Seitz
b7c72e9992 indents(go): remove function_declaration from indents 2022-02-05 18:54:55 +01:00
Stephan Seitz
542d098e14
highlights(go): highlight package_identifier as @namespace (#2371) 2022-01-28 18:44:32 +01:00
Stephan Seitz
ba2959347d highlights(go): highlights "~"
Follow upstream change
beb36fc9be
2022-01-09 20:16:49 +01:00
Sergio Alejandro Vargas
820b4a9c21 Use @keyword.function consistently 2021-07-06 00:53:40 +02: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
2e073285dc highlights(go): modernize highlights.scm 2021-07-01 22:38:26 +02:00
Joakker
c699cc2e47 Use #any-of? instead of #match? where posible 2021-06-25 00:22:48 +02:00
Santos Gallegos
67f0857015 Revert "Comment: use @combined to create just one tree per buffer (#1252)"
This reverts commit 4a7a713c52.
2021-05-07 16:51:57 +02:00
Santos Gallegos
4a7a713c52
Comment: use @combined to create just one tree per buffer (#1252)
* Comment: use `@combined` to create just one tree per buffer

There is no need to create a tree per line/block for comments.
Should fix https://github.com/nvim-treesitter/nvim-treesitter/issues/1251

* Add injections for scss

* Fix jsonc

* Combine jsdoc
2021-04-28 07:19:07 -05:00
Stephan Seitz
eb742e304a locals(Go): add namespace definition for import_spec_list
This would define `foo`
```go
import (
	foo "fmt"
)
```
2021-04-13 13:34:57 +02:00
Stephan Seitz
f8314a4df3 highlights(go): Highlight const_declaration
Fixes #1157
2021-04-07 13:03:44 +02:00
Yuki Ito
b818ace315 go: add builtin types 2021-03-19 13:48:24 +01:00
Yuki Ito
df81a91ba9 go: add builtin functions 2021-03-16 17:45:29 +01:00