Skip to content

Commit

Permalink
fix: incorrect CompletionItemKind for postfix snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
tmillr committed Jul 31, 2024
1 parent fcf2952 commit 01827b4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion script/core/completion/postfix.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
26 changes: 13 additions & 13 deletions test/completion/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3235,7 +3235,7 @@ xx@pcall<??>
{
[1] = {
label = 'pcall',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 3,
finish = 8,
Expand All @@ -3257,7 +3257,7 @@ xx()@pcall<??>
{
[1] = {
label = 'pcall',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 5,
finish = 10,
Expand All @@ -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,
Expand All @@ -3301,7 +3301,7 @@ xx@xpcall<??>
{
[1] = {
label = 'xpcall',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 3,
finish = 9,
Expand All @@ -3323,7 +3323,7 @@ xx()@xpcall<??>
{
[1] = {
label = 'xpcall',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 5,
finish = 11,
Expand All @@ -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,
Expand All @@ -3367,7 +3367,7 @@ xx@function<??>
{
[1] = {
label = 'function',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 3,
finish = 11,
Expand All @@ -3389,7 +3389,7 @@ xx.yy@method<??>
{
[1] = {
label = 'method',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 6,
finish = 12,
Expand All @@ -3411,7 +3411,7 @@ xx:yy@method<??>
{
[1] = {
label = 'method',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 6,
finish = 12,
Expand All @@ -3433,7 +3433,7 @@ xx@insert<??>
{
[1] = {
label = 'insert',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 3,
finish = 9,
Expand All @@ -3455,7 +3455,7 @@ xx++<??>
{
[1] = {
label = '++',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 2,
finish = 4,
Expand All @@ -3471,7 +3471,7 @@ xx++<??>
},
[2] = {
label = '++?',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 2,
finish = 4,
Expand All @@ -3495,7 +3495,7 @@ end)
{
[1] = {
label = 'xpcall',
kind = define.CompletionItemKind.Event,
kind = define.CompletionItemKind.Snippet,
textEdit = {
start = 10007,
finish = 10013,
Expand Down

0 comments on commit 01827b4

Please sign in to comment.