-
Notifications
You must be signed in to change notification settings - Fork 35
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
lsp/completions: Implement better package items #763
Conversation
@@ -701,7 +701,7 @@ func (l *LanguageServer) handleTextDocumentCompletion( | |||
} | |||
|
|||
return types.CompletionList{ | |||
IsIncomplete: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a key part of the change here which has the client request completions on each char change. This allows the server to define the completions and filtering them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niiiice!
This PR also has a fix for not showing completions on lines starting with \t etc. |
Items for packages will now be sorted by 'depth', show partial package refs where a package is comprised of many sub packages and continuously trigger completions in order to be able to provide up-to-date suggestions based on file changes. Signed-off-by: Charlie Egan <[email protected]>
Signed-off-by: Charlie Egan <[email protected]>
453b99e
to
07be176
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me! I'll test on main once it's merged.
@@ -701,7 +701,7 @@ func (l *LanguageServer) handleTextDocumentCompletion( | |||
} | |||
|
|||
return types.CompletionList{ | |||
IsIncomplete: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niiiice!
Items for packages will now be sorted by 'depth', show partial package refs where a package is comprised of many sub packages and continuously trigger completions in order to be able to provide up-to-date suggestions based on file changes. Signed-off-by: Charlie Egan <[email protected]>
Items for packages will now be sorted by 'depth',
show partial package refs where a package is comprised of many sub packages and continuously trigger completions in order to be able to provide up-to-date suggestions based on file changes.
Fixes #752
before
before.mov
after
Screen.Recording.2024-05-28.at.16.54.59.mov