You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the standard of LSP, the server obtains the configuration through Configuration.
For VSCode, the configuration is declared in package.json.
However, LSP does not specify how the language client resolves the settings, so neovim needs to refer to the package. JSON file for its own configuration.
In the future, it may be considered to parse a specific configuration file directly by the language server.
to coc-settings.json does the job in neovim with coc plugin.
Anyway, is there a place (apart from the package.json you linked above) where we can find the list of options to configure with some description explaining them? I mean, one more or less can guess the meaning of each option and the way to set it by looking at this json file, but it's much easier if there is, for instance, a wiki page for them.
But I understand it can be a big and tedious work. So it's OK if you don't have the time to write it.
Would love to hear details about how you set things up? I am on windows and using neovim and coc @gustavo-hms, even if not on windows, please let us know.
@gustavo-hms thanks for the instructions! I just tested this out locally, and when I build locally for macOS, the [full path of the lua-language-server directory] like you have mentioned doesn't have a main.lua in it, so I'm getting an error there that the file or directory doesn't exist. Should there be a main.lua there that I don't have for some reason?
Well, the [full path of the lua-language-server directory] is not the path of the executable, but the path of the base directory of the lua-language-server project (as you clone from github). So, the main.lua file refers to this file: https://github.com/sumneko/lua-language-server/blob/master/main.lua
By the way, for those interested, I also managed to configure Kakoune with kak-lsp. You have to add the following lines to ~/.config/kak-lsp/kak-lsp.toml:
Well, the [full path of the lua-language-server directory] is not the path of the executable, but the path of the base directory of the lua-language-server project (as you clone from github). So, the main.lua file refers to this file: /main.lua@master
ahhh duh, I interpreted that as the directory that directly contained the executable. I changed it and now it works fine. Thanks a ton!
Hi, in vim, do we still need to do the json-schema part? Here is the output of CocInfo for me (without doing the json-schema) part.
## versions
vim version: VIM - Vi IMproved 8.2 8020814
node version: v14.5.0
coc.nvim version: 0.0.79-8230b63641
coc.nvim directory: /home/brbl/.vim/plugged/coc.nvim
term: dumb
platform: linux
## Log of coc.nvim
2020-10-28T20:42:02.071 INFO (pid:3085631) [services] - registered service "languageserver.lua"
2020-10-28T20:42:02.088 INFO (pid:3085631) [services] - lua state change: stopped => starting
2020-10-28T20:42:02.095 INFO (pid:3085631) [plugin] - coc.nvim 0.0.79-8230b63641 initialized with node: v14.5.0 after 191ms
2020-10-28T20:42:02.130 INFO (pid:3085631) [language-client-index] - Language server "languageserver.lua" started with 3085646
2020-10-28T20:42:02.150 ERROR (pid:3085631) [language-client-client] - connection error: Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:156:25)
at writeGeneric (internal/stream_base_commons.js:147:3)
at Socket._writeGeneric (net.js:785:11)
at Socket._write (net.js:797:8)
at writeOrBuffer (_stream_writable.js:352:12)
at Socket.Writable.write (_stream_writable.js:303:10)
at StreamMessageWriter.write (/home/brbl/.vim/plugged/coc.nvim/build/index.js:18391:27)
at /home/brbl/.vim/plugged/coc.nvim/build/index.js:17539:35
at new Promise (<anonymous>)
at Object.sendRequest (/home/brbl/.vim/plugged/coc.nvim/build/index.js:17529:26)
at Object.initialize (/home/brbl/.vim/plugged/coc.nvim/build/index.js:74405:44)
at LanguageClient.doInitialize (/home/brbl/.vim/plugged/coc.nvim/build/index.js:76521:27)
at LanguageClient.initialize (/home/brbl/.vim/plugged/coc.nvim/build/index.js:76508:25)
at /home/brbl/.vim/plugged/coc.nvim/build/index.js:76439:25 {
errno: -32,
code: 'EPIPE',
syscall: 'write'
} undefined
2020-10-28T20:42:02.210 INFO (pid:3085631) [services] - lua state change: starting => stopped
Activity
sumneko commentedon Apr 3, 2020
In the standard of LSP, the server obtains the configuration through Configuration.
For VSCode, the configuration is declared in package.json.
However, LSP does not specify how the language client resolves the settings, so
neovimneeds to refer to thepackage. JSONfile for its own configuration.In the future, it may be considered to parse a specific configuration file directly by the language server.
gustavo-hms commentedon Apr 7, 2020
Thank you for your response!
I've found that writing
to
coc-settings.jsondoes the job inneovimwithcocplugin.Anyway, is there a place (apart from the package.json you linked above) where we can find the list of options to configure with some description explaining them? I mean, one more or less can guess the meaning of each option and the way to set it by looking at this json file, but it's much easier if there is, for instance, a wiki page for them.
But I understand it can be a big and tedious work. So it's OK if you don't have the time to write it.
Thanks again!
sumneko commentedon Apr 7, 2020
It's a good idea to explain the configuration options on the wiki, I will do it in these days. Thank you for your advice!
dseeni commentedon Apr 29, 2020
Would love to hear details about how you set things up? I am on windows and using neovim and coc @gustavo-hms, even if not on windows, please let us know.
gustavo-hms commentedon Apr 29, 2020
Sure! Follow these steps:
lua-language-serveras a standalone program: https://github.com/sumneko/lua-language-server/wiki/Build-and-Run-(Standalone)cocconfigurationlua-language-serverin that json.For example, mine has the following json:
ckipp01 commentedon Apr 29, 2020
@gustavo-hms thanks for the instructions! I just tested this out locally, and when I build locally for macOS, the
[full path of the lua-language-server directory]like you have mentioned doesn't have amain.luain it, so I'm getting an error there that the file or directory doesn't exist. Should there be amain.luathere that I don't have for some reason?gustavo-hms commentedon Apr 29, 2020
Well, the
[full path of the lua-language-server directory]is not the path of the executable, but the path of the base directory of thelua-language-serverproject (as you clone from github). So, themain.luafile refers to this file: https://github.com/sumneko/lua-language-server/blob/master/main.luagustavo-hms commentedon Apr 29, 2020
By the way, for those interested, I also managed to configure Kakoune with kak-lsp. You have to add the following lines to
~/.config/kak-lsp/kak-lsp.toml:I couldn't set
lua-language-serveroptions like thelowercase-globalabove though. I didn't find how.ckipp01 commentedon Apr 30, 2020
ahhh duh, I interpreted that as the directory that directly contained the executable. I changed it and now it works fine. Thanks a ton!
#154 readme 添加 setting 指引
kkharji commentedon Sep 25, 2020
Yah I failed to get it working with coc.nvim: here is my config:
Any suggestions, thanks
gustavo-hms commentedon Sep 28, 2020
Hi, @tami5 !
I'm not on my machine right now to test your configuration, but may be you could try replacing:
with:
Tell me if it helps.
kkharji commentedon Oct 1, 2020
@gustavo-hms thanks so much for taking interest in my issue. same thing, here's the output of the error message
flamendless commentedon Oct 28, 2020
Hi, in vim, do we still need to do the json-schema part? Here is the output of
CocInfofor me (without doing thejson-schema) part.