aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--book/src/generated/lang-support.md2
-rw-r--r--languages.toml20
-rw-r--r--runtime/queries/svelte/indents.scm18
3 files changed, 38 insertions, 2 deletions
diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md
index b5391150..65ebe3d3 100644
--- a/book/src/generated/lang-support.md
+++ b/book/src/generated/lang-support.md
@@ -141,7 +141,7 @@
| sql | ✓ | | | |
| sshclientconfig | ✓ | | | |
| starlark | ✓ | ✓ | | |
-| svelte | ✓ | | | `svelteserver` |
+| svelte | ✓ | | ✓ | `svelteserver` |
| sway | ✓ | ✓ | ✓ | `forc` |
| swift | ✓ | | | `sourcekit-lsp` |
| t32 | ✓ | | | |
diff --git a/languages.toml b/languages.toml
index c1315d96..9402ff24 100644
--- a/languages.toml
+++ b/languages.toml
@@ -62,7 +62,6 @@ slint-lsp = { command = "slint-lsp", args = [] }
solargraph = { command = "solargraph", args = ["stdio"] }
solc = { command = "solc", args = ["--lsp"] }
sourcekit-lsp = { command = "sourcekit-lsp" }
-svelteserver = { command = "svelteserver", args = ["--stdio"] }
svlangserver = { command = "svlangserver", args = [] }
swipl = { command = "swipl", args = [ "-g", "use_module(library(lsp_server))", "-g", "lsp_server:main", "-t", "halt", "--", "stdio" ] }
taplo = { command = "taplo", args = ["lsp", "stdio"] }
@@ -140,6 +139,25 @@ includeInlayParameterNameHintsWhenArgumentMatchesName = true
includeInlayPropertyDeclarationTypeHints = true
includeInlayVariableTypeHints = true
+[language-server.svelteserver]
+command = "svelteserver"
+args = ["--stdio"]
+
+[language-server.svelteserver.config.configuration.typescript]
+inlayHints.parameterTypes.enabled = true
+inlayHints.variableTypes.enabled = true
+inlayHints.propertyDeclarationTypes.enabled = true
+inlayHints.functionLikeReturnTypes.enabled = true
+inlayHints.enumMemberValues.enabled = true
+inlayHints.parameterNames.enabled = "all"
+
+[language-server.svelteserver.config.configuration.javascript]
+inlayHints.parameterTypes.enabled = true
+inlayHints.variableTypes.enabled = true
+inlayHints.propertyDeclarationTypes.enabled = true
+inlayHints.functionLikeReturnTypes.enabled = true
+inlayHints.enumMemberValues.enabled = true
+inlayHints.parameterNames.enabled = "all"
[[language]]
name = "rust"
diff --git a/runtime/queries/svelte/indents.scm b/runtime/queries/svelte/indents.scm
new file mode 100644
index 00000000..d0408d61
--- /dev/null
+++ b/runtime/queries/svelte/indents.scm
@@ -0,0 +1,18 @@
+[
+ (element)
+ (if_statement)
+ (each_statement)
+ (await_statement)
+ (script_element)
+ (style_element)
+] @indent
+
+[
+ (end_tag)
+ (else_statement)
+ (if_end_expr)
+ (each_end_expr)
+ (await_end_expr)
+ ">"
+ "/>"
+] @outdent \ No newline at end of file