diff options
Diffstat (limited to 'lua/lang/elm.lua')
-rw-r--r-- | lua/lang/elm.lua | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/lua/lang/elm.lua b/lua/lang/elm.lua index 54526e0c..8fc8cebb 100644 --- a/lua/lang/elm.lua +++ b/lua/lang/elm.lua @@ -1,7 +1,16 @@ local M = {} M.config = function() - O.lang.elm = {} + local elm_bin = DATA_PATH .. "/lspinstall/elm/node_modules/.bin" + + O.lang.elm = { + lsp = { + path = elm_bin .. "/elm-language-server", + format = elm_bin .. "/elm-format", + root = elm_bin, + test = elm_bin .. "/elm-test", + }, + } end M.format = function() @@ -20,13 +29,13 @@ M.lsp = function() end require("lspconfig").elmls.setup { - cmd = { DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-language-server" }, + cmd = { O.lang.elm.lsp.path }, on_attach = require("lsp").common_on_attach, init_options = { elmAnalyseTrigger = "change", - elmFormatPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-format", - elmPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm", - elmTestPath = DATA_PATH .. "/lspinstall/elm/node_modules/.bin/elm-test", + elmFormatPath = O.lang.elm.lsp.format, + elmPath = O.lang.elm.lsp.root, + elmTestPath = O.lang.elm.lsp.test, }, } end |