Merge branch 'master' of https://github.com/SuperAuguste/zls into new_parser

This commit is contained in:
Alexandros Naskos 2020-05-24 19:19:04 +03:00
commit 5b86c13d08

View File

@ -12,6 +12,7 @@ Zig Language Server, or `zls`, is a language server for Zig. The Zig wiki states
- [Configuration Options](#configuration-options) - [Configuration Options](#configuration-options)
- [Usage](#usage) - [Usage](#usage)
- [VSCode](#vscode) - [VSCode](#vscode)
- [Sublime Text 3](#sublime-text-3)
- [Related Projects](#related-projects) - [Related Projects](#related-projects)
- [License](#license) - [License](#license)
@ -33,7 +34,7 @@ zig build
Then, you can use the `zls` executable in an editor of your choice that has a Zig language server client! Then, you can use the `zls` executable in an editor of your choice that has a Zig language server client!
*Note:`zls` itself must be built using the master branch of zig currently due to a bug in `std.json` which was [fixed](https://github.com/ziglang/zig/pull/5167) after 0.6.0 was released, as well as various parser changes that have happened since.* *Note: `zls` itself must be built using the master branch of zig currently due to a bug in `std.json` which was [fixed](https://github.com/ziglang/zig/pull/5167) after 0.6.0 was released, as well as various parser changes that have happened since.*
### Configuration Options ### Configuration Options
@ -53,12 +54,30 @@ The following options are currently available.
## Usage ## Usage
`zls` is in its early stages, with a full analysis/completion engine coming soon, but it is still usable. `zls` will supercharge your Zig programming experience with autocomplete, function documentation, and more! Follow the instructions for your specific editor below:
### VSCode ### VSCode
Install the `zls-vscode` extension from [here](https://github.com/zigtools/zls-vscode/releases). Install the `zls-vscode` extension from [here](https://github.com/zigtools/zls-vscode/releases).
### Sublime Text 3
- Install the `LSP` package from [here](https://github.com/sublimelsp/LSP/releases) or via Package Control.
- Add this snippet to `LSP's` user settings:
```json
{
"clients": {
"zig":{
"command": ["zls"],
"enabled": true,
"languageId": "zig",
"document_selector": "source.zig",
"syntaxes": ["Packages/Zig/Syntaxes/Zig.tmLanguage"]
}
}
}
```
## Related Projects ## Related Projects
- [`sublime-zig-language` by @prime31](https://github.com/prime31/sublime-zig-language) - [`sublime-zig-language` by @prime31](https://github.com/prime31/sublime-zig-language)
- Supports basic language features - Supports basic language features