Skip to content

Commit

Permalink
[VSCode] Fixs mineurs sur l'extension
Browse files Browse the repository at this point in the history
  • Loading branch information
gideruette committed Sep 2, 2024
1 parent 9bef8dd commit 5c7cd76
Show file tree
Hide file tree
Showing 5 changed files with 921 additions and 216 deletions.
7 changes: 2 additions & 5 deletions TopModel.LanguageServer/CompletionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public override Task<CompletionList> Handle(CompletionParams request, Cancellati

if (parentKey == "asDomains" && currentLine[..reqChar].Contains(':')
|| currentKey == "domain"
|| parentKey == "domain" && currentLine[..reqChar].Contains("name: ")
|| rootObject == "converter"
&& (currentKey == "to" || currentKey == "from"))
{
Expand Down Expand Up @@ -228,15 +229,11 @@ private CompletionList CompleteDomain(CompletionParams request)
return new CompletionList(
_modelStore.Domains
.Where(domain => domain.Key.ToLower().ShouldMatch(searchText))
.OrderBy(domain => domain)
.OrderBy(domain => domain.Key)
.Select(domain => new CompletionItem
{
Kind = CompletionItemKind.EnumMember,
Label = domain.Key,
LabelDetails = new()
{
Description = $"{domain.Value.Label}"
},
TextEdit = new TextEditOrInsertReplaceEdit(new TextEdit
{
NewText = domain.Key,
Expand Down
Loading

0 comments on commit 5c7cd76

Please sign in to comment.