-
Notifications
You must be signed in to change notification settings - Fork 511
Add CodeLens support for PowerShell function references #507
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
Comments
Yep, we'll be getting to that soon. |
Of course, until the extension works across a scripts in a workspace, code lens support won't be super useful. |
CodeLens is more than just "find references" you can add arbitrary markers which launch arbitrary actions on any line of code. I'm curious to see what people will use it for when I add it to the $psEditor API. |
I love the function reference capability in ISESteroids, so this would be a win in VSCode assuming we can get all references in a project. Sounds like that could be a ways off. @daviwil Could you use the markers for something like "to-do" comments? Any chance these could also be used to fold region comments? |
We're trying to get cross-module find references going within the next month or two, Codelens support will line up with that. What would you expect to see for todo comments? We don't have any control over region folding unfortunately. |
@mattmcnabb RE region-based code-folding see microsoft/vscode#3422 (comment) and vote it up. |
@daviwil Just thinking out loud. For instance, in WIP projects we could add to-do comments to sections and then could "goto" those areas. @rkeithhill I'm aware of that particular issue. I was just thinking we could use the above "arbitrary actions" to fold content between region comments. |
@mattmcnabb I am looking at two VSCode extensions wayou.vscode-todo-highlight and MattiasPernhult.vscode-todo The highlight extension needed a few tweaks to settings.json to ID my preferred case of Todo as the default is TODO. The vscode-todo extension makes the todo list accessible via the Command Pallet. |
This change adds support for CodeLenses that display the number of references of a given function or cmdlet defined in a script file. The actual implementation of this behavior is on the server side but we had to write a LanguageClient middleware to translate the arguments of the references command when it was sent from the server. Resolves PowerShell#507 Resolves PowerShell#827 (unrelated to CodeLenses but related to LanguageClient output)
It would be really handy if there were some CodeLens capabilities added into the vscode-powershell extension, like the number of references for a function\cmdlet, class and its methods from current and all other scripts within the project folder.
The text was updated successfully, but these errors were encountered: