Some deno language server config for helix
This commit is contained in:
parent
42333882b2
commit
ddb4d992ee
1 changed files with 63 additions and 28 deletions
|
@ -159,13 +159,17 @@ in
|
||||||
command = "lexical";
|
command = "lexical";
|
||||||
args = [ "start" ];
|
args = [ "start" ];
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
language-server = {
|
|
||||||
next-ls = {
|
next-ls = {
|
||||||
command = "next-ls";
|
command = "next-ls";
|
||||||
args = [ "--stdout" ];
|
args = [ "--stdout" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
deno = {
|
||||||
|
command = "deno";
|
||||||
|
args = [ "lsp" ];
|
||||||
|
config = { enable = true; lint = true; unstable = true; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
language = [
|
language = [
|
||||||
|
@ -194,20 +198,63 @@ in
|
||||||
unit = "\t";
|
unit = "\t";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# TODO: deno:
|
|
||||||
#[[language]]
|
{
|
||||||
#name = "javascript"
|
name = "javascript";
|
||||||
#scope = "source.js"
|
language-id = "javascript";
|
||||||
#injection-regex = "^(js|javascript)$"
|
grammar = "javascript";
|
||||||
#file-types = [ "js", "jsx", "mjs" ]
|
scope = "source.js";
|
||||||
#shebangs = [ "deno", "node" ]
|
injection-regex = "^(js|javascript)$";
|
||||||
#roots = [ "deno.jsonc", "deno.json", "package.json", "tsconfig.json" ]
|
file-types = [ "js" "mjs" ];
|
||||||
#comment-token = "//"
|
shebangs = [ "deno" ];
|
||||||
# config = { enable = true, lint = true, unstable = true }
|
language-servers = [ "deno" ];
|
||||||
# language-server = { command = "typescript-language-server", args = ["--stdio"], language-id = "javascript" }
|
roots = [ "deno.jsonc" "deno.json" ];
|
||||||
#indent = {
|
formatter = {
|
||||||
#tab-width = 2, unit = "\t" }
|
command = "deno";
|
||||||
#auto-format = true
|
args = [ "fmt" ];
|
||||||
|
};
|
||||||
|
auto-format = true;
|
||||||
|
comment-token = "//";
|
||||||
|
indent = {
|
||||||
|
tab-width = 2;
|
||||||
|
unit = "\t";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "typescript";
|
||||||
|
language-id = "typescript";
|
||||||
|
grammar = "typescript";
|
||||||
|
scope = "source.ts";
|
||||||
|
injection-regex = "^(ts|typescript)$";
|
||||||
|
file-types = [ "ts" ];
|
||||||
|
shebangs = [ "deno" ];
|
||||||
|
language-servers = [ "deno" ];
|
||||||
|
roots = [ "deno.jsonc" "deno.json" ];
|
||||||
|
formatter = {
|
||||||
|
command = "deno";
|
||||||
|
args = [ "fmt" ];
|
||||||
|
};
|
||||||
|
auto-format = true;
|
||||||
|
comment-token = "//";
|
||||||
|
indent = {
|
||||||
|
tab-width = 2;
|
||||||
|
unit = "\t";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "jsonc";
|
||||||
|
language-id = "json";
|
||||||
|
grammar = "jsonc";
|
||||||
|
scope = "source.jsonc";
|
||||||
|
injection-regex = "^(jsonc)$";
|
||||||
|
roots = [ "deno.jsonc" "deno.json" ];
|
||||||
|
file-types = [ "jsonc" ];
|
||||||
|
language-servers = [ "deno" ];
|
||||||
|
indent = { tab-width = 2; unit = " "; };
|
||||||
|
auto-format = true;
|
||||||
|
}
|
||||||
|
|
||||||
# [[language]]
|
# [[language]]
|
||||||
# name = "jsx"
|
# name = "jsx"
|
||||||
|
@ -223,18 +270,6 @@ in
|
||||||
# grammar = "javascript"
|
# grammar = "javascript"
|
||||||
# auto-format = true
|
# auto-format = true
|
||||||
|
|
||||||
# [[language]]
|
|
||||||
# name = "typescript"
|
|
||||||
# scope = "source.ts"
|
|
||||||
# injection-regex = "^(ts|typescript)$"
|
|
||||||
# file-types = ["ts"]
|
|
||||||
# shebangs = ["deno", "node"]
|
|
||||||
# roots = ["deno.jsonc", "deno.json", "package.json", "tsconfig.json"]
|
|
||||||
# config = { enable = true, lint = true, unstable = true }
|
|
||||||
# language-server = { command = "deno", args = ["lsp"], language-id = "typescript" }
|
|
||||||
# indent = { tab-width = 2, unit = " " }
|
|
||||||
# auto-format = true
|
|
||||||
|
|
||||||
# [[language]]
|
# [[language]]
|
||||||
# name = "tsx"
|
# name = "tsx"
|
||||||
# scope = "source.tsx"
|
# scope = "source.tsx"
|
||||||
|
|
Loading…
Reference in a new issue