ZedScripts LSP
ZedScripts LSP is a language server protocol implemented in Python for the scripting format of Project Zomboid. Previously a VSCode extension, it is now reimplemented as a standalone LSP.
It is powered by the pz-scripts-data to provide up-to-date information about the Scripts format. See configuration to learn how to specify the dataset version.
Installation
Releases
Python package
ZedScripts LSP is available directly as a Python package if you ever need to use its functionality outside of an IDE.
PyPI
pip install ZedScripts
Git
pip install git+https://github.com/PZ-Wiki-Modding/ZedScripts-LSP.git
Dev
pip install -e .
Cache directory
A cache directory is used on your system to cache the pz-scripts-data and logs, as well as global configuration. You can find it here:
Linux
~/.zedscripts
Windows
%USERPROFILE%\.zedscripts
Configuration
The LSP uses configurations files .zedscripts.json which provide information to the LSP about various settings.
Example of configuration file content:
{
"$schema": "https://raw.githubusercontent.com/PZ-Wiki-Modding/ZedScripts-LSP/refs/heads/main/schema/zedscripts.json",
"dataset": {
"latest": true
},
"libraries": [
"~/.steam/debian-installation/steamapps/common/ProjectZomboid/projectzomboid/media",
]
}
They are optional and should be placed at the root of your workspaces or in the cache directory. The local configuration (root of your workspaces) will override the global configuration (cache directory).
📁 workspace1
📁 Contents/mods/YourMod/42/media/scripts
📄 example_script.txt
📄 .zedscripts.json
📁 workspace2
📄 .zedscripts.json
📁 ~
📁 .zedscripts
📄 .zedscripts.json
A schema is available to validate the configuration files and can be found in the schema directory.
See the following sections for detailed explanation of each parameters.
Dataset
You can configure the version of the pz-scripts-data dataset.
{
"dataset": {
...
}
}
The key-values which can be set in the dataset section are the following:
latest: a boolean indicating the LSP to use the latest available version for the dataset (latest game version and dataset version)stable: a boolean indicating the LSP to use the latest stable version of the datasetrelease: used to indicate a specific release version of the dataset with the following arguments:major: major build version (e.g.42,43)minor: minor build version (e.g.0,1)patch: patch build version (e.g.0,1)version(optional): the dataset version (e.g.0,1,2)- for example, version
42.21.0of the game would be specified as:
{
"release": {
"major": 42,
"minor": 21,
"patch": 0
}
}
It's suggested to use the stable option.
Libraries
A list of paths that should include the base game path, as well as other games that your mod depends on for its scripts. This will provide LSP the ability to find other blocks definitions that you may reference inside your mod's scripts.
{
"libraries": [
"path/to/base/game",
"path/to/other/dependent/game"
]
}
Ignored
A list of regex patterns tested on file paths that should be ignored by the LSP, by default this includes large script files that can slow down the LSP.
{
"ignored": [
"path/to/large/script/file"
]
}
Diagnostics
A list of diagnostics with modifiers to change the diagnostic behavior of the LSP. The following parameters:
type: the type of the diagnostic, that is the ID shown in the diagnostics hover tooltip (for example,BLOCK_UNKNOWN_BLOCK)enable(optional): boolean to disable the diagnosticseverity(optional): the severity level of the diagnostic (accepted values:Error,Warning,Information,Hint)tags(optional): an array of tags which an IDE may use to provide additional context or behavior for the diagnostic (accepted values:Unnecessary,Deprecated)
Each diagnostic by default have a specific set of modifiers that can be overridden in the configuration.
{
"diagnostics": [
{
"type": "BLOCK_UNKNOWN_BLOCK",
"enable": true,
"severity": "Warning",
"tags": ["Unnecessary"]
}
]
}
IDE configuration
Based on the IDE you use, you may need to install the ZedScripts LSP application for your OS in the releases (Linux, Windows).
Visual Studio Code
Install the ZedScripts extension from the Visual Studio Code marketplace. The extension will handle the downloading and setup of the ZedScripts LSP server for you.
VIM
Using yegappan/lsp, setup the ZedScripts LSP server as follows:
let lspServers = [
\ #{
\ name: 'zedscripts',
\ filetype: ['text', 'zedscripts'],
\ path: 'path/to/ZedScripts',
\ args: []
\ }
\ ]
autocmd User LspSetup call LspAddServer(lspServers)
License and contribution
This project is licensed under a MIT license. Before contributing to the project, please see CONTRIBUTING.
Metadata
Release files for ZedScripts 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| zedscripts-1.0.0.tar.gz | 55.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zedscripts-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 118.9 kB
Release files / zedscripts-1.0.0.tar.gz
| Download URL | zedscripts-1.0.0.tar.gz |
|---|---|
| Size | 55.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71bd585445cf407de16b2d084866bb19f3d401b8306ca974542edbda64e06eaa
|
|
BLAKE2b-256 checksum How to use checksums |
e67492242254659ab2a5a8b135f6320ac271e75a75d436a8fa5d741f967295d3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / zedscripts-1.0.0-py3-none-any.whl
| Download URL | zedscripts-1.0.0-py3-none-any.whl |
|---|---|
| Size | 63.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfe26706a142cb8f96c19756d323d01f0517ad13071cfa178ae1297f5f895a9e
|
|
BLAKE2b-256 checksum How to use checksums |
5f8d8365b73afcedf84a0b31d3b2f87e8586735b15986e63b49a4b0dbf61745d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ZedScripts 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.