-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coc.nvim fails to start language server with error about "unregistered dependency token ElmWorkspaces" #695
Comments
Just tried installing everything globally ( {
...
"elmLS": {
"command": "elm-language-server",
"filetypes": ["elm"],
"rootPatterns": ["elm.json"]
},
...
} But same result. |
Same result with the latest release of neovim, 0.7.0 |
Seems like the dependency injection fails for some reason. Probably because vim fails to find a workspace? |
That gives me an idea... Yup, it must have been because I hadn't created an elm.json file yet. Now that that exists in an ancestor directory to the file I'm editing the LS starts up successfully. So, user error, though in the friendly spirit of Elm perhaps the error message should be more helpful? |
Hrm, is there something else that's weird? I can't reproduce this in vscode. I took a project and just deleted the |
I get the same problem with LSP-elm in sublime text. I'm just going through elm tutorials for the first time so I don't have any idea what |
That's an internal thing to the language server, you won't know that from learning elm |
I have the same issue in emacs:
I created an empty project with
But
|
I'm also having this same issue in emacs. Your Environment
|
@tillydray As you can see from emacs-lsp/lsp-mode#3936, my issue is that projectile was not setting the project root properly. I created a PR for Projectile: bbatsov/projectile#1819. @razzeee the issue doesn't come from the elm language server, sorry for the disturbance 😉 |
Thank you! Works after I remove the workspace folder and re-add the project root instead of project_root/src which is what projectile chose automatically
|
Glad you had the same issue. At least it's consistent! |
I've used coc.nvim for a while with a variety of languages and I'm trying to get started with Elm. I've installed this language server and its dependencies in my local node_modules directory and configured coc.nvim like so:
Expected Behavior
coc.nvim starts the language server and I can write Elm code using neovim and code completion, syntax checking etc.
Current Behavior
When I start coc.nvim it gives me this message:
Possible Solution
Not sure I can help here just yet. Was looking through the source of both coc.nvim and elm-language-server and it's hard to tell where this error is even coming from. I suspect it's from a dependency of elm-language-server.
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: