Skip to content

Commit

Permalink
feat: add parentheses on function completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiyozz committed Oct 3, 2023
1 parent 495b412 commit 5fdd15f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/DarkId.Papyrus.Server/Features/CompletionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,22 @@ private IEnumerable<CompletionItem> GetSymbolCompletionItems(IEnumerable<Papyrus
{
var displayText = _displayTextEmitter.GetDisplayText(symbol);

return new CompletionItem()
var item = new CompletionItem()
{
Kind = GetCompletionItemKind(symbol),
Label = symbol.Name,
Detail = displayText.Text,
SortText = symbol.Name,
Documentation = displayText.Documentation
Documentation = displayText.Documentation,
};

if (symbol is FunctionSymbol)
{
item.InsertText = symbol.Name + "($0)";
item.InsertTextFormat = InsertTextFormat.Snippet;
}

return item;
}).ToArray();
}

Expand Down

0 comments on commit 5fdd15f

Please sign in to comment.