mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-24 13:13:43 +00:00
feat: prefer to guide coding by signature help (#874)
* feat: prefer to guide coding by signature help * test: update markdown description * test: update configuration for testing
This commit is contained in:
parent
1ba6b6c1e0
commit
67e659a878
13 changed files with 102 additions and 38 deletions
|
@ -58,6 +58,15 @@ impl StatefulRequest for CompletionRequest {
|
|||
ctx: &mut LocalContext,
|
||||
doc: Option<VersionedDocument>,
|
||||
) -> Option<Self::Response> {
|
||||
// These trigger characters are for completion on positional arguments,
|
||||
// which follows the configuration item
|
||||
// `tinymist.completion.triggerOnSnippetPlaceholders`.
|
||||
if matches!(self.trigger_character, Some('(' | ',' | ':'))
|
||||
&& !ctx.analysis.completion_feat.trigger_on_snippet_placeholders
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
||||
let doc = doc.as_ref().map(|doc| doc.document.as_ref());
|
||||
let source = ctx.source_by_path(&self.path).ok()?;
|
||||
let (cursor, deref_target) = ctx.deref_syntax_at_(&source, self.position, 0)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue