From 22552e9c2592d10c33f7f09f89ad96b3a0396913 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Fri, 31 May 2024 12:28:17 +0200 Subject: [PATCH] feat: add tmpl Signed-off-by: kjuulh --- dot_config/helix/languages.toml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/dot_config/helix/languages.toml b/dot_config/helix/languages.toml index 76cab00..75a4f54 100644 --- a/dot_config/helix/languages.toml +++ b/dot_config/helix/languages.toml @@ -22,9 +22,9 @@ injection-regex = "graphql" file-types = ["graphql", "gql"] auto-format = true comment-token = "//" -language-servers = [ "graphql-language-service" ] -indent = {tab-width = 2, unit = " "} -formatter = { command = "prettier", args = ["--parser=graphql"]} +language-servers = ["graphql-language-service"] +indent = { tab-width = 2, unit = " " } +formatter = { command = "prettier", args = ["--parser=graphql"] } [language-server.graphql-language-service] command = "graphql-lsp" @@ -37,7 +37,7 @@ auto-format = true [[grammar]] name = "graphql" -source = {git = "https://github.com/bkegley/tree-sitter-graphql", rev = "5e66e961eee421786bdda8495ed1db045e06b5fe"} +source = { git = "https://github.com/bkegley/tree-sitter-graphql", rev = "5e66e961eee421786bdda8495ed1db045e06b5fe" } [[language]] name = "typescript" @@ -46,7 +46,7 @@ injection-regex = "(ts|typescript)" file-types = ["ts", "mts", "cts"] language-id = "typescript" shebangs = ["deno", "ts-node"] -language-servers = [ "typescript-language-server" ] +language-servers = ["typescript-language-server"] indent = { tab-width = 2, unit = " " } formatter = { command = 'prettier', args = ["--parser", "typescript"] } auto-format = true @@ -67,3 +67,13 @@ name = "binary" [language.debugger.templates.args] program = "{0}" runInTerminal = true + +[[language]] +name = "gotmpl" +scope = "source.gotmpl" +injection-regex = "gotmpl" +file-types = ["gotmpl", "tmpl"] +comment-token = "//" +block-comment-tokens = { start = "/*", end = "*/" } +language-servers = ["gopls"] +indent = { tab-width = 2, unit = " " }