aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaan Qureshi <amaanq12@gmail.com>2023-01-29 12:03:04 -0500
committerObserverOfTime <chronobserver@disroot.org>2023-01-30 09:45:17 +0200
commitcbb43a64a3b44fe50153b0f48d49452663d42dc9 (patch)
treecb6bd5755ef28689a1bea6a07e7ed5bdb68c75c9
parentUpdate parsers: capnp, cuda, kdl, thrift (diff)
downloadnvim-treesitter-cbb43a64a3b44fe50153b0f48d49452663d42dc9.tar
nvim-treesitter-cbb43a64a3b44fe50153b0f48d49452663d42dc9.tar.gz
nvim-treesitter-cbb43a64a3b44fe50153b0f48d49452663d42dc9.tar.bz2
nvim-treesitter-cbb43a64a3b44fe50153b0f48d49452663d42dc9.tar.lz
nvim-treesitter-cbb43a64a3b44fe50153b0f48d49452663d42dc9.tar.xz
nvim-treesitter-cbb43a64a3b44fe50153b0f48d49452663d42dc9.tar.zst
nvim-treesitter-cbb43a64a3b44fe50153b0f48d49452663d42dc9.zip
feat: add elsa
-rw-r--r--README.md1
-rw-r--r--lockfile.json3
-rw-r--r--lua/nvim-treesitter/parsers.lua8
-rw-r--r--queries/elsa/highlights.scm41
4 files changed, 53 insertions, 0 deletions
diff --git a/README.md b/README.md
index eb1628e8c..85f014b79 100644
--- a/README.md
+++ b/README.md
@@ -202,6 +202,7 @@ We are looking for maintainers to add more parsers and to write query files for
- [x] [eex](https://github.com/connorlay/tree-sitter-eex) (maintained by @connorlay)
- [x] [elixir](https://github.com/elixir-lang/tree-sitter-elixir) (maintained by @connorlay)
- [x] [elm](https://github.com/elm-tooling/tree-sitter-elm) (maintained by @zweimach)
+- [x] [elsa](https://github.com/glapa-grossklag/tree-sitter-elsa) (maintained by @glapa-grossklag, @amaanq)
- [x] [elvish](https://github.com/ckafi/tree-sitter-elvish) (maintained by @ckafi)
- [ ] [embedded_template](https://github.com/tree-sitter/tree-sitter-embedded-template)
- [x] [erlang](https://github.com/WhatsApp/tree-sitter-erlang) (maintained by @filmor)
diff --git a/lockfile.json b/lockfile.json
index e3f22b872..0f7dc27db 100644
--- a/lockfile.json
+++ b/lockfile.json
@@ -89,6 +89,9 @@
"elm": {
"revision": "28bb193640d916dfaf947912c1413cebb0484841"
},
+ "elsa": {
+ "revision": "86fb3dbe8462f299dfc9a93c718a11363d69e90f"
+ },
"elvish": {
"revision": "f32711e31e987fd5c2c002f3daba02f25c68672f"
},
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua
index f5d1abad8..a59f155a1 100644
--- a/lua/nvim-treesitter/parsers.lua
+++ b/lua/nvim-treesitter/parsers.lua
@@ -201,6 +201,14 @@ list.d = {
experimental = true,
}
+list.elsa = {
+ install_info = {
+ url = "https://github.com/glapa-grossklag/tree-sitter-elsa",
+ files = { "src/parser.c" },
+ },
+ maintainers = { "@glapa-grossklag", "@amaanq" },
+}
+
list.glsl = {
install_info = {
url = "https://github.com/theHamsta/tree-sitter-glsl",
diff --git a/queries/elsa/highlights.scm b/queries/elsa/highlights.scm
new file mode 100644
index 000000000..7021a0970
--- /dev/null
+++ b/queries/elsa/highlights.scm
@@ -0,0 +1,41 @@
+; Keywords
+
+[
+ "eval"
+ "let"
+] @keyword
+
+; Function
+
+(function) @function
+
+; Method
+
+(method) @method
+
+; Parameter
+
+(parameter) @parameter
+
+; Variables
+
+(identifier) @variable
+
+; Operators
+
+[
+ "\\"
+ "->"
+ "="
+ (step)
+] @operator
+
+; Punctuation
+
+["(" ")"] @punctuation.bracket
+
+":" @punctuation.delimiter
+
+; Comments
+
+(comment) @comment