Fix tree-sitter highlighting

main
Julius Riegel 5 months ago
parent be09c938ad
commit 31d90b776e

@ -26,6 +26,11 @@ args = ["-I", "~/.config/nushell/scripts", "--lsp"]
command = "pug-lsp" command = "pug-lsp"
args = [] args = []
[language-server.vls]
command = "vls"
args = []
# languages # languages
[[language]] [[language]]
@ -141,3 +146,29 @@ grammar = "pug"
[[grammar]] [[grammar]]
name = "pug" name = "pug"
source = { git = "https://github.com/zealot128/tree-sitter-pug", rev = "a7ff31a38908df9b9f34828d21d6ca5e12413e18" } source = { git = "https://github.com/zealot128/tree-sitter-pug", rev = "a7ff31a38908df9b9f34828d21d6ca5e12413e18" }
[[language]]
name = "jora"
injection-regex = "(jr|jora)"
auto-format = true
indent = { tab-width = 4, unit = " " }
file-types = ["jora"]
scope = "source.jora"
comment-token = "//"
roots = []
grammar = "jora"
[[grammar]]
name = "jora"
# source = { git = "git@gitlab.unitb.com:jri/tree-sitter-jora.git", rev = "3c65fd8a368818a2300ac4dee8f4801db9dd28e1" }
source = { path = "/home/jri/Dokumente/Programming/sonstiges/tree-sitter-jora"}
[[language]]
name = "vue"
auto-format = true
formatter = { command = "biome" , args = ["format", "--stdin-file-path=file.vue"] }
language-servers = [ "vls" ]

@ -0,0 +1,39 @@
[
"{"
"}"
] @punctuation.bracket
(enclosed ["(" ")"] @punctuation.bracket )
(call ["(" ")"] @punctuation.bracket )
(function_name) @function
[
","
":"
"."
] @punctuation.delimiter
["|" "+" "-" "*" "/" "??" "..."] @operator
[
(true)
(false)
(null)
(undefined)
(this)
(root)
] @constant.builtin
(string) @string
(number) @constant.numeric.integer
(property_identifier) @variable.other.member
(dot (identifier) @variable.other.member)
(identifier) @variable
(variable) @variable

@ -0,0 +1,10 @@
(spread
(identifier) @local.definition)
(object
(object_property) @local.definition)
(array
(identifier) @local.definition)
(identifier) @local.reference

@ -16,6 +16,7 @@
"type" = { fg = "cyan", modifiers = ["italic"] } "type" = { fg = "cyan", modifiers = ["italic"] }
"type.enum.variant" = { fg = "foreground", modifiers = ["italic"] } "type.enum.variant" = { fg = "foreground", modifiers = ["italic"] }
"variable" = { fg = "foreground" } "variable" = { fg = "foreground" }
"variable.other.member" = { fg = "foreground_tint" }
"variable.builtin" = { fg = "cyan", modifiers = ["italic"] } "variable.builtin" = { fg = "cyan", modifiers = ["italic"] }
"variable.parameter" = { fg ="orange", modifiers = ["italic"] } "variable.parameter" = { fg ="orange", modifiers = ["italic"] }
"mustache_statement" = { fg = "green" } "mustache_statement" = { fg = "green" }
@ -79,6 +80,7 @@ rainbow = ["#7c5ea3", "#9c5b95", "#9c5e80", "#6b4466"]
background = "#3A2A4D" background = "#3A2A4D"
background_dark = "#2B1C3D" background_dark = "#2B1C3D"
foreground = "#f8f8f2" foreground = "#f8f8f2"
foreground_tint = "#f2d4fe"
ruler = "#453254" ruler = "#453254"
comment = "#886C9C" comment = "#886C9C"
hint = "#8a56b0" hint = "#8a56b0"

@ -1,4 +1,7 @@
$env.PATH = ( $env.PATH $env.PATH = ( $env.PATH
{{#if-installed node}}
| prepend './node_modules/.bin'
{{/if-installed}}
| prepend $'{{dirs.home}}/.local/bin' | prepend $'{{dirs.home}}/.local/bin'
{{#if-installed nenv}} {{#if-installed nenv}}
| prepend $'{{dirs.home}}/.local/share/nenv/bin' | prepend $'{{dirs.home}}/.local/share/nenv/bin'
@ -12,4 +15,5 @@ $env.PATH = ( $env.PATH
{{#if-installed cargo}} {{#if-installed cargo}}
| prepend $'{{dirs.home}}/.cargo/bin' | prepend $'{{dirs.home}}/.cargo/bin'
{{/if-installed}} {{/if-installed}}
| prepend '{{dirs.home}}/.sst/bin'
) )

@ -111,6 +111,9 @@ config.modules = {
'vscode-langservers-extracted', 'vscode-langservers-extracted',
'nodePackages.typescript-language-server', 'nodePackages.typescript-language-server',
}, },
vue = mod {
'nodePackages.vls',
},
deno = mod { deno = mod {
'deno' 'deno'
}, },

Loading…
Cancel
Save