diff options
Diffstat (limited to 'lsp/elmls.lua')
| -rw-r--r-- | lsp/elmls.lua | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lsp/elmls.lua b/lsp/elmls.lua index bee05b89..a7f27789 100644 --- a/lsp/elmls.lua +++ b/lsp/elmls.lua @@ -7,11 +7,8 @@ --- npm install -g elm elm-test elm-format @elm-tooling/elm-language-server --- ``` -local util = require 'lspconfig.util' local api = vim.api -local elm_root_pattern = util.root_pattern 'elm.json' - return { cmd = { 'elm-language-server' }, -- 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. @@ -20,7 +17,7 @@ return { local fname = api.nvim_buf_get_name(bufnr) local filetype = api.nvim_buf_get_option(0, 'filetype') if filetype == 'elm' or (filetype == 'json' and fname:match 'elm%.json$') then - on_dir(elm_root_pattern(fname)) + on_dir(vim.fs.root(fname, 'elm.json')) return end on_dir(nil) |
