Commit graph

14 commits

Author SHA1 Message Date
sogaiu
66ae8748fd
feat(janet): update highlights (#6789)
Co-authored-by: sogaiu <983021772@users.noreply.github.com>
2024-06-19 22:27:34 +09:00
再生花
31641d72a4
feat(format-scripts): linewrap predicates
"format-ignore".kick()
2024-02-23 10:42:01 +02: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
sogaiu
59f06b3b33 feat(janet): update highlights 2023-08-16 12:23:18 -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
ShellCode33
d9e75a1736 queries/*/highlights.scm : remove @spell for strings 2023-08-07 16:39:40 +01:00
sogaiu
6fe60587d1 Remove some sections and add some missing things
The original approach was to emulate what was in Clojure's
highlights.scm file, but it appears that there were a number of
questionable items, so some sections were removed.

As a consequence, there were some items that ended up unmentioned.  An
attempt was made to rescue most of these and add some missing items to
a renamed "Special forms and builtin macros" section.

Five items were removed entirely.  These are:

* Single quote
* Tilde
* Pipe
* Comma
* Semicolon

It was unclear where to put these and it's also unclear whether
highlighting them would really be beneficial.  Perhaps what to do, if
anything, will become clear in the future.
2023-04-30 22:06:17 -04:00
sogaiu
b9d183c2c5 Update list of functions 2023-04-30 22:06:17 -04:00
sogaiu
0d61fdae11 Adjust indentation 2023-04-30 22:06:17 -04:00
sogaiu
c780ba9b6c Update list of macros 2023-04-30 22:06:17 -04:00
sogaiu
8db7eeba9d Use 2 semicolons for better editor interop 2023-04-30 22:06:17 -04:00
sogaiu
93b540f917 feat: add janet_simple 2023-04-30 22:06:17 -04:00