-
Notifications
You must be signed in to change notification settings - Fork 66
Conversation
@@ -0,0 +1,11 @@ | |||
local config = require'lspconfig'.elixirls.document_config | |||
require'lspconfig/configs'.elixirls = nil -- important, immediately unset the loaded config again | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add config.default_config.cmd = { "./language_server.sh" }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting some strange errors with the :LspInstall
command completion before when tried with that line, but now it seems to be working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps you were missing the {
}
before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried the first time just indexing the cmd
field and setting a string value, but it didn't existed, so I also tried to create it before doing that, (which is the same as the line you sent) and both don't cause errors but the lsp doesn't seem to start.
It has started before because I've forgot that I had hardcoded the path in my vimrc's elixirls setup for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does :LspInfo
say?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Configured servers: elixirls
Neovim logs at: /home/<user>/.cache/nvim/lsp.log
0 client(s) attached to this buffer:
0 active client(s):
Clients that match the filetype elixir:
Config: elixirls
cmd: cmd not defined
cmd is executable: cmd not defined
identified root: /home/<user>
custom handlers:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll commit the current code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be ./elixir-ls/language_server.sh
. The ./
is important to be recognized as a local path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yes, I forgot the ./
, but even adding it the behaviour and :LspInfo
output are still the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's very weird. I suspect something in your config is wrong because the code looks fine. Also I just tested it, and it works on my machine.
Looks good, only thing is I would prefer it if you would extract the Something like this pseudo code
|
Thanks! |
Just for reference, I had problems with After finding this issue in their repo I manually checked out the project and built it with my local Elixir, and everything started working perfectly again. I believe |
Due to the way that elixir-ls works in nvim-lspconfig, I could not set
cmd
on the file, so the installation is currently working and the user needs to set elixirls'scmd
as/home/<user>/.local/share/nvim/lspinstall/elixir/language_server.sh
on setup in order to the language server to start. I wonder if we can improve this and make it work out of the box or just add documentation about that issue.