ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
859 stars 277 forks source link

CodeLens does not display in val declaration #722

Closed wk-j closed 2 years ago

wk-j commented 6 years ago

This is strange looking code because [<DefaultValue>] was separated by empty CodeLens line

localcontext_fs_ _captureservice

7sharp9 commented 6 years ago

I get this in a net standard project too, just a new console app with this type:

type LocalDbContext() =

  [<DefaultValue>]
  val mutable private test : int
7sharp9 commented 4 years ago

Screenshot 2019-10-04 at 15 37 35

Im getting a Lens with this ^

7sharp9 commented 4 years ago

Maybe the interim month have fixed this in FCS.

Krzysztof-Cieslak commented 4 years ago

I’ll test that later today

Krzysztof-Cieslak commented 4 years ago

I'm still not getting the code lenses for type signature and I'm getting wrong reference code lenses image

In case of reference numbers (and I guess in the screenshot @7sharp9 posted) FSAC thinks that the symbol for which lens should be displayed is int rather than test

7sharp9 commented 4 years ago

If you take out the CR between the [<DefaultValue>] and val they seem to appear, I had to restart though.

Krzysztof-Cieslak commented 3 years ago

As expected - this is indeed a bug in FCS, I've fixed that with https://github.com/dotnet/fsharp/pull/10727 which means that in a few months time we will have this in Ionide.

Krzysztof-Cieslak commented 3 years ago

image