PowerShell / PowerShell/PowerShellEditorServices

Discuss new Framework API structure

未关闭
#469 12 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Issue-Discussion
主要语言
C#
星标
767
派生
266
平均合并
3 天 16 小时
30 天内合并 PR
1

描述

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!

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

该 issue 没有列出任何文件、测试或入口点。请先查看当前的 Editor Services API 结构以及列出的接口提案;在就具体的 API 范围和实现目标达成一致之前,本次讨论尚未完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
csharp, powershell
领域
api, developer-experience, tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
20/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。