aboutsummaryrefslogtreecommitdiffstats
path: root/queries/ocaml
Commit message (Collapse)AuthorAgeFilesLines
* feat!: drop modules, general refactor and cleanupChristian Clason2025-05-125-525/+0
|
* feat(highlights): capture wildcard patterns as `@character.special` (#7153)Omar Valdez2024-09-201-0/+6
|
* refactor(queries): Remove quotes from properties in set! directiveOmar Valdez2024-07-281-1/+1
|
* feat(predicates)!: rename `has-type` to `kind-eq` to align with HelixChristian Clason2024-06-021-1/+1
| | | | No point in having a different name for the same predicate.
* feat: more `@keyword.type` capturesRiley Bruins2024-05-011-4/+7
|
* refactor(format): drop extra indentation for fieldPhạm Huy Hoàng2024-03-212-21/+15
|
* feat(highlights)!: keyword `@type.qualifier` → `@keyword.modifier`Jaehwang Jung2024-03-161-1/+1
|
* feat(format-scripts): linewrap predicates再生花2024-02-231-1/+3
| | | "format-ignore".kick()
* fix(highlights): improve member/property distinctionObserverOfTime2024-01-191-5/+8
|
* fix(highlights): improve consistencyObserverOfTime2024-01-191-1/+2
|
* chore: query formattingPham Huy Hoang2024-01-194-97/+259
|
* refactor: manual pre-cleanupPham Huy Hoang2024-01-191-0/+1
| | | | | Moving comments, adding `format-ignore` to lines that will be better with it
* feat!: align standard captures with upstreamChristian Clason2024-01-191-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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" (https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/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`
* feat(locals)!: switch to upstream capturesChristian Clason2024-01-191-17/+17
|
* refactor: Remove all `(ERROR) @error` capturesPham Huy Hoang2023-10-251-2/+0
| | | | | | | | | | | | 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.
* feat(ocaml): use @function.call where appropriateJaehwang Jung2023-10-031-3/+3
|
* feat: @spell on commentsJaehwang Jung2023-09-121-1/+1
|
* chore(injections)!: update injection syntax to 0.9Pham Huy Hoang2023-08-121-1/+2
| | | | | | | | | 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
* lint(locals): use `#set!` to keep query linter happyChristian Clason2023-06-221-9/+9
|
* highlights(ocaml): update operators (#4878)Pieter Goetschalckx2023-06-011-13/+13
| | | | | * Update ocaml highlights * Don't capture operator twice
* feat: add indents for ocaml and ocaml interface (#4725)Pham Huy Hoang2023-05-011-0/+69
|
* perf: remove match where possibleAmaan Qureshi2023-04-211-4/+2
|
* highlights(ocaml): use more specific groupsObserverOfTime2022-11-261-5/+10
|
* fix(ocaml): change query order for VariablesRobin Björklin2022-10-251-7/+7
| | | | | | By moving the Variables query higher it gives the @variable capture group a lower precedence when highlighting. This makes it possible to distinguish between @function and @variable.
* highlights(ocaml): highlight units as suchPau Ruiz Safont2022-05-061-1/+2
| | | | | | | | Units were shadowed by the punctuation highlights in all situations. Restrict the context where parentheses are highlighted as punctuation so () can be highlighted as constants. Signed-off-by: Pau Ruiz Safont <unduthegun@gmail.com>
* OCaml string format specifiersDawid Zych2021-12-021-1/+1
| | | | | For format specifiers use @string.special instead of @punctuation.special.
* OCaml use @constant.builtin for built in constantssilenc3r2021-12-011-1/+3
|
* Use `@keyword.function` consistentlySergio Alejandro Vargas2021-07-061-1/+3
|
* Use #any-of? instead of #match? where posibleJoakker2021-06-251-1/+4
|
* highlights(ocaml): add hash and sign operatorsPau Ruiz Safont2021-05-111-0/+2
|
* Revert "Comment: use `@combined` to create just one tree per buffer (#1252)"Santos Gallegos2021-05-071-1/+1
| | | | This reverts commit 4a7a713c527f57c355bc817f16fc6d955b8cce9b.
* Comment: use `@combined` to create just one tree per buffer (#1252)Santos Gallegos2021-04-281-1/+1
| | | | | | | | | | | | * 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
* Re-add OCaml query that lead to crash before tree-sitter fixStephan Seitz2021-03-161-2/+1
| | | | Ref: https://github.com/tree-sitter/tree-sitter/issues/968#issuecomment-792932744
* Fix ocaml queriesStephan Seitz2021-03-161-2/+4
|
* Add comment parser to highlight comment tags (#893)Santos Gallegos2021-03-121-0/+1
| | | Closes #236
* highlights(ocaml): change order or capturesPau Ruiz Safont2021-02-281-24/+24
| | | | | | | This because the later captures have more priority in neovim, not less like in upstream. This fixes highlighting highlighting for let* and +, for example.
* highlights(ocaml): add unit and pretty_printing_indicationPau Ruiz Safont2021-02-281-2/+5
|
* fix(highlights): Add TSNamespace highlightStephan Seitz2020-10-101-1/+1
| | | | | | | | | Start adding highlights for - C++ - Rust (including other scoped_identifier/scoped_type_identifier fixes) - JS (only namespace_import) Addresses #516
* fix(ocaml): highlight characters as suchPau Ruiz Safont2020-10-041-1/+3
|
* Add OCaml foldsPieter Goetschalckx2020-09-211-0/+30
|
* Improve OCaml localsPieter Goetschalckx2020-09-211-3/+58
|
* Improve OCaml highlightsPieter Goetschalckx2020-09-211-3/+1
|
* ocaml: follow upstream for highlightsPau Ruiz Safont2020-09-191-6/+3
|
* ocaml: follow upstream for highlightsPau Ruiz Safont2020-09-191-5/+7
|
* fix ocaml highlightsPau Ruiz Safont2020-09-121-3/+7
| | | | | Function matching was wrongly parenthesized, parameter detection was too eager and it was wrongly matching all + and - as delimiters
* maintenance(ocaml): adapt queries to nvim-treesitterPau Ruiz Safont2020-09-113-127/+33
|
* feat(queries): pull ocaml queries from upstreamPau Ruiz Safont2020-09-113-117/+244
|
* fix: ocaml highlightPau Ruiz Safont2020-09-061-2/+1
| | | | | The string.special group was removed from highlight.lua, replace its uses by the string group.
* Fix filenamePieter Goetschalckx2020-09-051-0/+0
|
* feat(highlights): add ocamlPau Ruiz Safont2020-08-241-0/+147