forked from wingyplus/zed-powershell
-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for language server settings and initialization options #6
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0e257c6
Add support for PowerShellEditorServices settings
gravejester cf48f18
Revert version back to 0.4.0
gravejester de0d85a
Update readme with info about config
gravejester 3b66a52
Revert back to initial state and re-implemented changes
gravejester ed3bab3
Revert version
gravejester fd943f7
Some cleanup
MrSubidubi 2c42415
fmt
MrSubidubi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| [package] | ||
| name = "powershell" | ||
| name = "zed_powershell" | ||
| version = "0.4.0" | ||
| edition = "2021" | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,43 @@ | ||
| # PowerShell extension for Zed editor | ||
| # PowerShell support for Zed | ||
|
|
||
| ## Setting up language server | ||
| This extension provides syntax highlighting as well as language server support for PowerShell files | ||
|
|
||
| Currently, the extension didn't support automatic installation (it'll soon land). You need | ||
| to set the bundle path through `lsp` configuration: | ||
| ## Configuring your language server | ||
|
|
||
| The extension requires PowerShell to be available in your environment. If that is the case, | ||
| the extension will auto-download the language server and start it. | ||
|
|
||
| If you wish to specify a custom path to your language server, you can do so via your settings: | ||
|
|
||
| ```json | ||
| { | ||
| "lsp": { | ||
| "powershell-es": { | ||
| "binary": { | ||
| "path": "<path to PowerShellEditorServices>" | ||
| } | ||
| "lsp": { | ||
| "powershell-es": { | ||
| "binary": { | ||
| "path": "<path to PowerShellEditorServices>" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Additionally, you can configure settings for your language server as well as initialization options | ||
| to pass to the language server on start. | ||
|
|
||
| An example for this: | ||
|
|
||
| ```json | ||
| "lsp":{ | ||
| "powershell-es":{ | ||
| "settings":{ | ||
| "powershell":{ | ||
| "codeFormatting":{ | ||
| "openBraceOnSameLine":true, | ||
| "addWhitespaceAroundPipe":true, | ||
| "trimWhitespaceAroundPipe":true, | ||
| "ignoreOneLineBlock":true | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.