2

I have tried to use elmls with nvim-lsp but lsp does not work. I am using nvim-lspconfig and nvim-lspinstaller. as for elmls i have the following configuration.

lspconfig.elmls.setup {
  root_dir = require "lspconfig.util".root_pattern("elm.json",".git")
}

Also, how to describe the contents of :LspLog.

[START][2022-07-19 11:26:29] LSP logging initiated
[ERROR][2022-07-19 11:26:30] .../vim/lsp/rpc.lua:420    "rpc"   "elm-language-server"   "stderr"    "(node:61562) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time\n(Use `node --trace-warnings ...` to show where the warning was created)\n"
[ERROR][2022-07-19 11:26:30] ...lsp/handlers.lua:455    "Unhandled Rejection at: Promise [object Promise] reason:, TypeError: Failed to parse URL from /Users/bokutotu/.local/share/nvim/lsp_servers/elmls/node_modules/@elm-tooling/elm-language-server/node_modules/web-tree-sitter/tree-sitter.wasm"
[START][2022-07-19 11:26:35] LSP logging initiated
[ERROR][2022-07-19 11:26:54] .../vim/lsp/rpc.lua:420    "rpc"   "elm-language-server"   "stderr"    "(node:61647) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time\n(Use `node --trace-warnings ...` to show where the warning was created)\n"
[ERROR][2022-07-19 11:26:54] ...lsp/handlers.lua:455    "Unhandled Rejection at: Promise [object Promise] reason:, TypeError: Failed to parse URL from /Users/bokutotu/.local/share/nvim/lsp_servers/elmls/node_modules/@elm-tooling/elm-language-server/node_modules/web-tree-sitter/tree-sitter.wasm"

I am looking for elmls to work correctly with nvim.

1 Answer 1

3

I had the same problem, downgrading Node from 18.4 to 16.x worked for me. Please refer to this issue

Sign up to request clarification or add additional context in comments.

1 Comment

This solved a similar issue I was seeing with the elm language server not operating in the Helix editor. Quite frustrating. Thank you so much.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.