Commit graph

15 commits

Author SHA1 Message Date
Riley Bruins
9d68e876cc feat: more comment injections 2024-06-15 10:40:34 +02:00
Phạm Huy Hoàng
62b0bb4f24 feat(format): extra newline after modeline 2024-02-29 23:05:30 +09:00
Pham Huy Hoang
57a8acf0c4 chore: query formatting 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
Jaehwang Jung
9567185621 feat: @spell on comments 2023-09-12 17:34:58 +02: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
Saurabh Charde
51d220e0bd feat(scss): add known at-rules to keyword list 2023-01-13 02:46:16 -08:00
Rishi
381573a9d6 Inherit folds for SCSS from CSS 2022-12-23 22:31:52 +01:00
ObserverOfTime
46fe90b35b highlights(scss): fix captures 2022-11-26 13:17:51 +02:00
ObserverOfTime
99547308ac highlights(scss): add function statement 2022-10-15 08:12:55 -07:00
Omer Tuchfeld
2472e47e15 Add highlighting query for Scss @for loops
The Scss language only had highlighting queries for `@each` loops, this
commit adds support for `@for` loops as well.

Also moved all loop-related keywords (including newly added ones) to
`@repeat` rather than `@keyword`
2022-04-03 15:29:13 +02:00
Farbod Salamat-Zadeh
5c30f2af04 highlight: add SCSS single_line_comment 2021-06-15 19:59:45 +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
elianiva
8ac8f2c39b feat: add scss parser 2021-04-08 22:50:41 +02:00