Comments (19)
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?
from zls.
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.
from zls.
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.
from zls.
Weird, the builtin completion code sends the same kind of message as the global function completion code.
from zls.
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.
from zls.
Maybe it's due to lack of snippet syntax support in ale/deoplete?
from zls.
This seems to indeed be the issue: dense-analysis/ale#1821. This seems to be a problem with ale
itself. It seems that other language servers like elixir-ls have the same issue as us with ale snippet support being blocking.
from zls.
Yeah, that seems to be the case. I'll close this then.
from zls.
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. 😊
from zls.
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 👍.
from zls.
Nycex, you can now zig build -Dno_snippets
to enable no_snippets mode, which as its name indicates, disables all snippets! Thanks for bringing this issue to our attention! This should fix everything, and if it doesn't please, please reopen this issue!
from zls.
It still doesn't work, though that might have to do with the @
in front of the completion, deoplete seems to split that, e.g. typing @s
gives me a completion list with std in it. Maybe this behaviour is changable, I'll look into it.
Edit: this doesn't seem to be the problem, changing @breakpoint()
to breakpoint()
in the data files doesn't solve the issue.
from zls.
Edit: this doesn't seem to be the problem, changing @breakpoint() to breakpoint() in the data files doesn't solve the issue.
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.
from zls.
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)
from zls.
I'm pretty sure it is a problem with the main.zig:413
check, because if I add or true
to it, it works, but now only builtin functions work and they are also getting completed if no @
is in front of them (which is obvious of course). I'm not entirely sure if this is a zls problem or a problem with the way deoplete handles those separators.
Edit: After further investigation it seems to be deoplete's fault, because when I add or document.text[pos_index-1] == '@'
, it actually works, when I type @b<Tab>
e.g.. It seems like deoplete doesn't complete deoplete-source (here: ale) specific completion when it is after such a separator.
Edit2: I think char == '@'
might not be the best check here, since the completion should also work when you already typed part of the builtin function's name. (this might get fixed by the analysis engine?)
from zls.
Yep! This will def. be fixed by the analysis engine! char == '@'
is a superhacky placeholder. If you just type @
and then press tab, it should work with the current setup.
from zls.
I know, but for some reason deoplete expects at least one character after an @
to do completion. I guess I'll leave this open until the analysis is done as far as fixing this?
from zls.
Fixed! It should work now nycex!
from zls.
It does work now! 👍
Also with snippets enabled though - so I don't know if you want to keep the ability to disable them in 🤷.
from zls.
Related Issues (20)
- Build failure linux HOT 4
- Incorrect type definition from nested hash maps. HOT 1
- LSP does not show an error when mutating a const
- always sort identifiers before keywords in completions HOT 2
- No C++ code completion on master branch HOT 7
- Documentation on Emacs is incomplete
- Documentation on Neovim/Vim is incomplete HOT 8
- indexing a string has unknown type
- Wrong textDocument/semanticTokens/range response when last line is empty or contains only spaces HOT 2
- inefficient semanticTokens/range on the end of the document
- Functions where the first parameter is of type `anytype` are treated as methods. HOT 2
- Module's include paths are not used by ZLS HOT 1
- document can get out of sync when modified through external programs like git HOT 2
- No published artifacts for ZLS 0.14.0
- No type inference when orelse RHS is a block
- No inlay hints for struct_init* fields following a `return` and the fn's return type is an optional
- Analyzer.getPositionContext returns `.label` for `@This()` when it is specified as a variable's type
- Type inference through structs containing types
- referencing the same module by different import names has regressed
- no type completions for primitive types like u16, u32, f32 etc. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zls.