aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/erlang/highlights.scm
Commit message (Collapse)AuthorAge
* Update tree-sitter-erlang and highlightsMichael Davis2024-03-21
| | | | | | | | | | | | | | | | | | A few changes: * 0-arity type specs like the following previously would not have the expected 'variable.parameter' highlighting for the return type: -spec foo() -> Value when Value :: term(). * Highlight module, type and function docs as documentation comments and inject markdown into them. * Replace `#match?` predicates with `#any-of?` where possible. * Remove custom auto-pairs. Now that Erlang uses markdown for documentation, the asciidoc-style backtick-singlequote pair is no longer useful.
* Bump tree-sitter-erlang, add `*.app.src` file-type (#9627)Michael Davis2024-02-14
|
* Update Erlang highlightsMichael Davis2023-03-14
| | | | | | | * Macros that start with underscore were incorrectly marked as 'comment.unused' rather than 'keyword.directive' due to an ordering issue of those two patterns. * Recognize escripts as Erlang by the shebang.
* Add parameter highlights to ErlangMichael Davis2022-11-24
| | | | | | | This doesn't work robustly (within pattern matches). Only regular bindings are highlighted as parameters. In order to highlight all parameters even in matches, we would need an arbitrary nesting operator in queries which doesn't exist yet in tree-sitter.
* Improve Edoc highlighting within ErlangMichael Davis2022-11-24
| | | | | | This highlights edoc within Erlang comments. The trick was to have the Erlang grammar consume newlines and then give them to EDoc in the injection to use so that line-wise elements could be parsed accurately.
* erlang: Fix highlighting of empty recordsMichael Davis2022-08-31
| | | | | | | | | | For example -record(state, {}) Would not highlight `state` as a type since the alternation didn't allow for an empty tuple. Allowing the inner atom of the tuple to be optional fixes this case.
* erlang: highlight modules in behaviour attributesMichael Davis2022-07-01
|
* erlang: highlight records with macro namesMichael Davis2022-07-01
| | | | | | | | | You might use a macro like `?MODULE` to name a record: -record(?MODULE, {a, b, c}). With this fix, the record fields correctly get `variable.other.member` highlights.
* erlang: fix '#match?' for specs/callbacksMichael Davis2022-07-01
|
* replace module captures with namespaceMichael Davis2022-07-01
| | | | | | `module` is undocumented and does not exist in other themes. The equivalent existing scope based on usage (Elixir for example) is `namespace`.
* erlang: highlight unary '#' as punctuation.bracketMichael Davis2022-07-01
| | | | | | | | | | | | | | | | | | The '#' character may either be interpreted as a map when used like so: %% Example 1 #{a => b} Or as an operator which updates an existing map when the left-hand side is an expression: %% Example 2 MyMap#{a => b} This commit changes the highlight to `punctuation.bracket` when used as a character in a literal map (example 1) and keeps the `operator` highlight when used for updating (example 2).
* erlang: highlight nullary macros as constantsMichael Davis2022-07-01
|
* add textobject queries for erlangMichael Davis2022-06-07
|
* update Erlang grammar and queriesMichael Davis2022-05-25
| | | | | | | | | | | | | The update to the grammar itself covers the case where the document is a single expression without a trailing newline such as "min(A, B)". A small change to the parser now parses these expressions correctly which improves the display of the function head in the signature help popup. The update to the queries marks 'andalso', 'orelse', 'not', etc. as `@keyword.operator` which improves the look - it looks odd to see operators that are words highlighted the same as tokens like '->' or '=:='.
* Update tree-sitters Erlang and HEEx (#2149)Michael Davis2022-04-17
|
* update tree-sitter-erlangMichael Davis2022-03-30
| | | | | | | | | changes: - typed fields within records which do not declare a default value are now correctly highlighted as record fields - the EEP49 'maybe' form is now parsed - fixes for highlights for 'begin' and 'after' tokens
* add tree-sitter-erlang (#1657)Michael Davis2022-02-15