Add pug to helix

main
Julius Riegel 5 months ago
parent 32fe43e868
commit be09c938ad

@ -8,6 +8,7 @@ cursorline = true
color-modes = true
bufferline = "always"
line-number = "relative"
auto-save = true
[editor.cursor-shape]
insert = "bar"

@ -21,6 +21,11 @@ disableSuggestions = true
command = "nu"
args = ["-I", "~/.config/nushell/scripts", "--lsp"]
[language-server.pug-lsp]
command = "pug-lsp"
args = []
# languages
[[language]]
@ -108,3 +113,31 @@ name = "markdown"
# formatter = { command = "comrak", args = ["-t", "commonmark", "--gfm", "--unsafe", "-e", "table"] }
formatter = { command = "prettier", args = ["--stdin-filepath=source.md"] }
[[language]]
name = "kdl"
auto-format = true
formatter = { command = "kdlfmt" }
[[language]]
name = "pug"
language-servers = ["pug-lsp"]
auto-format = true
indent = { tab-width = 4, unit = " " }
file-types = ["pug"]
scope = "source.pug"
comment-token = "//"
roots = []
grammar = "pug"
[language.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'
[[grammar]]
name = "pug"
source = { git = "https://github.com/zealot128/tree-sitter-pug", rev = "a7ff31a38908df9b9f34828d21d6ca5e12413e18" }

@ -0,0 +1,54 @@
(comment) @comment
(tag_name) @constant
(
(tag_name) @constant.builtin
; https://www.script-example.com/html-tag-liste
(#any-of? @constant.builtin
"head" "title" "base" "link" "meta" "style"
"body" "article" "section" "nav" "aside" "h1" "h2" "h3" "h4" "h5" "h6" "hgroup" "header" "footer" "address"
"p" "hr" "pre" "blockquote" "ol" "ul" "menu" "li" "dl" "dt" "dd" "figure" "figcaption" "main" "div"
"a" "em" "strong" "small" "s" "cite" "q" "dfn" "abbr" "ruby" "rt" "rp" "data" "time" "code" "var" "samp" "kbd" "sub" "sup" "i" "b" "u" "mark" "bdi" "bdo" "span" "br" "wbr"
"ins" "del"
"picture" "source" "img" "iframe" "embed" "object" "param" "video" "audio" "track" "map" "area"
"table" "caption" "colgroup" "col" "tbody" "thead" "tfoot" "tr" "td" "th"
"form" "label" "input" "button" "select" "datalist" "optgroup" "option" "textarea" "output" "progress" "meter" "fieldset" "legend"
"details" "summary" "dialog"
"script" "noscript" "template" "slot" "canvas")
)
(content) @none
(id) @attribute
(class) @attribute
(quoted_attribute_value) @string
(attribute_name) @symbol
(
(attribute_name) @keyword
(#match? @keyword "^(\\(.*\\)|\\[.*\\]|\\*.*)$")
) @keyword
(attributes (attribute ("=")@operator))
(buffered_code ("=")@operator)
[
":"
"{{"
"}}"
"+"
"|"
] @punctuation.delimiter
(keyword) @keyword
((keyword) @include (#eq? @include "include"))
((keyword) @repeat (#any-of? @repeat "for" "each" "of" "in" "while"))
((keyword) @conditional (#any-of? @conditional "if" "else" "else if" "unless"))
((keyword) @keyword.function (#any-of? @keyword.function "block" "mixin"))
(doctype) @keyword
(doctype_name) @variable.parameter
(filter_name) @method.call
(mixin_use (mixin_name) @method.call)
(mixin_definition (mixin_name) @function)

@ -0,0 +1,2 @@
((javascript) @injection.content
(#set! injection.language "javascript"))

@ -12,6 +12,7 @@
"string.regexp" = { fg = "red" }
"tag" = { fg = "pink" }
"attribute" = { fg = "cyan" }
"symbol" = { fg = "cyan" }
"type" = { fg = "cyan", modifiers = ["italic"] }
"type.enum.variant" = { fg = "foreground", modifiers = ["italic"] }
"variable" = { fg = "foreground" }

@ -67,6 +67,7 @@ config.modules = {
'websocat',
'pandoc',
'anyrun',
'taplo',
},
gui = mod {
'kdePackages.breeze-icons',
@ -119,6 +120,10 @@ config.modules = {
'cargo-release',
'cargo-lambda',
},
go = mod {
'go',
'gopls',
},
lua = mod {
'lua-language-server',
'lua5',

Loading…
Cancel
Save