-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Autocomplete Implementation #1949
base: main
Are you sure you want to change the base?
Conversation
handleNotification(notification) | ||
case let .error(error): | ||
print("Error from EventStream for \(key.languageId.rawValue): \(error)") | ||
} | ||
} | ||
|
||
private func handleRequest(_ request: ServerRequest) { |
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.
Lets leave this commented for now.
|
||
/// Will query the language server for autocomplete suggestions and then display the window. | ||
@MainActor | ||
func showAutocompleteWindow() { |
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.
I mentioned it in the review of the CETV pr, but this function should be moved to CESE. That should simplify this type, as you could instead add a parameter to CESE for an optional ItemBoxDelegate
, and ignore the unnecessary TextViewCoordinator
conformance. Then make the ItemBoxDelegate
pass the text controller when it inserts items so you can still make that range conversion on line 111.
That does make it a little harder to get this object down to be visible to the CodeFileView
, but check how it works with the content coordinator. I tried to make it so it's extendable for new types like this.
- Add a published property to CodeFileDocument
- Extend the type in
LanguageServerFileMap
to contain this object - When opening a document, set this object in the
CodeFileDocument
's new published property
Description
Adds first iteration of the autocomplete feature.
Related Issues
Checklist
Screenshots