resharper-fsharp icon indicating copy to clipboard operation
resharper-fsharp copied to clipboard

Is it possible to prevent Rider to add "open" statement at the top of the file?

Open MangelMaxime opened this issue 3 years ago • 1 comments

Hello,

I have the option "Enable out of scope items completion" disabled.

image

But I still, see completion like that:

image

This cause me pains because in general, it is proposed on top of the list of the item I want and so Rider add an open XXX statement at the top of my file.

rider_open_out_of_scope

Is it a bug or is this option not related to the behaviour I am experimenting?

File: Form.Error.fs

module Form.Error

type Error =
    | RequiredFieldIsEmpty
    | ValidationFailed of string
    | External of string

File: Form.View.fs

module Form.View

open Form

let test (e : Error....) =
                //  ^- edition at this point

MangelMaxime avatar Mar 31 '21 06:03 MangelMaxime

Aside, despite I'm probably not grasping the issue fully, when that out of scope completion triggers, it would be good to have both alternatives: add the open or use the qualified form, which doesn't seem to show up.

The similar fix in Visual Studio always offer both forms and it would be great to have feature parity on that aspect, I also kind of remember that Resharper offers the same for C# code.

// Grrr :) 😄

smoothdeveloper avatar Mar 31 '21 13:03 smoothdeveloper