Feature Request: Add ability to change the language through $psEditor
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- csharp, typescript, vscode
- Bereich
- developer-experience, tooling
Rechercherichtung
Beginne damit, den Einstiegspunkt $psEditor.GetEditorContext().CurrentFile und das bestehende Verhalten von Out-CurrentFile -AsNewFile nachzuverfolgen. Es werden keine Implementierungsdateien oder Tests genannt; als abgeschlossen würde dies eine Einigung auf die API, die Implementierung von Sprachänderungen für die aktuelle Datei und die Validierung der angeforderten PowerShell- und Markdown-Beispiele erfordern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
After some contemplation, I've realized there's no need to make a request to change/add to the PSES module, as I can just do it in my profile. However, what I would like to see is the ability to change the language (likely with a SetLanguage() method on one of the objects somewhere).
Would there be appetite for adding this in at some point? I understand the PowerShell team is busy on other areas of the codebase and I don't want to put forward a suggestion of anything that might set back that work or unnecessarily distract from it.
What I would like to see is the ability to run something like: $psEditor.GetEditorContext().CurrentFile.SetLanguage('markdown') and have the current file's language mode set to markdown.
Original request here for posterity:
I'm not entirely sure the best place for this, I found this when working on some things in vscode, but the underlying behaviour is in the PSES module, but also some of it depends on vscode... So I'll start it over here and it can be moved if needed.
I was doing some stuff in vscode, and I found myself with the need to take the output of my function
Get-IntuneDetectionScriptand output it into a new editor window. I found that I could do this withOut-CurrentFile -AsNewFile, however this output as a herestring. Thinking about this, I believe the reason is that typically when outputting to the current file this behaviour makes sense. However, in my opinion when outputting to a new file this doesn't make sense.Based on my use case, I'd like to make two feature requests:
- Add a
Out-NewFilefunction that does whatOut-CurrentFile -AsNewFilecurrently does, only it doesn't do the herestring.- Assuming it's not too much work: add a
-Languageparameter toOut-NewFilethat takes in the language for the new file and sets it.
- This is the part I'm not sure on complexity-wise. Setting the language in typescript is a minor adjustment
With these suggestions you could do things like:
Get-IntuneDetectionScript "Whatever App" | Out-NewFile -Language powershell Get-IntuneAppDescription "Whatever App" | Out-NewFile -Language markdownI've got a branch that includes the first feature request over here: https://github.com/corbob/PowerShellEditorServices/tree/out-newfile (To see the changes, they're all (currently) encapsulated in a single commit: https://github.com/corbob/PowerShellEditorServices/commit/3c33c968a03348f8678a3d45b1841250710ea055)
- Vorherrschende Sprache
- C#
- Sterne
- 767
- Forks
- 266
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus PowerShell/PowerShellEditorServices
-
[Bug] None of the string overloads of `EditorExtensionServiceProvider.GetService()` work on .NET.Evtl. wieder frei @andyleejordan hat das vor 94 Tagen übernommen, und es ist kein Pull Request offen. Offen
PowerShell/PowerShellEditorServices#2331 · 1 Reaktion · 2 zugewiesene Personen ·
-
Area-Language Server Issue-Enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
PowerShell/PowerShellEditorServices#2315 · 1 Kommentar ·
-
Improve Constrained Runspace Debug ExperienceEvtl. vergeben @JustinGrote hat das vor 117 Tagen übernommen. OffenArea-Debugging Issue-Enhancement
PowerShell/PowerShellEditorServices#2294 · 1 Reaktion · 2 zugewiesene Personen ·
-
Issue-Bug Needs: Triage
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
PowerShell/PowerShellEditorServices#2293 · 1 Kommentar ·
-
Document outline drops child variables when a function/filter reuses a variable name declared earlier (scope-blind declaration dedup)Evtl. vergeben @JustinGrote hat das vor 145 Tagen übernommen. Offen
PowerShell/PowerShellEditorServices#2282 · 1 Kommentar · 1 Reaktion · 2 zugewiesene Personen ·
Alle Issues in PowerShell/PowerShellEditorServices
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
builtbybel/CrapFixer#112 ·
-
area-ai untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
dotnet/extensions#7790 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Beginner Friendly T: Bugfix
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
space-wizards/space-station-14#46220 ·
Maintainer antworten meist innerhalb von 1 Tag
-
P2 testing
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag
-
area-Infrastructure-coreclr os-ios os-maccatalyst os-tvos untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
dotnet/runtime#134766 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag