-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide pester functions (it, context, describe) in document symbols #490
Conversation
06a4ade
to
c627165
Compare
Heh, oh man, perfect timing, I've got an awesome use for this ;) |
Is it something that others can use, too? I am thinking of Invoke-Build and psake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks man!
@@ -54,6 +55,12 @@ public LanguageService(PowerShellContext powerShellContext) | |||
|
|||
this.CmdletToAliasDictionary = new Dictionary<String, List<String>>(StringComparer.OrdinalIgnoreCase); | |||
this.AliasToCmdletDictionary = new Dictionary<String, String>(StringComparer.OrdinalIgnoreCase); | |||
this.documentSymbolProviders = new DocumentSymbolProvider[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you reading my mind? I was just about to implement a generic "feature provider" model in certain parts of PSES :)
@nightroman it will be soon, I'm going to expose functionality like this through the $psEditor model. Possibly even for this week's release :) |
@nightroman by the way, having a built-in task symbols provider would be really nice, would you be interested in contributing one similarly to how Kapil added the Pester symbol provider? What did you have in mind for how you'd use this? |
@daviwil I am not completely sure yet what a symbol provider is. I would like to see it in action at first. |
Ahhh, sorry, it's basically the concept that Kapil added to PSES in this PR: for a given ScriptFile, return SymbolReference instances which mark any special symbols in the file, like |
You'd basically be implementing another class like this that looks for In fact, it'd be mostly a copy/paste job ;) |
Oh, in that case, count me in! I am still interested in the API for not built-in stuff, looking forward to 1.3.0. |
@nightroman When I wrote this I had |
I think just a general task symbol provider might be good enough to support both psake and Invoke-Build since they both use the |
…er-tests-dbg-snippet Update dbg config snippets to be consistent w/node
This provides pester symbols (it, context and describe) for a pester file whenever the server receives a
textDocument/documentSymbol
request. As such, it allows easier navigation of a pester test file.