Provide pester functions (it, context, describe) in document symbols#490
Provide pester functions (it, context, describe) in document symbols#490daviwil merged 16 commits intoPowerShell:masterfrom
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 |
daviwil
left a comment
There was a problem hiding this comment.
This is great, thanks man!
|
|
||
| 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.
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/documentSymbolrequest. As such, it allows easier navigation of a pester test file.