This project implements a language server for Zeek script.
This is alpha-quality software, especially regarding type resolution. While it already now provides useful results, not all of Zeek script is resolved; we do however strive to either correctly resolve symbols or not at all, i.e., if a result is presented it should be correct.
Binaries for a number of different platforms are hosted on GitHub and can be installed with
curl -L https://github.com/bbannier/zeek-language-server/releases/latest/download/zeek-language-server-installer.sh | shThis also installs a binary which can be used to update the installation.
$ zeek-language-server-update
Checking for updates...
Already up to date; not upgradingAlternatively one can install the binary with a Python package manager, e.g.,
pipx
$ pipx install git+https://github.com/bbannier/zeek-language-server@t/wip
installed package zeek-language-server 0.73.3, installed using Python 3.13.8
These apps are now globally available
- zeek-language-server
done! ✨ 🌟 ✨This project requires Rust to build which can be set up e.g., with rustup.
The project can then be installed with
cargo install --git https://github.com/bbannier/zeek-language-server.gitThis installs a binary zeek-language-server which provides the full server.
In order to see symbols from Zeek system scripts, Zeek needs to be installed
and zeek-config should be in PATH.
For optional formatting support
zeek-format should be in PATH.
The server interprets the following initializationOptions:
-
inlay_hints_parameters(default:true): Whether to show inlay hints for function call parameters -
inlay_hints_variables(default:true): Whether to show inlay hints for variable declarations -
references(default:false): Whether to enable Go To References. -
rename(default:false): Whether to enable Rename. -
semantic_highlighting(default:true) Enable semantic highlighting. -
debug_ast_nodes(default:false) Enable debug output of AST nodes on hoverWARNING: Since typically Zeek scripts have incomplete
@loadstatements the provided list is very likely incomplete. Use a tool likegrepto search for all references of an identifier.
We provide a minimal extension for vscode which is published to the vscode marketplace. Additionally, an extension VSIX file is created for each release. On startup the extension will automatically download the server binary for the release.
For installation instructions on Emacs, see here.
For installation instructions on JetBrains IDEs, see here.
We provide binaries for releases for x86_64 Darwin or Linux systems. You should then set up your client to use this binary. A list of editor plugins can be found e.g., here.
See these instructions for VS Code setup and the list of features (some of which are VS Code specific).
This server provides support for highlighting via tree-sitter highlighting
queries. To
tweak existing or for adding new queries one needs to edit the files in
crates/tree-sitter-zeek/vendor,
and perform a bump of the submodule.