-
Notifications
You must be signed in to change notification settings - Fork 490
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
Implement document and workspace symbol providers for classes #3
Comments
Assigning Keith since this is for the feature he was interested in helping with. I'll provide more details privately. |
Would this allow for symbols search and goto for PS 5.0's classes and enums? |
Yep, that's something we haven't finished yet. Seems like you had commented on the Editor Services issue for this a while back: PowerShell/PowerShellEditorServices#14 Sorry about that :/ I'll see if I can get some help to get that implemented for the 0.8.0 release! |
Any updates on this? I have version 0.9.0 now and this doesn't seem to work. |
Any updates? This is a big missing piece for me. I try to do most of the development as classes, and wrap them with functions to get the task based abstractions. |
Same here, enums are not 'colored' at all (plain white). |
Just for the record, @mmajcica, enums being not colored is an EditorSyntax issue. That's all the syntax highlighting. This issue is opened there: Thank you all for your patience! Classes and enums are lacking at the moment for sure. The best thing to do is 👍 issues as that is one factor we look at for priority. |
@rjmholt Should I expect go to definition to work now if I'm using the 2.0 preview extension? Just installed and it doesn't appear to be working. |
Not yet. First step is dropping support for v3 AST which 2.0 preview does. Next step is to add support for classes (and enums). |
Precisely the problem we face in this code base. We've been trying to make the code more maintainable since we're spread thin across 30k lines of C#, and tangling things up in compile-time macros means the code gets harder to reason about and we have to juggle multiple DLLs to load at runtime. The decision to not compile a different DLL for PS v3/4 (compared to PS v5) was made by @daviwil in an earlier iteration of the project, but adding the capability back in presented a significant architecture-changing work item for new maintainers. Anyway, now that PSReadLine means we are incompatible with PS v3/4, we can feasibly move back to an |
This will be trickier than anticipated. Uncommenting the code that already existed didn't really do much. Here's what it has:
Here's what it's missing:
References here means actually going through and figuring out that a symbol ( So yeah. Lot's to do. |
* initial changes * add activation event * add block comment support * add saveMarkdownCellsAs setting * set metadata in new cells on save * actually work across files * updated API with metadata * refactor based on option and new Kernel type * add github action and proposed * add pwsh * remove old * trigger PR * add log * force cron to trigger * time * time * time * better titles * powershell comments * remove not needed comments * use githubrunnumber * use run_id * Update Notebook dts (#3) Co-authored-by: TylerLeonhardt <[email protected]> * better check for registering * Update Notebook dts (#4) Co-authored-by: TylerLeonhardt <[email protected]> * rob's feedback * Add a few tests * added save test * move to utils.sleep * fix regex * add logger * Codacy part 1 * Codacy part 2 * Update Notebook dts (#5) Co-authored-by: TylerLeonhardt <[email protected]> * move GitHub Action to use master Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: TylerLeonhardt <[email protected]> Co-authored-by: Tyler Leonhardt (POWERSHELL) <[email protected]>
Is this planned or being worked on? |
@lesterm5150 it's definitely noted as needed but the current highest priority is getting the extension stabilized with the new revamped internal engine to the point it's good for a stable release. |
Any update or ETA? |
Not sure if this been reported, but when editing a script that contains classes, the breadcrumb at the top of the script does not work for any class/method/enum. |
as an heavy user of classes in all bigger projects, the ETA (or knowing any alternative approach) would be nice |
This is landing in the next preview!!! |
@andschwa working great! I have about as complex of a class as it gets in ModuleFast, and methods aren't showing up for some reason for the most part, I think maybe because I implement IComparable and it's only picking up those base methods like I have less complex classes that work fine and show all methods like Let me know if this needs a new issue. |
@JustinGrote I know it's confusing, but those three screenshots all look like completions which are handled via the PowerShell completion engine, so perhaps an issue there? After you've typed out the method name (with at least |
Yeah there's typically nothing we can do in the extension to make new completions appear. That said, you might be hitting PowerShell/PowerShellEditorServices#1810 which is our problem. If it shows up after a Esc then Ctrl + Space then it's ours. If not, then you'd want to open in PowerShell/PowerShell |
@andschwa @SeeminglyScience oops I conflated two different things, you're right! Sorry about that, doing a quick symbol search and I'm seeing what I expect to see as well. Thanks! |
This requires an implementation of the DocumentSymbolProvider and WorkspaceSymbolProvider interfaces. Relevant code will need to be added to PowerShell Editor Services to support this behavior.
The text was updated successfully, but these errors were encountered: