mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-23 04:35:00 +00:00
dev: intern completion code (#124)
* dev: intern completion code * dev: change completion kind of symbols to FIELD * fix: accept hash * fix: reduce redundant information
This commit is contained in:
parent
858c100146
commit
0eae40dec6
9 changed files with 1437 additions and 33 deletions
|
@ -1,4 +1,4 @@
|
|||
use crate::{prelude::*, StatefulRequest};
|
||||
use crate::{prelude::*, upstream::autocomplete, StatefulRequest};
|
||||
|
||||
/// The [`textDocument/completion`] request is sent from the client to the
|
||||
/// server to compute completion items at a given cursor position.
|
||||
|
@ -57,8 +57,7 @@ impl StatefulRequest for CompletionRequest {
|
|||
// assume that the completion is not explicit.
|
||||
let explicit = false;
|
||||
|
||||
let (offset, completions) =
|
||||
typst_ide::autocomplete(ctx.world(), doc, &source, cursor, explicit)?;
|
||||
let (offset, completions) = autocomplete(ctx.world(), doc, &source, cursor, explicit)?;
|
||||
|
||||
let lsp_start_position = ctx.to_lsp_pos(offset, &source);
|
||||
let replace_range = LspRange::new(lsp_start_position, self.position);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue