Update Sublime LSP settings for Sublime Text 4

"selector" is now the preferred method of configuration, everything else was deprecated in SublimeLSP 4070-1.1.0: https://github.com/sublimelsp/LSP/releases/tag/4070-1.1.0

Also syncs setup.zig with the readme for the Sublime Text 3 settings (the Zig Language package name was wrong in setup.zig)
This commit is contained in:
Ryan Liptak 2021-11-02 02:50:14 -07:00 committed by Auguste Rame
parent 5bae50bcfe
commit 4d6d842fa5
2 changed files with 33 additions and 3 deletions

View File

@ -118,15 +118,17 @@ You can install `zls` using the instuctions for your text editor below:
Install the `zls-vscode` extension from [here](https://github.com/zigtools/zls-vscode/releases) and provide a path to the build `zls` executable.
### Sublime Text 3
### Sublime Text
- Install the `LSP` package from [here](https://github.com/sublimelsp/LSP/releases) or via Package Control.
- Add this snippet to `LSP's` user settings:
#### For Sublime Text 3:
```json
{
"clients": {
"zig":{
"zig": {
"command": ["zls"],
"enabled": true,
"languageId": "zig",
@ -137,6 +139,20 @@ Install the `zls-vscode` extension from [here](https://github.com/zigtools/zls-v
}
```
#### For Sublime Text 4:
```json
{
"clients": {
"zig": {
"command": ["zls"],
"enabled": true,
"selector": "source.zig"
}
}
}
```
### Kate
- Enable `LSP client` plugin in Kate settings.

View File

@ -127,6 +127,8 @@ pub fn wizard(allocator: *std.mem.Allocator) !void {
\\https://github.com/sublimelsp/LSP/releases or via Package Control.
\\Then, add the following snippet to LSP's user settings:
\\
\\For Sublime Text 3:
\\
\\{
\\ "clients": {
\\ "zig": {
@ -134,7 +136,19 @@ pub fn wizard(allocator: *std.mem.Allocator) !void {
\\ "enabled": true,
\\ "languageId": "zig",
\\ "scopes": ["source.zig"],
\\ "syntaxes": ["Packages/Zig/Syntaxes/Zig.tmLanguage"]
\\ "syntaxes": ["Packages/Zig Language/Syntaxes/Zig.tmLanguage"]
\\ }
\\ }
\\}
\\
\\For Sublime Text 4:
\\
\\{
\\ "clients": {
\\ "zig": {
\\ "command": ["zls"],
\\ "enabled": true,
\\ "selector": "source.zig"
\\ }
\\ }
\\}