Add support for hyprland config (#9899)

* feat: add hyprland config language

* adjust indents to helix

* adjust highlights to helix
This commit is contained in:
Arthur Deierlein 2024-03-17 23:53:30 +01:00 committed by GitHub
parent 61f7d9ce2f
commit 9ec0271873
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 80 additions and 0 deletions

View file

@ -77,6 +77,7 @@
| hosts | ✓ | | | | | hosts | ✓ | | | |
| html | ✓ | | | `vscode-html-language-server` | | html | ✓ | | | `vscode-html-language-server` |
| hurl | ✓ | | ✓ | | | hurl | ✓ | | ✓ | |
| hyprlang | ✓ | | ✓ | |
| idris | | | | `idris2-lsp` | | idris | | | | `idris2-lsp` |
| iex | ✓ | | | | | iex | ✓ | | | |
| ini | ✓ | | | | | ini | ✓ | | | |

View file

@ -3284,3 +3284,15 @@ indent = { tab-width = 2, unit = " " }
[[grammar]] [[grammar]]
name = "ld" name = "ld"
source = { git = "https://github.com/mtoohey31/tree-sitter-ld", rev = "81978cde3844bfc199851e39c80a20ec6444d35e" } source = { git = "https://github.com/mtoohey31/tree-sitter-ld", rev = "81978cde3844bfc199851e39c80a20ec6444d35e" }
[[language]]
name = "hyprlang"
scope = "source.hyprlang"
roots = ["hyprland.conf"]
file-types = [ { glob = "hyprland.conf"} ]
comment-token = "#"
grammar = "hyprlang"
[[grammar]]
name = "hyprlang"
source = { git = "https://github.com/tree-sitter-grammars/tree-sitter-hyprlang", rev = "27af9b74acf89fa6bed4fb8cb8631994fcb2e6f3"}

View file

@ -0,0 +1,58 @@
(comment) @comment
[
"source"
"exec"
"exec-once"
] @function.builtin
(keyword
(name) @keyword)
(assignment
(name) @variable.other.member)
(section
(name) @namespace)
(section
device: (device_name) @type)
(variable) @variable
"$" @punctuation.special
(boolean) @constant.builtin.boolean
(string) @string
(mod) @constant
[
"rgb"
"rgba"
] @function.builtin
[
(number)
(legacy_hex)
(angle)
(hex)
] @constant.numeric
"deg" @type
"," @punctuation.delimiter
[
"("
")"
"{"
"}"
] @punctuation.bracket
[
"="
"-"
"+"
] @operator

View file

@ -0,0 +1,6 @@
(section) @indent
(section
"}" @outdent)
"}" @extend

View file

@ -0,0 +1,3 @@
(exec
(string) @injection.content
(#set! injection.language "bash"))