mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Improve completions
If the completion cursor is in the middle of an identifier, start the completion matching before that token. GNOME Builder does this before sending us a cursor position, but VS Code does not.
This commit is contained in:
parent
54237d7976
commit
b2b50c6288
2 changed files with 6 additions and 3 deletions
|
@ -83,7 +83,7 @@ class Completion:
|
|||
insert_text = self.snippet
|
||||
insert_text_format = InsertTextFormat.Snippet
|
||||
|
||||
return {
|
||||
result = {
|
||||
"label": self.label,
|
||||
"kind": self.kind,
|
||||
"tags": [CompletionItemTag.Deprecated] if self.deprecated else None,
|
||||
|
@ -93,3 +93,4 @@ class Completion:
|
|||
"insertText": insert_text,
|
||||
"insertTextFormat": insert_text_format,
|
||||
}
|
||||
return { k: v for k, v in result.items() if v is not None }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue