-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
builtin functions aren't completed if a part of it is already typed #1
Comments
Hey nycex, in all honesty, I have never used Vim before. I don't see any apparent problems in your config, but again, I don't really use ale and deoplete. Could you somehow output an error log and check for any Vim runtime errors? |
I don't have any runtime errors, but I can say that errors (zig syntax errors e.g.) in the file are shown, just the completion doesn't work for me. I'll look into ale and deoplete, maybe there is a mode that shows some debug info. |
So I tried a few things and wasn't able to get any debug output that has something to do with zls besides the execution of zls itself. When trying with latest master though, I was able to get global variable and function completion, though builtins still don't work. |
Weird, the builtin completion code sends the same kind of message as the global function completion code. |
That's correct - both send a completion event, they just have different content. |
Maybe it's due to lack of snippet syntax support in ale/deoplete? |
This seems to indeed be the issue: dense-analysis/ale#1821. This seems to be a problem with |
Yeah, that seems to be the case. I'll close this then. |
Very sorry about that @nycex! I'm gonna add a build option to disable snippets and render the plain versions of the builtins later, so you'll be able to use the language server. 😊 |
You don't have to be sorry, it makes sense to add this as a snippet feature; it's not your fault my client doesn't support that 🙂. It'd be great if you could add it, as you already said, though 👍. |
Nycex, you can now |
It still doesn't work, though that might have to do with the Edit: this doesn't seem to be the problem, changing |
The server still only sends the completion if the current character is '@' so I wouldn't expect simply changing the builtin name would fix this if the issue is deoplete's handling of '@'. Anyway, I will try to test this in some other LSP clients to see if this is a common issue or just deoplete's, I believe @SuperAuguste uses vscode like me so we should test on more clients anyway. |
If it helps, here I have the output and input of zls I can intercept when trying it first with a global function in the file and then with builtin functions: https://bpaste.net/DAOA (the first one is input, the second one output) |
I'm pretty sure it is a problem with the Edit: After further investigation it seems to be deoplete's fault, because when I add Edit2: I think |
Yep! This will def. be fixed by the analysis engine! |
I know, but for some reason deoplete expects at least one character after an |
Fixed! It should work now nycex! |
It does work now! 👍 |
Switch to std.time.Timer, take in library_path from program arguments, don't error on end of stream
As I already said in discord, I added zls as lsp and it get's called but I have neither completion for builtin functions nor for global variables. This might just as well be a misconfiguration on my side, but it could also be a zls bug. Here is my full vim config, and those are the significant parts:
The text was updated successfully, but these errors were encountered: