Add better env highlighting

main
trivernis 5 months ago
parent 777b3743ab
commit 66e2d709d9
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -26,6 +26,12 @@ args = ["-I", "~/.config/nushell/scripts", "--lsp"]
command = "pug-lsp"
args = []
[language-server.astro-lsp]
command = "/usr/lib/node_modules/@astrojs/language-server/bin/nodeServer.js"
args = ["--stdio"]
# languages
[[language]]
@ -141,3 +147,12 @@ grammar = "pug"
[[grammar]]
name = "pug"
source = { git = "https://github.com/zealot128/tree-sitter-pug", rev = "a7ff31a38908df9b9f34828d21d6ca5e12413e18" }
[[language]]
name = "astro"
language-servers = [ "astro-lsp" ]
[[language]]
name = "env"
file-types = [{ glob = ".env" }, { glob = ".env.*" }, { glob = ".envrc" }, { glob = ".envrc.*" }, { glob = "*.env" }]

@ -0,0 +1,70 @@
[
(string)
(raw_string)
(heredoc_body)
(heredoc_start)
] @string
(command_name) @function
(variable_name) @variable.other.member
[
"if"
"then"
"else"
"elif"
"fi"
"case"
"in"
"esac"
] @keyword.control.conditional
[
"for"
"do"
"done"
"select"
"until"
"while"
] @keyword.control.repeat
[
"declare"
"typeset"
"export"
"readonly"
"local"
"unset"
"unsetenv"
] @keyword
"function" @keyword.function
(comment) @comment
(function_definition name: (word) @function)
(file_descriptor) @constant.numeric.integer
[
(command_substitution)
(process_substitution)
(expansion)
]@embedded
[
"$"
"&&"
">"
">>"
"<"
"|"
"="
(expansion_flags)
] @operator
(
(command (_) @constant)
(#match? @constant "^-")
)

@ -89,3 +89,8 @@ if $env.NIX_PATH? != null {
{{#if-installed zoxide}}
zoxide init nushell | save -f ~/.zoxide.nu
{{/if-installed}}
{{#if-installed ltex-ls}}
$env.LTEX_GLOBAL_STORAGE_PATH = "{{dirs.data}}/ltex/"
{{/if-installed}}

@ -24,12 +24,8 @@ config.wezterm = { font_size = 12 }
-- all software modules / package groups
config.modules = {
core = default_mod {
'nushell',
'starship',
'wezterm',
'helix',
'zellij',
'broot',
'yazi',
'bottom',
'thefuck',
@ -88,6 +84,10 @@ config.modules = {
'spotify',
'libsForQt5.plasma-browser-integration',
'vale',
'nushell',
'helix',
'zellij',
'broot',
},
docker = mod {
'docker',

Loading…
Cancel
Save