Fix manual copilot with show_inline_completions: false (#16621)

For @mre and friends!

Release Notes:

- Fixed manually trigging completions when `show_inline_completions:
false`
This commit is contained in:
Conrad Irwin 2024-08-21 20:27:19 -06:00 committed by GitHub
parent 136f75ee9a
commit eb9eae09b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 21 deletions

View file

@ -2300,6 +2300,7 @@ impl Project {
buffer.update(cx, |buffer, cx| {
let worktree_id = old_file.worktree_id(cx);
let ids = &self.language_server_ids;
if let Some(language) = buffer.language().cloned() {
@ -2620,7 +2621,7 @@ impl Project {
let worktree_id = file.worktree_id(cx);
let abs_path = file.as_local()?.abs_path(cx);
let text_document = lsp::TextDocumentIdentifier {
uri: lsp::Url::from_file_path(abs_path).unwrap(),
uri: lsp::Url::from_file_path(abs_path).log_err()?,
};
for (_, _, server) in self.language_servers_for_worktree(worktree_id) {