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.

glennsl
  • 28,186
  • 12
  • 57
  • 75
musako
  • 897
  • 2
  • 10
  • 26

1 Answers1

3

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

pjot
  • 56
  • 4
  • 1
    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. – MichaelJones Dec 31 '22 at 14:49