summaryrefslogtreecommitdiff
path: root/lua/lang/svelte.lua
diff options
context:
space:
mode:
authorichigo-gyuunyuu <[email protected]>2021-07-21 01:03:15 +0530
committerGitHub <[email protected]>2021-07-21 00:03:15 +0430
commit0064b446a02be13dba0f16f084e073b347716710 (patch)
tree203f9907132b86c37733096bd139cf224b4dd1ad /lua/lang/svelte.lua
parent9e640fa4d99beeec97292a00a51b335960aa2b0f (diff)
[Feature] Allow for custom path to a language server binary (#1043)
Diffstat (limited to 'lua/lang/svelte.lua')
-rw-r--r--lua/lang/svelte.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/lua/lang/svelte.lua b/lua/lang/svelte.lua
index 220c2c18..ad6dd094 100644
--- a/lua/lang/svelte.lua
+++ b/lua/lang/svelte.lua
@@ -1,7 +1,11 @@
local M = {}
M.config = function()
- O.lang.svelte = {}
+ O.lang.svelte = {
+ lsp = {
+ path = DATA_PATH .. "/lspinstall/svelte/node_modules/.bin/svelteserver",
+ },
+ }
end
M.format = function()
@@ -20,7 +24,7 @@ M.lsp = function()
end
require("lspconfig").svelte.setup {
- cmd = { DATA_PATH .. "/lspinstall/svelte/node_modules/.bin/svelteserver", "--stdio" },
+ cmd = { O.lang.svelte.lsp.path, "--stdio" },
filetypes = { "svelte" },
root_dir = require("lspconfig.util").root_pattern("package.json", ".git"),
on_attach = require("lsp").common_on_attach,