diff options
-rw-r--r-- | changelog.md | 2 | ||||
-rw-r--r-- | script/core/completion/postfix.lua | 2 | ||||
-rw-r--r-- | test/completion/common.lua | 26 |
3 files changed, 16 insertions, 14 deletions
diff --git a/changelog.md b/changelog.md index 0bf05c01..04d013f3 100644 --- a/changelog.md +++ b/changelog.md @@ -14,6 +14,8 @@ * `CHG` Change spacing of parameter inlay hints to match other LSPs, like `rust-analyzer` * `FIX` Inconsistent type narrow behavior of function call args [#2758](https://github.com/LuaLS/lua-language-server/issues/2758) * `FIX` Typos in annotation descriptions +* `NEW` You can now click on "References" in CodeLen to display the reference list +* `FIX` incorrect `CompletionItemKind` for postfix snippets [#2773](https://github.com/LuaLS/lua-language-server/pull/2773) * `NEW` You can now click on "References" in CodeLen to display the reference list(VSCode) * `NEW` Improved behavior for inserting new lines: + When inside an annotation, an annotation tag will be added at the beginning of the line (VSCode). diff --git a/script/core/completion/postfix.lua b/script/core/completion/postfix.lua index b5f33315..46c24b8e 100644 --- a/script/core/completion/postfix.lua +++ b/script/core/completion/postfix.lua @@ -353,7 +353,7 @@ local function checkPostFix(state, word, wordPosition, position, symbol, results end):gsub('%$%{?%d+%}?', '') results[#results+1] = { label = action.key, - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, description = markdown() : add('lua', descText) : string(), diff --git a/test/completion/common.lua b/test/completion/common.lua index ec2372a0..30350642 100644 --- a/test/completion/common.lua +++ b/test/completion/common.lua @@ -3235,7 +3235,7 @@ xx@pcall<??> { [1] = { label = 'pcall', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 3, finish = 8, @@ -3257,7 +3257,7 @@ xx()@pcall<??> { [1] = { label = 'pcall', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 5, finish = 10, @@ -3279,7 +3279,7 @@ xx(1, 2, 3)@pcall<??> { [1] = { label = 'pcall', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 12, finish = 17, @@ -3301,7 +3301,7 @@ xx@xpcall<??> { [1] = { label = 'xpcall', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 3, finish = 9, @@ -3323,7 +3323,7 @@ xx()@xpcall<??> { [1] = { label = 'xpcall', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 5, finish = 11, @@ -3345,7 +3345,7 @@ xx(1, 2, 3)@xpcall<??> { [1] = { label = 'xpcall', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 12, finish = 18, @@ -3367,7 +3367,7 @@ xx@function<??> { [1] = { label = 'function', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 3, finish = 11, @@ -3389,7 +3389,7 @@ xx.yy@method<??> { [1] = { label = 'method', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 6, finish = 12, @@ -3411,7 +3411,7 @@ xx:yy@method<??> { [1] = { label = 'method', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 6, finish = 12, @@ -3433,7 +3433,7 @@ xx@insert<??> { [1] = { label = 'insert', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 3, finish = 9, @@ -3455,7 +3455,7 @@ xx++<??> { [1] = { label = '++', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 2, finish = 4, @@ -3471,7 +3471,7 @@ xx++<??> }, [2] = { label = '++?', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 2, finish = 4, @@ -3495,7 +3495,7 @@ end) { [1] = { label = 'xpcall', - kind = define.CompletionItemKind.Event, + kind = define.CompletionItemKind.Snippet, textEdit = { start = 10007, finish = 10013, |