summaryrefslogtreecommitdiff
path: root/dot-config/helix/languages.toml
blob: d0bcab0cd04f9fa5fafba05ef40485d42fb0958a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
[[language]]
name = "rust"
formatter = { command = "rustfmt" }
rulers = [80, 100]

[[language]]
name = "nix"
formatter = { command = "nixfmt" }
auto-format = true

[[language]]
name = "typst"
formatter = { command="typstyle" }
auto-format = true
rulers = [80]

[[language]]
name = "astro"
language-servers = [ "astro-ls" ]
formatter = { command = "prettier", args = ["--plugin", "prettier-plugin-astro", "--parser", "astro"] }
auto-format = true

[language-server.astro-ls]
command = "astro-ls"
args = ["--stdio"]
# because astro-ls requires the path to typescript,
# hx must be started within the Astro project root for this to work
# see https://github.com/helix-editor/helix/discussions/4743
config = { "typescript" = { "tsdk" = "./node_modules/typescript/lib" } }

[[language]]
name = "html"
formatter = { command="prettier", args = ["--parser", "html"] }
auto-format = true

[[language]]
name = "css"
formatter = { command="prettier", args = ["--parser", "css"] }
auto-format = true

[[language]]
name = "javascript"
formatter = { command="prettier", args = ["--parser", "babel"] }
auto-format = true

[[language]]
name = "typescript"
formatter = { command="prettier", args = ["--parser", "typescript"] }
auto-format = true

[[language]]
name = "jsx"
formatter = { command="prettier", args = ["--parser", "babel"] }
auto-format = true