Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,12 @@ module InlineParameterNameHints =
symbol.DeclaringEntity
|> Option.exists (fun entity -> entity.CompiledName <> "Operators")

let isNotCustomOperation =
not <| symbol.HasAttribute<CustomOperationAttribute>()

(symbol.IsFunction && isNotBuiltInOperator) // arguably, hints for those would be rather useless
|| symbol.IsConstructor
|| symbol.IsMethod
|| (symbol.IsMethod && isNotCustomOperation)
else
false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,4 +478,17 @@ let test sequences =

let actual = getParameterNameHints document

Assert.AreEqual(expected, actual)
Assert.AreEqual(expected, actual)

[<Test>]
let ``Hints are not shown when CustomOperation attribute is detected`` () =
let code =
"""
let q = query { for x in { 1 .. 10 } do select x }
"""

let document = getFsDocument code

let actual = getParameterNameHints document

Assert.IsEmpty actual