This commit is contained in:
Alexandros Naskos 2020-05-08 02:57:24 +03:00
commit 48ed3ff447
2 changed files with 99 additions and 3 deletions

78
.assets/zls.svg Normal file
View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="zls.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
id="svg8"
version="1.1"
viewBox="0 0 64.822908 37.83542"
height="143"
width="245">
<defs
id="defs2" />
<sodipodi:namedview
showguides="false"
units="px"
inkscape:window-maximized="1"
inkscape:window-y="-6"
inkscape:window-x="1700"
inkscape:window-height="898"
inkscape:window-width="1707"
showgrid="false"
inkscape:document-rotation="0"
inkscape:current-layer="layer1"
inkscape:document-units="mm"
inkscape:cy="185.27203"
inkscape:cx="233.86931"
inkscape:zoom="1.4"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:groupmode="layer"
inkscape:label="Layer 1">
<text
id="text967"
y="12.207294"
x="1.938048"
style="font-style:normal;font-weight:normal;font-size:12.7px;line-height:0.9;font-family:sans-serif;letter-spacing:-2.64583px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
xml:space="preserve"><tspan
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.7px;font-family:Inter;-inkscape-font-specification:'Inter Bold';letter-spacing:0px;fill:#f7a41d;fill-opacity:1;stroke-width:0.264583"
y="12.207294"
x="1.938048"
id="tspan965">Zig</tspan><tspan
id="tspan977"
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.7px;font-family:Inter;-inkscape-font-specification:'Inter Bold';letter-spacing:0px;fill:#000000;fill-opacity:1;stroke-width:0.264583"
y="23.804161"
x="1.938048">Language</tspan><tspan
id="tspan984"
sodipodi:role="line"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:12.7px;font-family:Inter;-inkscape-font-specification:'Inter Bold';letter-spacing:0px;fill:#000000;fill-opacity:1;stroke-width:0.264583"
y="35.401028"
x="1.938048">Server</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1,21 +1,39 @@
# zls - Zig Language Server
![Zig Language Server](https://raw.githubusercontent.com/SuperAuguste/zls/master/.assets/zls.svg)
Zig Language Server (or `zls` for short) is a - you guessed it - language server for Zig! Based off of the code written by the great `andersfr`.
Zig Language Server, or `zls`, is a language server for Zig. The Zig wiki states that "The Zig community is decentralized" and "There is no concept of 'official' or 'unofficial'", so instead of calling `zls` unofficial, and I'm going to call it a cool option, one of [many](https://github.com/search?q=zig+language+server).
## Installation
Installing `zls` is pretty simple;
```bash
git clone https://github.com/SuperAuguste/zls
cd zls
zig build
```
### Build Options
| Option | Type | What it Does |
| --- | --- | --- |
| `-Dno_snippets` | `bool` | Enables "no snippets" mode for compatibility with language clients that do not support snippets (such as ale). |
| `-Ddata_version` | `string` | The data file version. Any files in the `src/data` file that correspond with the Zig version you want the language server to build for (0.6.0, master).
Then, you can use the `zls` executable in an editor of your choice that has a Zig language server client!
## Usage
**Please, I beg you, please don't use this unless you're developing or testing it!**
`zls` is in its early stages, with a full analysis/completion engine coming soon, but it is still usable.
### VSCode
Install the `zig-lsc` extension from [here](https://github.com/SuperAuguste/zig-lsc).
## Related Projects
- [`sublime-zig-language` by @prime31](https://github.com/prime31/sublime-zig-language)
- Supports basic language features
- Uses data provided by `src/data` to perform builtin autocompletion
## License
MIT