diff options
Diffstat (limited to 'lua/lspconfig/elmls.lua')
| -rw-r--r-- | lua/lspconfig/elmls.lua | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lua/lspconfig/elmls.lua b/lua/lspconfig/elmls.lua index 415d5eb3..7bc62290 100644 --- a/lua/lspconfig/elmls.lua +++ b/lua/lspconfig/elmls.lua @@ -1,35 +1,35 @@ -local configs = require "lspconfig/configs" -local util = require "lspconfig/util" +local configs = require 'lspconfig/configs' +local util = require 'lspconfig/util' local lsp = vim.lsp local api = vim.api -local server_name = "elmls" -local bin_name = "elm-language-server" +local server_name = 'elmls' +local bin_name = 'elm-language-server' local default_capabilities = lsp.protocol.make_client_capabilities() -default_capabilities.offsetEncoding = { "utf-8", "utf-16" } -local elm_root_pattern = util.root_pattern "elm.json" +default_capabilities.offsetEncoding = { 'utf-8', 'utf-16' } +local elm_root_pattern = util.root_pattern 'elm.json' configs[server_name] = { default_config = { cmd = { bin_name }, -- TODO(ashkan) if we comment this out, it will allow elmls to operate on elm.json. It seems like it could do that, but no other editor allows it right now. - filetypes = { "elm" }, + filetypes = { 'elm' }, root_dir = function(fname) - local filetype = api.nvim_buf_get_option(0, "filetype") - if filetype == "elm" or (filetype == "json" and fname:match "elm%.json$") then + local filetype = api.nvim_buf_get_option(0, 'filetype') + if filetype == 'elm' or (filetype == 'json' and fname:match 'elm%.json$') then return elm_root_pattern(fname) end end, init_options = { - elmPath = "elm", - elmFormatPath = "elm-format", - elmTestPath = "elm-test", - elmAnalyseTrigger = "change", + elmPath = 'elm', + elmFormatPath = 'elm-format', + elmTestPath = 'elm-test', + elmAnalyseTrigger = 'change', }, }, docs = { - package_json = "https://raw.githubusercontent.com/elm-tooling/elm-language-client-vscode/master/package.json", + package_json = 'https://raw.githubusercontent.com/elm-tooling/elm-language-client-vscode/master/package.json', description = [[ https://github.com/elm-tooling/elm-language-server#installation |
