Show inlay hints on startup for every language server with work events
Language servers such as typescript-language-servers report a single work event, ending right after server's startup. Other servers might send more similar event, also during startup. The rest of the events are diagnostic-related and we filter them out. React on such events with /refresh-like hint update, that will check only the visible part of the editor for hints and might be replaced by other /refresh requests, if needed.
This commit is contained in:
parent
c298cf7527
commit
0b0a161626
2 changed files with 112 additions and 0 deletions
|
@ -3397,6 +3397,7 @@ impl Project {
|
|||
cx: &mut ModelContext<Self>,
|
||||
) {
|
||||
if let Some(status) = self.language_server_statuses.get_mut(&language_server_id) {
|
||||
cx.emit(Event::RefreshInlays);
|
||||
status.pending_work.remove(&token);
|
||||
cx.notify();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue