Pham Huy Hoang
605a650924
chore(wing): update queries from upstream ( #5549 )
2023-10-20 14:02:49 +00:00
Robert Jackson
4c9da29cbd
fix(scala): add for_expression locals
...
This change does two main things:
1. Indicate that `(for_expression)`'s introduce a `@scope` (this
is the scope for the enumerators to be used within the loop).
2. Indicate that the `(identifiers)` within the `(enumerators)` are
`@definition.var`s.
---
For the following example snippet:
```scala
val fruits = List("apple", "banana", "avocado", "papaya")
val countsToFruits = fruits.groupBy(fruit => fruit.count(_ == 'a'))
for ((count, fruits) <- countsToFruits) {
println(s"with (fruits) 'a' × $count = $fruits")
}
```
The `count` and `fruits` identifiers are new definitions introduced by
the `for` expressions scope.
2023-10-15 18:43:34 +00:00
Robert Jackson
dba7d120e5
fix(scala): ensure function_definition is in parent scope
2023-10-15 18:40:36 +00:00
Stephan Seitz
159272a809
feat: add gstreamer pipeline syntax (gstlaunch)
2023-10-15 18:38:16 +00:00
zetashift
7eadc8715d
fix(unison): improve highlight queries
2023-10-15 18:36:15 +00:00
Alexander Sieg
6608e2c868
fix(elixir): highlight functions without parenthesis ( #5511 )
...
Elixir does not require parenthesis after the function name for a
valid function definition.
2023-10-15 18:35:08 +00:00
Carlos Afonso
981b13b886
refactor: improve readability
2023-10-15 14:34:32 -04:00
Carlos Afonso
bf87a16712
fix(php): fix indentation for in between braces
2023-10-15 14:34:32 -04:00
Riley Bruins
28e1361d4a
fix(markdown): set block quote priority within allowed range
2023-10-15 14:34:08 -04:00
Riley Bruins
ea5f5fddad
fix(markdown): give code blocks higher priority than block quotes
2023-10-15 14:34:08 -04:00
Robert Jackson
262e9b1e86
fix(scala): Mark (lambda_expression) without bindings as @defintition.parameters
...
When you have a lambda expression like:
```scala
val fruits = List("apple", "banana", "avocado", "papaya")
val countsToFruits = fruits.groupBy(fruit => fruit.count(_ == 'a'))
for ((count, fruits) <- countsToFruits) {
println(s"with (fruits) 'a' × $count = $fruits")
}
```
The `fruit => fruit.count(_ == 'a')` lambda expression (note: without
wrapping parenthesis) does not create a `(binding)` node. Its syntax
tree is:
```
(lambda_expression) ; [5:18 - 47]
parameters: (identifier) ; [5:18 - 22]
(call_expression) ; [5:27 - 47]
function: (field_expression) ; [5:27 - 37]
value: (identifier) ; [5:27 - 31]
field: (identifier) ; [5:33 - 37]
arguments: (arguments) ; [5:38 - 47]
(infix_expression) ; [5:39 - 46]
left: (wildcard) ; [5:39 - 39]
operator: (operator_identifier) ; [5:41 - 42]
right: (character_literal) ; [5:44 - 46]
```
That example just _happens_ to be **exactly** one of the example from
https://www.scala-lang.org/ ([see
playground](https://scastie.scala-lang.org/S0bkCiXkQiuOMXnlhWn46g )) 😁 .
2023-10-15 14:33:21 -04:00
Marc Jakobi
d33dbdab01
feat(haskell): highlights improvements
...
- Consider functions with only one value on the rhs as variables
- Applied composition: `(f . g) <param>` -> `@function.call`
- View patterns
- `@field` in record update expression
- type_tuple and type_list as variables
- quantifier for `exp_apply (<rhs>)+ (variable)`
- type_tuple and type_list as variables
- Treat signatures with only one value on the rhs as variables
(except for `IO a`) -> Fixes #5505 .
- Remove redundant anchors from signature function queries.
- Move signature function queries to give them higher priority
- Scoped function types
- Add signature query to function with parameters query
2023-10-15 14:32:51 -04:00
Munif Tanjim
f8fcb0da06
fix(typescript): do not highlight undefined as variable
2023-10-15 13:15:22 +03:00
nsfisis
ad02fbcdfc
fix(php): highlight never as @type.builtin ( #5522 )
2023-10-14 21:04:06 +09:00
Ibrahim Delice
0d5c611e3f
feat(java): highlight var as @type.builtin
2023-10-13 18:12:18 -04:00
Ibrahim Delice
b59a1fa075
fix(java): move @ to @attribute
2023-10-13 21:08:05 +00:00
Kevin Durbin
168972a0d5
fix(injections): fix injection for hurl for new injection syntax
2023-10-13 17:42:03 +02:00
Marc Jakobi
783e5fc307
feat(nix): some highlight improvements
...
- functions
- builtin functions with prefix
- add test file
2023-10-12 19:04:55 +00:00
Marc Jakobi
0eb1a0ad1c
fix(haskell): prevent segfault due to anchorless queries ( #5502 )
2023-10-10 17:12:36 +09:00
ObserverOfTime
dfd4fb330f
feat: add nasm parser ( #5475 )
...
* feat: add nasm parser
* chore: update highlights
---------
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-10-09 11:28:28 +03:00
Mathew Polzin
3a2cc3161e
feat(authzed): add parser and highlight queries. ( #5426 )
...
* feat(authzed): add parser and highlight queries
* Update queries/authzed/highlights.scm
use `any-of` for list of alternative words.
Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
* add injections queries file.
* Update queries/authzed/highlights.scm
* tweak whitespace
* fix errors with capture names.
* style(authzed): reformat highlights
* add self as maintainer
* Update lua/nvim-treesitter/parsers.lua
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
* Add to lockfile and readme
* feat(authzed): Updates to queries and lockfile around newest Authzed parser changes.
* Update queries/authzed/highlights.scm
Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
* Update queries/authzed/highlights.scm
Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
* unnest here similarly to recommended elsewhere
* Update highlights.scm
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
---------
Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2023-10-07 10:43:35 +09:00
Pham Huy Hoang
4e758a89a5
fix(json5): update queries from upstream
2023-10-06 10:07:20 +02:00
Pham Huy Hoang
db7adb21e6
java(highlights): add missing import class pattern ( #5483 )
2023-10-06 12:22:53 +09:00
Marc Jakobi
6276cd9d41
fix(haskell): highlight fixes ( #5470 )
...
* fix(haskell): highlight fixes + merge qualified/unqualified queries
* fix(haskell): lambda params + add exp_record to function.call args
* style: apply PR suggestions
2023-10-05 20:04:46 +03:00
Romain Beauxis
691fdc61a1
feat: add liquidsoap
...
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2023-10-04 10:58:10 -04:00
Amaan Qureshi
eb96ca52a7
fix(c): add missing folds
2023-10-04 06:36:59 -04:00
Jaehwang Jung
812c2dd8fe
feat(query): use @function.call for predicate
2023-10-03 17:54:10 +02:00
Jaehwang Jung
9e52d8fda3
feat(ocaml): use @function.call where appropriate
2023-10-03 17:54:10 +02:00
Marc Jakobi
d96c216c54
feat(haskell): highlights improvements + tests ( #5466 )
2023-10-02 10:49:12 +00:00
figsoda
811e8ba4f3
injections(nix): dynamic language injection via comments
2023-10-01 18:36:24 +02:00
Marc Jakobi
ec0e344f6e
feat(highlights): some haskell additions
...
- Re-add (module) @namespace
- Exception handling
- Debugging
- `otherwise` = boolean `True`
- `qq` string quasiquotes
- Documentation comments (draft)
- Function/lambda parameters
- Remove recently added @ (already defined as an operator)
2023-09-27 17:18:14 +02:00
zeroknots
86d0b2b1c0
solidity: Update highlights.scm ( #5453 )
...
https://soliditylang.org/blog/2021/04/21/custom-errors/
error keyword was introduced in 0.8.4
2023-09-27 15:08:46 +09:00
Enzo L F
a255654459
feat(julia): added missing String and AbstractString builtin types ( #5440 )
...
* feat(julia): added missing String and AbstractString builtin types
* feat(juia): added all public built-in types in Core and Base
* feat(julia): removed private types from built-in type list
2023-09-27 11:50:57 +09:00
Marc Jakobi
f3fb301b26
feat(highlights): some haskell improvements
2023-09-25 13:01:31 +02:00
nedia
9409160748
feat(dart): add base, final & sealed class modifier highlights
2023-09-19 09:30:17 +00:00
PorterAtGoogle
b4f6dd7298
feat(textproto): Add Textproto parser and queries ( #5402 )
...
* Add textproto parser and queries
* remove extra newline
* Apply suggestions from code review
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
---------
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2023-09-19 01:26:02 +09:00
ObserverOfTime
c0f4363b72
feat: add ssh config
2023-09-18 11:38:56 +03:00
ShootingStarDragons
6a865af171
chore: switch agda upstream
2023-09-18 07:42:58 +02:00
Maria José Solano
eb0f975bf2
feat(markdown): conceal triple backticks and HTML entities
2023-09-17 23:16:53 +02:00
Xi Xiao
280cf6fddd
feat: add parsers and queries for apex, sosl, soql ( #5396 )
2023-09-17 20:00:21 +03:00
Christian Segundo
dac6efbaff
fix(dockerfile): bash injection on run instructions
2023-09-17 16:32:21 +02:00
Pham Huy Hoang
794266a4ed
injections(lua): add vim highlights to api funcs ( #5404 )
...
Add vim injections for `vim.api.nvim[_buf]_create_user_command` and
`vim.api.nvim_create_autocmd`
2023-09-16 19:08:08 +09:00
Christian Clason
bf8b089eec
fix(lua): fix luadoc injections
2023-09-15 14:55:34 +02:00
Christian Segundo
831dbb619e
fix(yaml): promql injections block
2023-09-15 12:53:44 +02:00
Christoph Sax
5ec4217567
fix(t32): update indent queries & test
...
The latest release of the grammar changes the handling of consecutive
line breaks. This breaks the existing test for indents.
This commit updates the indent queries and fixes the associated test.
2023-09-14 20:07:02 +02:00
osthomas
2461e5ac21
feat: add Snakemake
2023-09-12 21:29:22 -04:00
Jaehwang Jung
9567185621
feat: @spell on comments
2023-09-12 17:34:58 +02:00
Jaehwang Jung
905e782e80
perf(comment): remove spell capture
...
Problem:
Comment highlight query produces too many @spell captures.
Solution:
Remove the query. This is fine because comment parser is only used in
injection and the parent language has @spell for comment.
2023-09-12 17:34:58 +02:00
Pham Huy Hoang
bfb4601f48
refactor: remove include-children from queries ( #5226 )
...
These `include-children` were to alleviate an issue with empty range language tree, which has been fixed for Neovim nightly/Neovim 0.9.2
2023-09-12 08:36:50 +02:00
Alex Pinkus
96a5024198
feat(swift): update parser and queries
...
Co-authored-by: Alex Pinkus <pinkus@amazon.com>
2023-09-10 19:38:36 +02:00