Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zigtools/zls
A Zig language server supporting Zig developers with features like autocomplete and goto definition
https://github.com/zigtools/zls
language-server language-support zig zig-language-server ziglang zls
Last synced: 22 days ago
JSON representation
A Zig language server supporting Zig developers with features like autocomplete and goto definition
- Host: GitHub
- URL: https://github.com/zigtools/zls
- Owner: zigtools
- License: mit
- Created: 2020-04-24T22:19:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T22:06:05.000Z (7 months ago)
- Last Synced: 2024-04-14T02:22:48.654Z (7 months ago)
- Topics: language-server, language-support, zig, zig-language-server, ziglang, zls
- Language: Zig
- Homepage:
- Size: 7.1 MB
- Stars: 2,330
- Watchers: 24
- Forks: 257
- Open Issues: 120
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - zigtools/zls - def! [install.zigtools.org/](https://install.zigtools.org/) (Tools / Text Editors)
- awesome-zig - zls🗒️Zig LSP implementation + Zig Language Server
README
[![CI](https://github.com/zigtools/zls/workflows/CI/badge.svg)](https://github.com/zigtools/zls/actions)
[![codecov](https://codecov.io/github/zigtools/zls/graph/badge.svg?token=WE18MPF00W)](https://codecov.io/github/zigtools/zls)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)**Need support? Wanna help out? Join our [Discord server](https://discord.gg/5m5U3qpUhk)!**
ZLS is a non-official implementation of the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) for [Zig](https://ziglang.org/) in Zig. It provides developers with IDE [features](#features) in their editor.
## Installation
### See the [Installation Guide](https://zigtools.org/zls/install/) for editor and binary installation instructions.
### From Source
Building ZLS requires [a build of Zig master](https://ziglang.org/download/).
```bash
git clone https://github.com/zigtools/zls
cd zls
zig build -Doptimize=ReleaseSafe
```## Features
ZLS supports most language features, including simple type function support, using namespace, payload capture type resolution, custom packages, cImport and others. Support for comptime and semantic analysis is Work-in-Progress.
The following LSP features are supported:
- Completions
- Hover
- Goto definition/declaration
- Document symbols
- Find references
- Rename symbol
- Formatting using `zig fmt`
- Semantic token highlighting
- Inlay hints
- Code actions
- Selection ranges
- Folding regions## 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
- [`zig-lsp` by @xackus](https://github.com/xackus/zig-lsp)
- Inspiration for ZLS
- [`known-folders` by @ziglibs](https://github.com/ziglibs/known-folders)
- Provides API to access known folders on Linux, Windows and Mac OS
- [`zls` by @zigtools](https://github.com/zigtools/zls)
- Used by many ZLS developers to more efficiently work on ZLS## Quick Thanks :)
We'd like to take a second to thank all our awesome [contributors](https://github.com/zigtools/zls/graphs/contributors) and donators/backers/sponsors; if you have time or money to spare, consider partaking in either of these options - they help keep ZLS awesome for everyone!
[![OpenCollective Backers](https://opencollective.com/zigtools/backers.svg?width=890&limit=1000)](https://opencollective.com/zigtools#category-CONTRIBUTE)