Skip to content

Commit 2524a8d

Browse files
[Repo Assist] fix: raise named-argument completion priority to match Property (closes #1500) (#1503)
* fix: raise Argument completion priority to match Property (closes #1500) Named arguments in constructor and function call contexts (CompletionItemKind.Argument) were assigned sort priority 5, placing them below Properties (1), Fields (2), Methods (3), and Events (4). This meant that when triggering completion inside e.g. Person(Name = ...), the named parameters Age and Name appeared far down the list. Raise Argument priority to 1 (same as Property) so named arguments appear at the top of the completion list alongside the type's own properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * ci: trigger checks --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent a98d121 commit 2524a8d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/FsAutoComplete.Core/ParseAndCheckResults.fs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,14 @@ type ParseAndCheckResults
640640
match kind with
641641
| CompletionItemKind.SuggestedName
642642
| CompletionItemKind.CustomOperation -> 0
643+
// Named arguments (constructor/function call context) are the most
644+
// immediately relevant completions — give them the same priority as
645+
// properties so they appear at the top of the list (closes #1500).
646+
| CompletionItemKind.Argument -> 1
643647
| CompletionItemKind.Property -> 1
644648
| CompletionItemKind.Field -> 2
645649
| CompletionItemKind.Method(isExtension = false) -> 3
646650
| CompletionItemKind.Event -> 4
647-
| CompletionItemKind.Argument -> 5
648651
| CompletionItemKind.Other -> 6
649652
| CompletionItemKind.Method(isExtension = true) -> 7
650653

0 commit comments

Comments
 (0)