-
Notifications
You must be signed in to change notification settings - Fork 133
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
Completion provides no results unless [[
are typed
#444
Comments
Typing As far as I'm aware, it was never designed that completion should work without any trigger / syntax context (e.g, manual completion). But So I'm not sure if this is a "bug", but maybe edging more on a feature request? I.e, that completion can be triggered manually and the LSP returns a list of links to insert? |
I had a quick look at the code and I think @WhyNotHugo is correct. An LSP client sends a "trigger kind" which can be The regression happened in this PR, but maybe @Rahlir had a good reason to check for |
Hmm, it looks like this was part of the fix where previously the manual completion only worked with the @tjex: Could you assign this issue to me so that I don't forget? Thanks. |
@Rahlir You're right, it couldn't have worked before either. I guess we could have a fallback on auto-completing links unless we're inside a tag ( |
When a completion is manually requested, it's fine to suggest both links and tags. In case of In case of Additionally, |
Interesting, so you mean that if you trigger manual completion when typing for instance |
There are also other types of tags, so maybe it's safer to just offer completion of everything, when we don't have a context. |
I would agree. But I think links should take a higher priority in the LSP completion list (if there's currently support for that within our LSP implementation, or it's relatively trivial to implement). As most of the time, without any textual context, I would think users will be wanting to insert a link. I also just checked, and I'm only getting tag completion for YAML tags. Hash or colon tags don't return anything. Caret in YAML array.
Carret after
So I think this part of the implementation from the PR needs some attention as well? |
Check if applicable
Describe the bug
When I manually invoke auto-completion, it won't provide any suggestions for inserting links.
Moreover, if using markdown style links, I still need to type
[[
before the completion provider yields any results.How to reproduce?
OR
[
and (optionally) manually trigger autocompletion.The root cause here is the completion provider only yields results in the two preceding characters are
[[
:zk/internal/adapter/lsp/server.go
Line 647 in 4a51e39
zk configuration
The text was updated successfully, but these errors were encountered: