Skip to content

Conversation

@cartermp
Copy link
Contributor

@cartermp cartermp commented May 11, 2020

  • Keyword descriptions now show in completion

Before:

image

After:

image

To my knowledge this hasn't been working in all of VS 2019 and perhaps VS 2017

Also includes some refactoring:

  • Move some details of the HashDirectiveCompletionProvider into that type + rename the file
  • Move keyword completion into a separate provider
  • Replace some self identifiers with _ since I was in the files

@cartermp cartermp requested a review from TIHan May 11, 2020 02:04
@cartermp

This comment has been minimized.

@cartermp cartermp marked this pull request as draft May 11, 2020 02:44
@cartermp

This comment has been minimized.

@cartermp cartermp marked this pull request as ready for review May 11, 2020 04:29
Copy link
Contributor

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great, consider whether you want to update to include a couple of extra fsi directives?

HashCompletion.Create("""\s*#load\s+(@?"*(?<literal>"[^"]*"?))""", [ ".fs"; ".fsx" ], useIncludeDirectives = true)
HashCompletion.Create("""\s*#r\s+(@?"*(?<literal>"[^"]*"?))""", [ ".dll"; ".exe" ], useIncludeDirectives = true)
HashCompletion.Create("""\s*#I\s+(@?"*(?<literal>"[^"]*"?))""", [ "\x00" ], useIncludeDirectives = false)
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you considered:
#if, #else, #endif, and #time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All four could be interesting. Since this mainly just calls into Roslyn's file system completion it'd have to be handled a little differently though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the first three, we'd need to look at the environment and grab MSBuild defines. #time would be just a static "on"/"off".

@cartermp cartermp merged commit 5f02ed2 into dotnet:master May 12, 2020
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
* Completion provider refactor

* Actually show keyword descriptions in tooltips for completion

* Get rid of unnecessary property

* Make the keyword completion list static again

* Just do it in the CompletionProvider
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
* Completion provider refactor

* Actually show keyword descriptions in tooltips for completion

* Get rid of unnecessary property

* Make the keyword completion list static again

* Just do it in the CompletionProvider
nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Jan 26, 2022
* Completion provider refactor

* Actually show keyword descriptions in tooltips for completion

* Get rid of unnecessary property

* Make the keyword completion list static again

* Just do it in the CompletionProvider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants