Riley Bruins
5cf3434c69
feat(go): string regex highlights
2024-12-15 12:02:42 +01:00
Riley Bruins
89ecadd2b1
fix(go): properly apply injections in strings
2024-12-15 12:02:42 +01:00
nvim-treesitter-bot[bot]
63e1337f1b
bot(lockfile): update c, cpp, css, go, idl, nix, python, ruby
2024-08-17 09:16:55 +00:00
Phạm Huy Hoàng
74dc34a7fa
fix(go): narrow down } usage
2024-07-05 22:35:19 +09:00
Riley Bruins
f58cae6c22
feat: more @keyword.type captures
2024-05-01 09:59:50 +02:00
Amaan Qureshi
3af2d894d4
fix(go): update queries from upstream
...
also bump templ to match
2024-04-10 11:07:30 +02:00
Phạm Huy Hoàng
722617e672
refactor(format): drop extra indentation for field
2024-03-21 15:51:26 +01:00
再生花
31641d72a4
feat(format-scripts): linewrap predicates
...
"format-ignore".kick()
2024-02-23 10:42:01 +02:00
Ilya Ilyinykh
e7ea07e42c
fix(go): fix eq to any-of
2024-02-01 19:21:09 +01:00
Ilya Ilyinykh
f2119df35c
feat(go): printf injections
...
https://pkg.go.dev/fmt#pkg-index
https://pkg.go.dev/fmt#Fscanf
https://pkg.go.dev/fmt#Appendf
https://pkg.go.dev/fmt#Sscanf
https://pkg.go.dev/testing#T.Skipf
https://pkg.go.dev/testing#F.Logf
The problem covered here:
https://github.com/nvim-treesitter/nvim-treesitter/issues/2917
2024-02-01 19:21:09 +01:00
Pham Huy Hoang
57a8acf0c4
chore: query formatting
2024-01-19 16:58:37 +01:00
Pham Huy Hoang
edee83272e
refactor: manual pre-cleanup
...
Moving comments, adding `format-ignore` to lines that will be better
with it
2024-01-19 16:58:37 +01:00
Christian Clason
1ae9b0e455
feat!: align standard captures with upstream
...
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(3f44b89685/highlight/src/lib.rs (L20-L72) ):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting ):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2024-01-19 16:58:37 +01:00
ObserverOfTime
17fae3f4a3
feat(injections): add printf format strings
2024-01-19 16:58:37 +01:00
Christian Clason
5b90ea2aba
feat(locals)!: switch to upstream captures
2024-01-19 16:58:37 +01:00
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