-
Notifications
You must be signed in to change notification settings - Fork 272
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
Settings for Microsoft Python Language Server #633
Comments
FWIW I also had a go at the microsoft python language server a few weeks ago, and decided that it wasn't (yet?) as good as pyls anyway, as well as being much harder to get working in Vim. |
Thanks! That did the trick. And I see completions in the log, however I get this error message afterwards:
I think because microsoft python ls returns a dictionary:
I however do not know enough rust to add this case to: LanguageClient-neovim/src/languageclient.rs Line 2130 in 283dba5
|
This one looks like a problem with the microsoft language server to me. Specifically this bit: "documentation": {
"kind": null,
"value": "None"
} which does not parse, as you can verify like this: extern crate serde_json;
extern crate languageserver_types as lsp;
use lsp::Documentation;
fn main() {
// let serialized = "\"just a string\"";
// let serialized = "{\"kind\": \"plaintext\", \"value\": \"None\"}";
let serialized = "{\"kind\": null, \"value\": \"None\"}";
let doc: serde_json::Result<Documentation> = serde_json::from_str(&serialized);
println!("{:?}", doc);
} producing Relevant spec is here - search for (There may be other problems too, I stopped on finding this one). @hanspinckaers: suggest you take this issue over to the language server repository, if you still care about it. |
@dimbleby Nice finding! |
This is an issue with the language server and has been acknowledged in the corresponding issue. |
I went through the remainder of the exercise @dimbleby started (thanks for the nice troubleshooting method!) and I think the remaining property causing trouble (at least for me so far) is |
The upstream seems to have fixed the issue. Anyone tested it? |
@Congee I tried it last night and Deoplete completion was working in neovim. The completion suggestion list was pretty huge though--I think there may be some other initializationOptions that need to be pushed in via settings similar to the VSCode configuration (see here: https://github.com/Microsoft/vscode-python/blob/efa175ca29476469136c07c783f6cbd28a976ff0/src/client/activation/languageServer/languageServer.ts#L280-L286) . I haven't explored this yet though. The following .settings file worked for me (I could probably clean this up a bit and make it Python specific):
|
@johngalambos Thank you for your |
@hanspinckaers sorry to ping you here but I'm facing an issue similar to your original one. Could you please tell me where you placed your |
Did you set |
I went ahead and added Edit: It looks like that did it!! There was something wrong with the way I built my binaries that seemed to have caused this. I dropped in this binary instead and it's working flawlessly now. Thank you so much for your help. |
I'm still having trouble getting code completions to show up.
And my settings.json
Here is my log file |
Does anybody have this working? Like @hanspinckaers, I'm seeing a lot of messages like:
My LanguageClient settings in my
I am using Shougo/deoplete.nvim for completion. My
DLL created by cloning microsoft/python-language-server into
Here is the content of
With
|
Given the history of this thread, the most likely explanation would seem to be that the server is sending a faulty response. You can debug per #633 (comment) to try and pin down what the Rust |
In particular - I haven't checked, but I like the chances of this being right - this completion item looks suspect:
0 is not a valid CompletionItemKind |
Hi,
I'm trying to get Microsoft Python Language Server working. Sadly, I can't get it to work. I'm seeing this error when enabling the highest logging level:
I think this is related to certain initializationOptions that need to be set. They should be like these:
https://github.com/Microsoft/python-language-server/blob/master/Using_in_sublime_text.md
I've tried various syntax in settings.json, but I cannot seem to get it to work. My current settings.json:
Thanks!
The text was updated successfully, but these errors were encountered: