PowerShell / PowerShell/PowerShellEditorServices

Discuss new Framework API structure

Ouverte
#469 12 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Issue-Discussion
Langage dominant
C#
Étoiles
767
Forks
266
Merge moyen
3 j 16 h
PR mergées (30 j)
1

Description

This issue is intended to be a discussion point for the new PowerShell Editor Services API model. The idea here is that Editor Services will now become a framework for adding new capabilities to editors that use it. The overall goal being that most non-core functionality will be enabled through modules that plug into the Editor Services APIs. PSScriptAnalyzer, Plaster, and other modules will add functionality directly through these APIs rather than PSES having to know about them and manage their integration.

Interfaces

All of these interface and method are subject to change as we develop the ideas further.

  • IWorkspace - Provides access to the files in the current workspace and events for when files are opened, closed, changed, or saved
  • ILogger - Writing logs to the Editor Services log. Important for module integrations to log their activities
  • IFileMarkers - Adding markers to files, like those from PSScriptAnalyzer. Also providing quick fixes for these markers
  • IMessageHandlers - Registering message handlers for both Language Server Protocol messages and custom message types
  • ICodeLensProvider - Providing "code lenses" at arbitrary locations in the script which provide information and launch actions at that point
  • IEditorCommands - Registering extension commands in the editor which show up in the command palette
  • ICompletionsProvider - Providing custom completions (and snippets) in addition to the built-in completions and snippets
  • IFileSymbols - Gathering information about symbols in a particular file
  • IWorkspaceSymbols - Gathering information about symbols across the workspace
  • IWindowMessages (?) - Showing messages in the editor window (ShowErrorMessage, etc)
  • IWindowPrompts - Showing prompts natively in the editor's UI, mirrors the prompting functionality in the PSHostUserInterface API
  • IDebuggerCommmands - Provides commands for the debugger, like breaking, stepping, continuing, etc
  • IDebuggerEvents - Exposes events for the debugger, primarily around stopping and resuming
  • IRunspaceEvents - Exposes events for when the active runspace changes, like when a remote session is established
  • ICommandExecution - Commands for executing commands against the current runspace. Also exposes events that give state change information for command execution

TODO: Add more interfaces here

Please feel free to leave comments below to discuss APIs you'd like to see!

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

L’issue ne cite aucun fichier, test ou point d’entrée. Commencez par examiner la structure actuelle de l’Editor Services API et les propositions d’interface listées ; cette discussion ne sera pas terminée tant qu’un périmètre concret de l’API et une cible d’implémentation n’auront pas été convenus.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
csharp, powershell
Domaine
api, developer-experience, tooling
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
20/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.