From 1f9004a503b26a3d7295cc7e9a7ea2a291006f00 Mon Sep 17 00:00:00 2001 From: "shane.xb.qian" Date: Tue, 11 Apr 2023 00:28:06 +0800 Subject: [PATCH 1/3] fix: ignore '*.swp' from vim --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index fb9bc1f..6893353 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ temp *.vsix *.log *.tsbuildinfo + +*.swp From 4fe360411428c2dd473afa49949acd87cd35c05b Mon Sep 17 00:00:00 2001 From: "shane.xb.qian" Date: Tue, 11 Apr 2023 00:28:38 +0800 Subject: [PATCH 2/3] fix: should be better if snip item's title same like its prefix --- server/snippets.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/snippets.json b/server/snippets.json index f7ea08b..aa3bdab 100644 --- a/server/snippets.json +++ b/server/snippets.json @@ -42,7 +42,7 @@ "!${1:expression}" ] }, - "compare to": { + "compare-to": { "description": "comparison operator", "prefix": "compare-to", "body": [ @@ -71,7 +71,7 @@ "\t$0" ] }, - "if else": { + "if-else": { "description": "if else operator", "prefix": "if-else", "body": [ @@ -90,7 +90,7 @@ "\t$0" ] }, - "do while": { + "do-while": { "description": "do while operator", "prefix": "do-while", "body": [ From 7cbb7bf6f1768a9b76c564cd814b88d5b0e45796 Mon Sep 17 00:00:00 2001 From: "shane.xb.qian" Date: Tue, 11 Apr 2023 00:29:32 +0800 Subject: [PATCH 3/3] fix: gave snip params to snip items --- server/src/completion.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/completion.ts b/server/src/completion.ts index 1c53179..eabfd22 100644 --- a/server/src/completion.ts +++ b/server/src/completion.ts @@ -76,9 +76,13 @@ export function initCompletionList(docs: Documentation, snippets: Snippets): voi predefinedCompletionListLight.push( ...Object.entries(snippets).map(([title, info]) => ({ - label: title, + label: info.prefix, kind: CompletionItemKind.Snippet, data: { type: DataEntryType.Snippet }, + + detail: info.description, + insertText: info.body.join('\n'), + insertTextFormat: InsertTextFormat.Snippet, })), ) }