Commit graph

16 commits

Author SHA1 Message Date
Stephan Seitz
b5d05aaac8 yaml(injections): Also add heuristics for Gitlab CI bash 2021-11-28 15:01:34 +01:00
Stephan Seitz
ad615ffc4c injections(yaml): inject bash on key "run" 2021-11-28 15:01:34 +01:00
Santos Gallegos
fe4e4aa286
yaml: improve highlights and locals (#946)
- More scopes
- Highlight strings as strings
- Recognize more keys/fields

Improvements can be seen with this weird yaml:

```yaml
{ foo: bar }
---
{a: [b, c], [d, e]: f}

---
- { single line, a: b}
- { multi
  line, a: b}
---

"fooo": bar
'foo': bar
one: two
```
2021-10-26 22:47:59 -05: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
Santos Gallegos
574bd5ae37
YAML: update queries (#1203)
Closes https://github.com/nvim-treesitter/nvim-treesitter-refactor/issues/18
2021-04-18 21:51:03 +00:00
Santos Gallegos
c3603ddad1
Yaml: update locals (#1172)
The parser doesn't break the symbols in `*` `&` from the name of
anchors/aliases. So go to definition doesn't work, but highlight of
usage does :D

Test with

```yaml
Defaults: &defaults
  Company: foo
  Item: 123

Computer:
  <<: *defaults
  <<: *defaults
  Price: 3000
```

Ref https://github.com/nvim-treesitter/nvim-treesitter-refactor/issues/18
2021-04-09 19:36:19 -05:00
Santos Gallegos
e4083fc8e1
Add comment parser to highlight comment tags (#893)
Closes #236
2021-03-12 11:21:46 -05:00
Santos Gallegos
6301bf7952 YAML: add locals
This is so incremental selection works
2021-02-10 22:25:12 +01:00
Santos Gallegos
bfcf03853f Yaml: fix folds
Fix https://github.com/nvim-treesitter/nvim-treesitter/issues/887

(block_node) includes more nodes to fold, test with:

```yaml
days:
  Monday:
    - test: example
  Tuesday:
    - test: example
  Wednesday:
    - test: example
    - test: example
  Thursday:
    - test: example
  Friday:
    - test: example
    - foo: |
        One
        Two
        Three
```
2021-02-07 15:37:21 +01:00
elianiva
9184cf3953 feat: added more indent queries 2021-01-14 14:43:04 +01:00
elianiva
842077acf7 feat: added more fold queries 2021-01-04 11:51:23 +01:00
David Hotham
cafe733e23 wildcards to capture keys 2020-12-25 15:56:49 +01:00
David Hotham
dc0432aa54 simplify treatement of escape sequences 2020-12-25 15:56:49 +01:00
David Hotham
18fd5709b7 remove plus from list of punctuation 2020-12-25 15:56:49 +01:00
David Hotham
4addec1361 first draft of YAML highlighting 2020-12-25 15:56:49 +01:00