Skip to content

Commit

Permalink
update tree-sitter-elixir
Browse files Browse the repository at this point in the history
news:

- tree-sitter-elixir now powers Elixir syntax highlighting on github.com
- GitHub now supports code-navigation for Elixir repos via
  tree-sitter-elixir

changes:

- modules now use the `@module` highlight, which was added upstream to
  tree-sitter
    - it seems appropriate to use `@namespace` to follow helix convention
- added nullary range operator (e.g. `Enum.to_list(..) == []`), a new syntax
  for elixir 1.14
- a fix for stab clause nodes mis-highlighting when the right hand side of
  the stab clause contained multiple simple expressions
  • Loading branch information
the-mikedavis authored and archseer committed Mar 30, 2022
1 parent e2a5071 commit 1819478
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ source = { git = "https://github.com/yusdacra/tree-sitter-protobuf", rev = "19c2
[[language]]
name = "elixir"
scope = "source.elixir"
injection-regex = "elixir"
file-types = ["ex", "exs"]
injection-regex = "(elixir|ex)"
file-types = ["ex", "exs", "mix.lock"]
shebangs = ["elixir"]
roots = []
comment-token = "#"
Expand All @@ -88,7 +88,7 @@ indent = { tab-width = 2, unit = " " }

[[grammar]]
name = "elixir"
source = { git = "https://github.com/elixir-lang/tree-sitter-elixir", rev = "f5d7bda543da788bd507b05bd722627dde66c9ec" }
source = { git = "https://github.com/elixir-lang/tree-sitter-elixir", rev = "60863fc6e27d60cf4b1917499ed2259f92c7800e" }

[[language]]
name = "fish"
Expand Down
4 changes: 2 additions & 2 deletions runtime/queries/elixir/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@
(integer) @constant.numeric.integer
(float) @constant.numeric.float

(alias) @type
(alias) @namespace

(call
target: (dot
left: (atom) @type))
left: (atom) @namespace))

(char) @constant.character

Expand Down

0 comments on commit 1819478

Please sign in to comment.