ZedScripts 0.0.3__tar.gz → 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. zedscripts-1.0.1/PKG-INFO +242 -0
  2. zedscripts-1.0.1/README.md +202 -0
  3. {zedscripts-0.0.3 → zedscripts-1.0.1}/pyproject.toml +2 -3
  4. zedscripts-1.0.1/src/ZedScripts/__about__.py +4 -0
  5. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/enums/Diagnostic.py +1 -1
  6. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/providers/notifications.py +5 -1
  7. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/scripts/block.py +1 -1
  8. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/server.py +2 -2
  9. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/structure/parser.py +0 -4
  10. zedscripts-1.0.1/src/ZedScripts.egg-info/PKG-INFO +242 -0
  11. zedscripts-0.0.3/PKG-INFO +0 -132
  12. zedscripts-0.0.3/README.md +0 -113
  13. zedscripts-0.0.3/src/ZedScripts/__about__.py +0 -1
  14. zedscripts-0.0.3/src/ZedScripts.egg-info/PKG-INFO +0 -132
  15. {zedscripts-0.0.3 → zedscripts-1.0.1}/LICENSE +0 -0
  16. {zedscripts-0.0.3 → zedscripts-1.0.1}/setup.cfg +0 -0
  17. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/__init__.py +0 -0
  18. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/enums/SyntaxErrorType.py +0 -0
  19. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/environment/__init__.py +0 -0
  20. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/environment/config.py +0 -0
  21. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/environment/document.py +0 -0
  22. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/environment/mod.py +0 -0
  23. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/environment/version.py +0 -0
  24. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/environment/workspace.py +0 -0
  25. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/locale/en.json +0 -0
  26. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/main.py +0 -0
  27. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/providers/actions.py +0 -0
  28. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/providers/capabilities.py +0 -0
  29. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/providers/debug.py +0 -0
  30. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/providers/diagnostics.py +0 -0
  31. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/providers/hover.py +0 -0
  32. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/providers/http.py +0 -0
  33. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/providers/locale.py +0 -0
  34. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/providers/semantic_tokens.py +0 -0
  35. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/scripts/__init__.py +0 -0
  36. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/scripts/dataset.py +0 -0
  37. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/scripts/value.py +0 -0
  38. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/scripts/version.py +0 -0
  39. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/structure/ast.py +0 -0
  40. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/structure/lexer.py +0 -0
  41. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts/utils.py +0 -0
  42. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts.egg-info/SOURCES.txt +0 -0
  43. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts.egg-info/dependency_links.txt +0 -0
  44. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts.egg-info/requires.txt +0 -0
  45. {zedscripts-0.0.3 → zedscripts-1.0.1}/src/ZedScripts.egg-info/top_level.txt +0 -0
@@ -0,0 +1,242 @@
1
+ Metadata-Version: 2.4
2
+ Name: ZedScripts
3
+ Version: 1.0.1
4
+ Author: SimKDT
5
+ License: MIT License
6
+
7
+ Copyright (c) 2026 PZ Wiki Modding
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ Requires-Python: >=3.12.3
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: lsprotocol
31
+ Requires-Dist: pygls
32
+ Requires-Dist: requests-cache
33
+ Requires-Dist: pydantic
34
+ Requires-Dist: deepmerge
35
+ Provides-Extra: build
36
+ Requires-Dist: pyinstaller; extra == "build"
37
+ Provides-Extra: debug
38
+ Requires-Dist: debugpy; extra == "debug"
39
+ Dynamic: license-file
40
+
41
+ # ZedScripts LSP
42
+
43
+ [![License](https://img.shields.io/github/license/PZ-Wiki-Modding/ZedScripts?label=License)](LICENSE)
44
+ ![Code Size](https://img.shields.io/github/languages/code-size/PZ-Wiki-Modding/ZedScripts?label=Code%20Size)
45
+ [![PyPi Version](https://img.shields.io/pypi/v/ZedScripts)](https://pypi.org/project/ZedScripts/)
46
+
47
+ ZedScripts LSP is a language server protocol implemented in Python for the [scripting format](https://pzwiki.net/wiki/Scripts) of Project Zomboid. Previously a [VSCode extension](https://github.com/PZ-Wiki-Modding/ZedScripts), it is now reimplemented as a standalone LSP.
48
+
49
+ It is powered by the [pz-scripts-data](https://github.com/PZ-Wiki-Modding/pz-scripts-data) to provide up-to-date information about the Scripts format. See [configuration](#configuration) to learn how to specify the dataset version.
50
+
51
+ ## Installation
52
+ ### Releases
53
+
54
+ ### Python package
55
+
56
+ ZedScripts LSP is available directly as a Python package if you ever need to use its functionality outside of an IDE.
57
+
58
+ <details open>
59
+ <summary>PyPI</summary>
60
+
61
+ ```bash
62
+ pip install ZedScripts
63
+ ```
64
+ </details>
65
+
66
+ <details>
67
+ <summary>Git</summary>
68
+
69
+ ```bash
70
+ pip install git+https://github.com/PZ-Wiki-Modding/ZedScripts-LSP.git
71
+ ```
72
+ </details>
73
+
74
+ <details>
75
+ <summary>Dev</summary>
76
+
77
+ ```bash
78
+ pip install -e .
79
+ ```
80
+ </details>
81
+
82
+ ## Cache directory
83
+
84
+ A cache directory is used on your system to cache the [pz-scripts-data](https://github.com/PZ-Wiki-Modding/pz-scripts-data) and logs, as well as global configuration. You can find it here:
85
+
86
+ <details>
87
+ <summary>Linux</summary>
88
+
89
+ ```bash
90
+ ~/.zedscripts
91
+ ```
92
+ </details>
93
+
94
+ <details>
95
+ <summary>Windows</summary>
96
+
97
+ ```bash
98
+ %USERPROFILE%\.zedscripts
99
+ ```
100
+ </details>
101
+
102
+ ## Configuration
103
+
104
+ The LSP uses configurations files `.zedscripts.json` which provide information to the LSP about various settings.
105
+
106
+ Example of configuration file content:
107
+ ```json
108
+ {
109
+ "$schema": "https://raw.githubusercontent.com/PZ-Wiki-Modding/ZedScripts-LSP/refs/heads/main/schema/zedscripts.json",
110
+ "dataset": {
111
+ "latest": true
112
+ },
113
+ "libraries": [
114
+ "~/.steam/debian-installation/steamapps/common/ProjectZomboid/projectzomboid/media",
115
+ ]
116
+ }
117
+ ```
118
+
119
+ They are optional and should be placed at the root of your workspaces or in the [cache directory](#cache-directory). The local configuration (root of your workspaces) will override the global configuration (cache directory).
120
+
121
+ ```bash
122
+ 📁 workspace1
123
+ 📁 Contents/mods/YourMod/42/media/scripts
124
+ 📄 example_script.txt
125
+ 📄 .zedscripts.json
126
+ 📁 workspace2
127
+ 📄 .zedscripts.json
128
+ ```
129
+ ```bash
130
+ 📁 ~
131
+ 📁 .zedscripts
132
+ 📄 .zedscripts.json
133
+ ```
134
+
135
+ A schema is available to validate the configuration files and can be found in the [schema directory](schema/zedscripts.json).
136
+
137
+ See the following sections for detailed explanation of each parameters.
138
+
139
+ ### Dataset
140
+ You can configure the version of the [pz-scripts-data](https://github.com/PZ-Wiki-Modding/pz-scripts-data) dataset.
141
+
142
+ ```json
143
+ {
144
+ "dataset": {
145
+ ...
146
+ }
147
+ }
148
+ ```
149
+
150
+ The key-values which can be set in the `dataset` section are the following:
151
+ - `latest`: a boolean indicating the LSP to use the latest available version for the dataset (latest game version and dataset version)
152
+ - `stable`: a boolean indicating the LSP to use the latest stable version of the dataset
153
+ - `release`: used to indicate a specific release version of the dataset with the following arguments:
154
+ - `major`: major build version (e.g. `42`, `43`)
155
+ - `minor`: minor build version (e.g. `0`, `1`)
156
+ - `patch`: patch build version (e.g. `0`, `1`)
157
+ - `version` (optional): the dataset version (e.g. `0`, `1`, `2`)
158
+ - for example, version `42.21.0` of the game would be specified as:
159
+ ```json
160
+ {
161
+ "release": {
162
+ "major": 42,
163
+ "minor": 21,
164
+ "patch": 0
165
+ }
166
+ }
167
+ ```
168
+
169
+ It's suggested to use the `stable` option.
170
+
171
+ ### Libraries
172
+ 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.
173
+ ```json
174
+ {
175
+ "libraries": [
176
+ "path/to/base/game",
177
+ "path/to/other/dependent/game"
178
+ ]
179
+ }
180
+ ```
181
+
182
+ ### Ignored
183
+ 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.
184
+ ```json
185
+ {
186
+ "ignored": [
187
+ "path/to/large/script/file"
188
+ ]
189
+ }
190
+ ```
191
+
192
+ ### Diagnostics
193
+ A list of diagnostics with modifiers to change the diagnostic behavior of the LSP. The following parameters:
194
+ - `type`: the type of the diagnostic, that is the ID shown in the diagnostics hover tooltip (for example, `BLOCK_UNKNOWN_BLOCK`)
195
+ - `enable` (optional): boolean to disable the diagnostic
196
+ - `severity` (optional): the severity level of the diagnostic (accepted values: `Error`, `Warning`, `Information`, `Hint`)
197
+ - `tags` (optional): an array of tags which an IDE may use to provide additional context or behavior for the diagnostic (accepted values: `Unnecessary`, `Deprecated`)
198
+
199
+ Each diagnostic by default have a specific set of modifiers that can be overridden in the configuration.
200
+
201
+ ```json
202
+ {
203
+ "diagnostics": [
204
+ {
205
+ "type": "BLOCK_UNKNOWN_BLOCK",
206
+ "enable": true,
207
+ "severity": "Warning",
208
+ "tags": ["Unnecessary"]
209
+ }
210
+ ]
211
+ }
212
+ ```
213
+
214
+ ## IDE configuration
215
+ Based on the IDE you use, you may need to install the ZedScripts LSP application for your OS in the [releases](https://github.com/PZ-Wiki-Modding/ZedScripts-LSP/releases) (Linux, Windows).
216
+
217
+ ### Visual Studio Code
218
+
219
+ Install the [ZedScripts extension](https://marketplace.visualstudio.com/items?itemName=SimKDT.ZedScripts) from the Visual Studio Code marketplace. The extension will handle the downloading and setup of the ZedScripts LSP server for you.
220
+
221
+ ### VIM
222
+
223
+ Using [yegappan/lsp](https://github.com/yegappan/lsp), setup the ZedScripts LSP server as follows:
224
+
225
+ ```vim
226
+ let lspServers = [
227
+ \ #{
228
+ \ name: 'zedscripts',
229
+ \ filetype: ['text', 'zedscripts'],
230
+ \ path: 'path/to/ZedScripts',
231
+ \ args: []
232
+ \ }
233
+ \ ]
234
+
235
+ autocmd User LspSetup call LspAddServer(lspServers)
236
+ ```
237
+
238
+ > [!NOTE]
239
+ > You can see [this video](https://www.youtube.com/watch?v=-5lb_jLQmKc) which explains how to set up VIM, and notably setup a LSP server.
240
+
241
+ ## License and contribution
242
+ This project is licensed under a [MIT license](LICENSE). Before contributing to the project, please see [CONTRIBUTING](CONTRIBUTING.md).
@@ -0,0 +1,202 @@
1
+ # ZedScripts LSP
2
+
3
+ [![License](https://img.shields.io/github/license/PZ-Wiki-Modding/ZedScripts?label=License)](LICENSE)
4
+ ![Code Size](https://img.shields.io/github/languages/code-size/PZ-Wiki-Modding/ZedScripts?label=Code%20Size)
5
+ [![PyPi Version](https://img.shields.io/pypi/v/ZedScripts)](https://pypi.org/project/ZedScripts/)
6
+
7
+ ZedScripts LSP is a language server protocol implemented in Python for the [scripting format](https://pzwiki.net/wiki/Scripts) of Project Zomboid. Previously a [VSCode extension](https://github.com/PZ-Wiki-Modding/ZedScripts), it is now reimplemented as a standalone LSP.
8
+
9
+ It is powered by the [pz-scripts-data](https://github.com/PZ-Wiki-Modding/pz-scripts-data) to provide up-to-date information about the Scripts format. See [configuration](#configuration) to learn how to specify the dataset version.
10
+
11
+ ## Installation
12
+ ### Releases
13
+
14
+ ### Python package
15
+
16
+ ZedScripts LSP is available directly as a Python package if you ever need to use its functionality outside of an IDE.
17
+
18
+ <details open>
19
+ <summary>PyPI</summary>
20
+
21
+ ```bash
22
+ pip install ZedScripts
23
+ ```
24
+ </details>
25
+
26
+ <details>
27
+ <summary>Git</summary>
28
+
29
+ ```bash
30
+ pip install git+https://github.com/PZ-Wiki-Modding/ZedScripts-LSP.git
31
+ ```
32
+ </details>
33
+
34
+ <details>
35
+ <summary>Dev</summary>
36
+
37
+ ```bash
38
+ pip install -e .
39
+ ```
40
+ </details>
41
+
42
+ ## Cache directory
43
+
44
+ A cache directory is used on your system to cache the [pz-scripts-data](https://github.com/PZ-Wiki-Modding/pz-scripts-data) and logs, as well as global configuration. You can find it here:
45
+
46
+ <details>
47
+ <summary>Linux</summary>
48
+
49
+ ```bash
50
+ ~/.zedscripts
51
+ ```
52
+ </details>
53
+
54
+ <details>
55
+ <summary>Windows</summary>
56
+
57
+ ```bash
58
+ %USERPROFILE%\.zedscripts
59
+ ```
60
+ </details>
61
+
62
+ ## Configuration
63
+
64
+ The LSP uses configurations files `.zedscripts.json` which provide information to the LSP about various settings.
65
+
66
+ Example of configuration file content:
67
+ ```json
68
+ {
69
+ "$schema": "https://raw.githubusercontent.com/PZ-Wiki-Modding/ZedScripts-LSP/refs/heads/main/schema/zedscripts.json",
70
+ "dataset": {
71
+ "latest": true
72
+ },
73
+ "libraries": [
74
+ "~/.steam/debian-installation/steamapps/common/ProjectZomboid/projectzomboid/media",
75
+ ]
76
+ }
77
+ ```
78
+
79
+ They are optional and should be placed at the root of your workspaces or in the [cache directory](#cache-directory). The local configuration (root of your workspaces) will override the global configuration (cache directory).
80
+
81
+ ```bash
82
+ 📁 workspace1
83
+ 📁 Contents/mods/YourMod/42/media/scripts
84
+ 📄 example_script.txt
85
+ 📄 .zedscripts.json
86
+ 📁 workspace2
87
+ 📄 .zedscripts.json
88
+ ```
89
+ ```bash
90
+ 📁 ~
91
+ 📁 .zedscripts
92
+ 📄 .zedscripts.json
93
+ ```
94
+
95
+ A schema is available to validate the configuration files and can be found in the [schema directory](schema/zedscripts.json).
96
+
97
+ See the following sections for detailed explanation of each parameters.
98
+
99
+ ### Dataset
100
+ You can configure the version of the [pz-scripts-data](https://github.com/PZ-Wiki-Modding/pz-scripts-data) dataset.
101
+
102
+ ```json
103
+ {
104
+ "dataset": {
105
+ ...
106
+ }
107
+ }
108
+ ```
109
+
110
+ The key-values which can be set in the `dataset` section are the following:
111
+ - `latest`: a boolean indicating the LSP to use the latest available version for the dataset (latest game version and dataset version)
112
+ - `stable`: a boolean indicating the LSP to use the latest stable version of the dataset
113
+ - `release`: used to indicate a specific release version of the dataset with the following arguments:
114
+ - `major`: major build version (e.g. `42`, `43`)
115
+ - `minor`: minor build version (e.g. `0`, `1`)
116
+ - `patch`: patch build version (e.g. `0`, `1`)
117
+ - `version` (optional): the dataset version (e.g. `0`, `1`, `2`)
118
+ - for example, version `42.21.0` of the game would be specified as:
119
+ ```json
120
+ {
121
+ "release": {
122
+ "major": 42,
123
+ "minor": 21,
124
+ "patch": 0
125
+ }
126
+ }
127
+ ```
128
+
129
+ It's suggested to use the `stable` option.
130
+
131
+ ### Libraries
132
+ 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.
133
+ ```json
134
+ {
135
+ "libraries": [
136
+ "path/to/base/game",
137
+ "path/to/other/dependent/game"
138
+ ]
139
+ }
140
+ ```
141
+
142
+ ### Ignored
143
+ 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.
144
+ ```json
145
+ {
146
+ "ignored": [
147
+ "path/to/large/script/file"
148
+ ]
149
+ }
150
+ ```
151
+
152
+ ### Diagnostics
153
+ A list of diagnostics with modifiers to change the diagnostic behavior of the LSP. The following parameters:
154
+ - `type`: the type of the diagnostic, that is the ID shown in the diagnostics hover tooltip (for example, `BLOCK_UNKNOWN_BLOCK`)
155
+ - `enable` (optional): boolean to disable the diagnostic
156
+ - `severity` (optional): the severity level of the diagnostic (accepted values: `Error`, `Warning`, `Information`, `Hint`)
157
+ - `tags` (optional): an array of tags which an IDE may use to provide additional context or behavior for the diagnostic (accepted values: `Unnecessary`, `Deprecated`)
158
+
159
+ Each diagnostic by default have a specific set of modifiers that can be overridden in the configuration.
160
+
161
+ ```json
162
+ {
163
+ "diagnostics": [
164
+ {
165
+ "type": "BLOCK_UNKNOWN_BLOCK",
166
+ "enable": true,
167
+ "severity": "Warning",
168
+ "tags": ["Unnecessary"]
169
+ }
170
+ ]
171
+ }
172
+ ```
173
+
174
+ ## IDE configuration
175
+ Based on the IDE you use, you may need to install the ZedScripts LSP application for your OS in the [releases](https://github.com/PZ-Wiki-Modding/ZedScripts-LSP/releases) (Linux, Windows).
176
+
177
+ ### Visual Studio Code
178
+
179
+ Install the [ZedScripts extension](https://marketplace.visualstudio.com/items?itemName=SimKDT.ZedScripts) from the Visual Studio Code marketplace. The extension will handle the downloading and setup of the ZedScripts LSP server for you.
180
+
181
+ ### VIM
182
+
183
+ Using [yegappan/lsp](https://github.com/yegappan/lsp), setup the ZedScripts LSP server as follows:
184
+
185
+ ```vim
186
+ let lspServers = [
187
+ \ #{
188
+ \ name: 'zedscripts',
189
+ \ filetype: ['text', 'zedscripts'],
190
+ \ path: 'path/to/ZedScripts',
191
+ \ args: []
192
+ \ }
193
+ \ ]
194
+
195
+ autocmd User LspSetup call LspAddServer(lspServers)
196
+ ```
197
+
198
+ > [!NOTE]
199
+ > You can see [this video](https://www.youtube.com/watch?v=-5lb_jLQmKc) which explains how to set up VIM, and notably setup a LSP server.
200
+
201
+ ## License and contribution
202
+ This project is licensed under a [MIT license](LICENSE). Before contributing to the project, please see [CONTRIBUTING](CONTRIBUTING.md).
@@ -3,9 +3,8 @@ name = "ZedScripts"
3
3
  description = ""
4
4
  readme = { file = "README.md", content-type = "text/markdown" }
5
5
  requires-python = ">=3.12.3"
6
- version = "0.0.3"
7
- license = "MIT"
8
- license-files = ["LICENSE"]
6
+ version = "1.0.1"
7
+ license = {file = "LICENSE"}
9
8
  authors = [
10
9
  { name = "SimKDT" },
11
10
  ]
@@ -0,0 +1,4 @@
1
+ __version__ = "1.0.1"
2
+
3
+ if __name__ == "__main__":
4
+ print(__version__)
@@ -76,7 +76,7 @@ DiagnosticDefinition(DiagnosticType.BLOCK_UNEXPECTED_ID,
76
76
  tags=[DiagnosticTag.Unnecessary])
77
77
  DiagnosticDefinition(DiagnosticType.BLOCK_MISSING_ID,
78
78
  DiagnosticSeverity.Error,
79
- args={"type": str, "id": str})
79
+ args={"type": str})
80
80
  DiagnosticDefinition(DiagnosticType.BLOCK_HAS_ID_IN_PARENT,
81
81
  DiagnosticSeverity.Error,
82
82
  args={"type": str, "parent_type": str, "invalid_blocks": list},
@@ -1,6 +1,6 @@
1
1
  import enum
2
2
 
3
- from typing import TYPE_CHECKING, Literal, overload
3
+ from typing import TYPE_CHECKING, Literal, overload, Any
4
4
  if TYPE_CHECKING:
5
5
  from ..environment import WorkspaceType
6
6
 
@@ -40,6 +40,10 @@ def send_notification(
40
40
  def send_notification(
41
41
  notification: Literal[ZedNotification.LOADING_DOCUMENTS],
42
42
  *, uri: str, workspace_type: 'WorkspaceType', index: int) -> None: ...
43
+ @overload
44
+ def send_notification(
45
+ notification: Literal[ZedNotification.LOADING_DOCUMENTS_DONE],
46
+ ) -> None: ...
43
47
 
44
48
 
45
49
  def send_notification(notification: ZedNotification, **kargs) -> None:
@@ -405,7 +405,7 @@ class ScriptBlock(Block, Element["BlockNode"]):
405
405
  self.add_diagnostic(
406
406
  DiagnosticType.BLOCK_MISSING_ID,
407
407
  node.type.to_range(),
408
- {"id": ID_data}
408
+ {"type": type}
409
409
  )
410
410
  return False
411
411
 
@@ -31,7 +31,7 @@ class ZedServer(LanguageServer):
31
31
  zedlocalizer.load_locale_files()
32
32
  ZedServer.instance = self
33
33
 
34
- def send_notification(self, method: notifications.ZedNotification, params: dict | None = None) -> None:
34
+ def send_notification(self, method: notifications.ZedNotification, params: dict = {}) -> None:
35
35
  logging.debug("Sending notification: %s with params: %s", method, params)
36
36
  self.protocol.notify(
37
37
  method,
@@ -214,7 +214,7 @@ def initialized(server: ZedServer, params: types.InitializedParams) -> None:
214
214
  if should_load_libraries:
215
215
  Workspace.load_libraries()
216
216
 
217
- server.send_notification(notifications.ZedNotification.LOADING_DOCUMENTS_DONE)
217
+ notifications.send_notification(notifications.ZedNotification.LOADING_DOCUMENTS_DONE)
218
218
 
219
219
 
220
220
  @zedserver.feature(types.TEXT_DOCUMENT_DID_OPEN)
@@ -93,10 +93,6 @@ def parse_type_id(tokens: list[Token]) -> tuple[TokenCollection | None, TokenCol
93
93
  return type_token, id_token
94
94
 
95
95
 
96
- def parse(text: str) -> ParseResult:
97
- return parse_tokens(Lexer.tokenize(text))
98
-
99
-
100
96
  def parse_tokens(tokens: TokenCollection) -> ParseResult:
101
97
  parser = Parser()
102
98
  unparsed_tokens: list[Token] = []
@@ -0,0 +1,242 @@
1
+ Metadata-Version: 2.4
2
+ Name: ZedScripts
3
+ Version: 1.0.1
4
+ Author: SimKDT
5
+ License: MIT License
6
+
7
+ Copyright (c) 2026 PZ Wiki Modding
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
26
+
27
+ Requires-Python: >=3.12.3
28
+ Description-Content-Type: text/markdown
29
+ License-File: LICENSE
30
+ Requires-Dist: lsprotocol
31
+ Requires-Dist: pygls
32
+ Requires-Dist: requests-cache
33
+ Requires-Dist: pydantic
34
+ Requires-Dist: deepmerge
35
+ Provides-Extra: build
36
+ Requires-Dist: pyinstaller; extra == "build"
37
+ Provides-Extra: debug
38
+ Requires-Dist: debugpy; extra == "debug"
39
+ Dynamic: license-file
40
+
41
+ # ZedScripts LSP
42
+
43
+ [![License](https://img.shields.io/github/license/PZ-Wiki-Modding/ZedScripts?label=License)](LICENSE)
44
+ ![Code Size](https://img.shields.io/github/languages/code-size/PZ-Wiki-Modding/ZedScripts?label=Code%20Size)
45
+ [![PyPi Version](https://img.shields.io/pypi/v/ZedScripts)](https://pypi.org/project/ZedScripts/)
46
+
47
+ ZedScripts LSP is a language server protocol implemented in Python for the [scripting format](https://pzwiki.net/wiki/Scripts) of Project Zomboid. Previously a [VSCode extension](https://github.com/PZ-Wiki-Modding/ZedScripts), it is now reimplemented as a standalone LSP.
48
+
49
+ It is powered by the [pz-scripts-data](https://github.com/PZ-Wiki-Modding/pz-scripts-data) to provide up-to-date information about the Scripts format. See [configuration](#configuration) to learn how to specify the dataset version.
50
+
51
+ ## Installation
52
+ ### Releases
53
+
54
+ ### Python package
55
+
56
+ ZedScripts LSP is available directly as a Python package if you ever need to use its functionality outside of an IDE.
57
+
58
+ <details open>
59
+ <summary>PyPI</summary>
60
+
61
+ ```bash
62
+ pip install ZedScripts
63
+ ```
64
+ </details>
65
+
66
+ <details>
67
+ <summary>Git</summary>
68
+
69
+ ```bash
70
+ pip install git+https://github.com/PZ-Wiki-Modding/ZedScripts-LSP.git
71
+ ```
72
+ </details>
73
+
74
+ <details>
75
+ <summary>Dev</summary>
76
+
77
+ ```bash
78
+ pip install -e .
79
+ ```
80
+ </details>
81
+
82
+ ## Cache directory
83
+
84
+ A cache directory is used on your system to cache the [pz-scripts-data](https://github.com/PZ-Wiki-Modding/pz-scripts-data) and logs, as well as global configuration. You can find it here:
85
+
86
+ <details>
87
+ <summary>Linux</summary>
88
+
89
+ ```bash
90
+ ~/.zedscripts
91
+ ```
92
+ </details>
93
+
94
+ <details>
95
+ <summary>Windows</summary>
96
+
97
+ ```bash
98
+ %USERPROFILE%\.zedscripts
99
+ ```
100
+ </details>
101
+
102
+ ## Configuration
103
+
104
+ The LSP uses configurations files `.zedscripts.json` which provide information to the LSP about various settings.
105
+
106
+ Example of configuration file content:
107
+ ```json
108
+ {
109
+ "$schema": "https://raw.githubusercontent.com/PZ-Wiki-Modding/ZedScripts-LSP/refs/heads/main/schema/zedscripts.json",
110
+ "dataset": {
111
+ "latest": true
112
+ },
113
+ "libraries": [
114
+ "~/.steam/debian-installation/steamapps/common/ProjectZomboid/projectzomboid/media",
115
+ ]
116
+ }
117
+ ```
118
+
119
+ They are optional and should be placed at the root of your workspaces or in the [cache directory](#cache-directory). The local configuration (root of your workspaces) will override the global configuration (cache directory).
120
+
121
+ ```bash
122
+ 📁 workspace1
123
+ 📁 Contents/mods/YourMod/42/media/scripts
124
+ 📄 example_script.txt
125
+ 📄 .zedscripts.json
126
+ 📁 workspace2
127
+ 📄 .zedscripts.json
128
+ ```
129
+ ```bash
130
+ 📁 ~
131
+ 📁 .zedscripts
132
+ 📄 .zedscripts.json
133
+ ```
134
+
135
+ A schema is available to validate the configuration files and can be found in the [schema directory](schema/zedscripts.json).
136
+
137
+ See the following sections for detailed explanation of each parameters.
138
+
139
+ ### Dataset
140
+ You can configure the version of the [pz-scripts-data](https://github.com/PZ-Wiki-Modding/pz-scripts-data) dataset.
141
+
142
+ ```json
143
+ {
144
+ "dataset": {
145
+ ...
146
+ }
147
+ }
148
+ ```
149
+
150
+ The key-values which can be set in the `dataset` section are the following:
151
+ - `latest`: a boolean indicating the LSP to use the latest available version for the dataset (latest game version and dataset version)
152
+ - `stable`: a boolean indicating the LSP to use the latest stable version of the dataset
153
+ - `release`: used to indicate a specific release version of the dataset with the following arguments:
154
+ - `major`: major build version (e.g. `42`, `43`)
155
+ - `minor`: minor build version (e.g. `0`, `1`)
156
+ - `patch`: patch build version (e.g. `0`, `1`)
157
+ - `version` (optional): the dataset version (e.g. `0`, `1`, `2`)
158
+ - for example, version `42.21.0` of the game would be specified as:
159
+ ```json
160
+ {
161
+ "release": {
162
+ "major": 42,
163
+ "minor": 21,
164
+ "patch": 0
165
+ }
166
+ }
167
+ ```
168
+
169
+ It's suggested to use the `stable` option.
170
+
171
+ ### Libraries
172
+ 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.
173
+ ```json
174
+ {
175
+ "libraries": [
176
+ "path/to/base/game",
177
+ "path/to/other/dependent/game"
178
+ ]
179
+ }
180
+ ```
181
+
182
+ ### Ignored
183
+ 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.
184
+ ```json
185
+ {
186
+ "ignored": [
187
+ "path/to/large/script/file"
188
+ ]
189
+ }
190
+ ```
191
+
192
+ ### Diagnostics
193
+ A list of diagnostics with modifiers to change the diagnostic behavior of the LSP. The following parameters:
194
+ - `type`: the type of the diagnostic, that is the ID shown in the diagnostics hover tooltip (for example, `BLOCK_UNKNOWN_BLOCK`)
195
+ - `enable` (optional): boolean to disable the diagnostic
196
+ - `severity` (optional): the severity level of the diagnostic (accepted values: `Error`, `Warning`, `Information`, `Hint`)
197
+ - `tags` (optional): an array of tags which an IDE may use to provide additional context or behavior for the diagnostic (accepted values: `Unnecessary`, `Deprecated`)
198
+
199
+ Each diagnostic by default have a specific set of modifiers that can be overridden in the configuration.
200
+
201
+ ```json
202
+ {
203
+ "diagnostics": [
204
+ {
205
+ "type": "BLOCK_UNKNOWN_BLOCK",
206
+ "enable": true,
207
+ "severity": "Warning",
208
+ "tags": ["Unnecessary"]
209
+ }
210
+ ]
211
+ }
212
+ ```
213
+
214
+ ## IDE configuration
215
+ Based on the IDE you use, you may need to install the ZedScripts LSP application for your OS in the [releases](https://github.com/PZ-Wiki-Modding/ZedScripts-LSP/releases) (Linux, Windows).
216
+
217
+ ### Visual Studio Code
218
+
219
+ Install the [ZedScripts extension](https://marketplace.visualstudio.com/items?itemName=SimKDT.ZedScripts) from the Visual Studio Code marketplace. The extension will handle the downloading and setup of the ZedScripts LSP server for you.
220
+
221
+ ### VIM
222
+
223
+ Using [yegappan/lsp](https://github.com/yegappan/lsp), setup the ZedScripts LSP server as follows:
224
+
225
+ ```vim
226
+ let lspServers = [
227
+ \ #{
228
+ \ name: 'zedscripts',
229
+ \ filetype: ['text', 'zedscripts'],
230
+ \ path: 'path/to/ZedScripts',
231
+ \ args: []
232
+ \ }
233
+ \ ]
234
+
235
+ autocmd User LspSetup call LspAddServer(lspServers)
236
+ ```
237
+
238
+ > [!NOTE]
239
+ > You can see [this video](https://www.youtube.com/watch?v=-5lb_jLQmKc) which explains how to set up VIM, and notably setup a LSP server.
240
+
241
+ ## License and contribution
242
+ This project is licensed under a [MIT license](LICENSE). Before contributing to the project, please see [CONTRIBUTING](CONTRIBUTING.md).
zedscripts-0.0.3/PKG-INFO DELETED
@@ -1,132 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ZedScripts
3
- Version: 0.0.3
4
- Author: SimKDT
5
- License-Expression: MIT
6
- Requires-Python: >=3.12.3
7
- Description-Content-Type: text/markdown
8
- License-File: LICENSE
9
- Requires-Dist: lsprotocol
10
- Requires-Dist: pygls
11
- Requires-Dist: requests-cache
12
- Requires-Dist: pydantic
13
- Requires-Dist: deepmerge
14
- Provides-Extra: build
15
- Requires-Dist: pyinstaller; extra == "build"
16
- Provides-Extra: debug
17
- Requires-Dist: debugpy; extra == "debug"
18
- Dynamic: license-file
19
-
20
- # ZedScripts LSP
21
-
22
- [![License](https://img.shields.io/github/license/PZ-Wiki-Modding/ZedScripts?label=License)](LICENSE)
23
- ![Code Size](https://img.shields.io/github/languages/code-size/PZ-Wiki-Modding/ZedScripts?label=Code%20Size)
24
- [![PyPi Version](https://img.shields.io/pypi/v/ZedScripts)](https://pypi.org/project/ZedScripts/)
25
- [![PyPi Downloads](https://img.shields.io/pypi/dm/ZedScripts)](https://pypi.org/project/ZedScripts/)
26
- ![PyPI Python Version](https://img.shields.io/pypi/pyversions/ZedScripts)
27
-
28
- > [!IMPORTANT]
29
- > Work In Progress, this is a BETA release
30
-
31
- ZedScripts LSP is a language server protocol implementation in Python for the [scripting format]() of Project Zomboid. Previously a VSCode extension, it is now reimplemented as a standalone LSP.
32
-
33
- ## Installation
34
- ### Releases
35
-
36
- ### Python package
37
-
38
- <!-- <details open>
39
- <summary>PyPi</summary>
40
-
41
- ```bash
42
- pip install ZedScripts-LSP
43
- ```
44
- </details> -->
45
-
46
- <details>
47
- <summary>Git</summary>
48
-
49
- ```bash
50
- pip install git+https://github.com/PZ-Wiki-Modding/ZedScripts-LSP.git
51
- ```
52
- </details>
53
-
54
- <details>
55
- <summary>Local</summary>
56
-
57
- ```bash
58
- pip install .
59
- ```
60
- </details>
61
-
62
- ## Usage
63
-
64
- You can either launch the LSP from Python or you can launch the software as is.
65
-
66
- ### LSP cache directory
67
-
68
- The LSP uses a cache directory on your system to store temporary files and logs as well as configuration files. You can find it here:
69
-
70
- <details>
71
- <summary>Linux</summary>
72
-
73
- ```bash
74
- ~/.zedscripts
75
- ```
76
- </details>
77
-
78
- <details>
79
- <summary>Windows</summary>
80
-
81
- ```bash
82
- %USERPROFILE%\.zedscripts
83
- ```
84
- </details>
85
-
86
- ### Configuration
87
-
88
- The LSP uses configurations files which provide information to the LSP about various settings. You have access to a global configuration file
89
-
90
- Example configuration:
91
- ```json
92
- {
93
- "dataset": {
94
- "latest": true
95
- },
96
- "libraries": [
97
- "/home/simon/.steam/debian-installation/steamapps/common/ProjectZomboid/projectzomboid/media",
98
- ]
99
- }
100
- ```
101
-
102
- WIP: proper documentation will come soon
103
-
104
- ## IDE configuration
105
- Based on the IDE you use, you may need to install the ZedScripts LSP application for your OS in the [releases](https://github.com/PZ-Wiki-Modding/ZedScripts-LSP/releases) (Linux, Windows).
106
-
107
- ### Visual Studio Code
108
-
109
- Install the [ZedScripts extension](https://marketplace.visualstudio.com/items?itemName=SimKDT.ZedScripts) from the Visual Studio Code marketplace. The extension will handle the downloading and setup of the ZedScripts LSP server for you.
110
-
111
- ### VIM
112
-
113
- Using [yegappan/lsp](https://github.com/yegappan/lsp), setup the ZedScripts LSP server as follows:
114
-
115
- ```vim
116
- let lspServers = [
117
- \ #{
118
- \ name: 'zedscripts',
119
- \ filetype: ['text', 'zedscripts'],
120
- \ path: 'path/to/ZedScripts',
121
- \ args: []
122
- \ }
123
- \ ]
124
-
125
- autocmd User LspSetup call LspAddServer(lspServers)
126
- ```
127
-
128
- > [!NOTE]
129
- > You can see [this video](https://www.youtube.com/watch?v=-5lb_jLQmKc) which explains how to set up VIM, and notably setup a LSP server.
130
-
131
- ## License
132
- See [LICENSE](LICENSE) for details.
@@ -1,113 +0,0 @@
1
- # ZedScripts LSP
2
-
3
- [![License](https://img.shields.io/github/license/PZ-Wiki-Modding/ZedScripts?label=License)](LICENSE)
4
- ![Code Size](https://img.shields.io/github/languages/code-size/PZ-Wiki-Modding/ZedScripts?label=Code%20Size)
5
- [![PyPi Version](https://img.shields.io/pypi/v/ZedScripts)](https://pypi.org/project/ZedScripts/)
6
- [![PyPi Downloads](https://img.shields.io/pypi/dm/ZedScripts)](https://pypi.org/project/ZedScripts/)
7
- ![PyPI Python Version](https://img.shields.io/pypi/pyversions/ZedScripts)
8
-
9
- > [!IMPORTANT]
10
- > Work In Progress, this is a BETA release
11
-
12
- ZedScripts LSP is a language server protocol implementation in Python for the [scripting format]() of Project Zomboid. Previously a VSCode extension, it is now reimplemented as a standalone LSP.
13
-
14
- ## Installation
15
- ### Releases
16
-
17
- ### Python package
18
-
19
- <!-- <details open>
20
- <summary>PyPi</summary>
21
-
22
- ```bash
23
- pip install ZedScripts-LSP
24
- ```
25
- </details> -->
26
-
27
- <details>
28
- <summary>Git</summary>
29
-
30
- ```bash
31
- pip install git+https://github.com/PZ-Wiki-Modding/ZedScripts-LSP.git
32
- ```
33
- </details>
34
-
35
- <details>
36
- <summary>Local</summary>
37
-
38
- ```bash
39
- pip install .
40
- ```
41
- </details>
42
-
43
- ## Usage
44
-
45
- You can either launch the LSP from Python or you can launch the software as is.
46
-
47
- ### LSP cache directory
48
-
49
- The LSP uses a cache directory on your system to store temporary files and logs as well as configuration files. You can find it here:
50
-
51
- <details>
52
- <summary>Linux</summary>
53
-
54
- ```bash
55
- ~/.zedscripts
56
- ```
57
- </details>
58
-
59
- <details>
60
- <summary>Windows</summary>
61
-
62
- ```bash
63
- %USERPROFILE%\.zedscripts
64
- ```
65
- </details>
66
-
67
- ### Configuration
68
-
69
- The LSP uses configurations files which provide information to the LSP about various settings. You have access to a global configuration file
70
-
71
- Example configuration:
72
- ```json
73
- {
74
- "dataset": {
75
- "latest": true
76
- },
77
- "libraries": [
78
- "/home/simon/.steam/debian-installation/steamapps/common/ProjectZomboid/projectzomboid/media",
79
- ]
80
- }
81
- ```
82
-
83
- WIP: proper documentation will come soon
84
-
85
- ## IDE configuration
86
- Based on the IDE you use, you may need to install the ZedScripts LSP application for your OS in the [releases](https://github.com/PZ-Wiki-Modding/ZedScripts-LSP/releases) (Linux, Windows).
87
-
88
- ### Visual Studio Code
89
-
90
- Install the [ZedScripts extension](https://marketplace.visualstudio.com/items?itemName=SimKDT.ZedScripts) from the Visual Studio Code marketplace. The extension will handle the downloading and setup of the ZedScripts LSP server for you.
91
-
92
- ### VIM
93
-
94
- Using [yegappan/lsp](https://github.com/yegappan/lsp), setup the ZedScripts LSP server as follows:
95
-
96
- ```vim
97
- let lspServers = [
98
- \ #{
99
- \ name: 'zedscripts',
100
- \ filetype: ['text', 'zedscripts'],
101
- \ path: 'path/to/ZedScripts',
102
- \ args: []
103
- \ }
104
- \ ]
105
-
106
- autocmd User LspSetup call LspAddServer(lspServers)
107
- ```
108
-
109
- > [!NOTE]
110
- > You can see [this video](https://www.youtube.com/watch?v=-5lb_jLQmKc) which explains how to set up VIM, and notably setup a LSP server.
111
-
112
- ## License
113
- See [LICENSE](LICENSE) for details.
@@ -1 +0,0 @@
1
- __version__ = "0.0.1"
@@ -1,132 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ZedScripts
3
- Version: 0.0.3
4
- Author: SimKDT
5
- License-Expression: MIT
6
- Requires-Python: >=3.12.3
7
- Description-Content-Type: text/markdown
8
- License-File: LICENSE
9
- Requires-Dist: lsprotocol
10
- Requires-Dist: pygls
11
- Requires-Dist: requests-cache
12
- Requires-Dist: pydantic
13
- Requires-Dist: deepmerge
14
- Provides-Extra: build
15
- Requires-Dist: pyinstaller; extra == "build"
16
- Provides-Extra: debug
17
- Requires-Dist: debugpy; extra == "debug"
18
- Dynamic: license-file
19
-
20
- # ZedScripts LSP
21
-
22
- [![License](https://img.shields.io/github/license/PZ-Wiki-Modding/ZedScripts?label=License)](LICENSE)
23
- ![Code Size](https://img.shields.io/github/languages/code-size/PZ-Wiki-Modding/ZedScripts?label=Code%20Size)
24
- [![PyPi Version](https://img.shields.io/pypi/v/ZedScripts)](https://pypi.org/project/ZedScripts/)
25
- [![PyPi Downloads](https://img.shields.io/pypi/dm/ZedScripts)](https://pypi.org/project/ZedScripts/)
26
- ![PyPI Python Version](https://img.shields.io/pypi/pyversions/ZedScripts)
27
-
28
- > [!IMPORTANT]
29
- > Work In Progress, this is a BETA release
30
-
31
- ZedScripts LSP is a language server protocol implementation in Python for the [scripting format]() of Project Zomboid. Previously a VSCode extension, it is now reimplemented as a standalone LSP.
32
-
33
- ## Installation
34
- ### Releases
35
-
36
- ### Python package
37
-
38
- <!-- <details open>
39
- <summary>PyPi</summary>
40
-
41
- ```bash
42
- pip install ZedScripts-LSP
43
- ```
44
- </details> -->
45
-
46
- <details>
47
- <summary>Git</summary>
48
-
49
- ```bash
50
- pip install git+https://github.com/PZ-Wiki-Modding/ZedScripts-LSP.git
51
- ```
52
- </details>
53
-
54
- <details>
55
- <summary>Local</summary>
56
-
57
- ```bash
58
- pip install .
59
- ```
60
- </details>
61
-
62
- ## Usage
63
-
64
- You can either launch the LSP from Python or you can launch the software as is.
65
-
66
- ### LSP cache directory
67
-
68
- The LSP uses a cache directory on your system to store temporary files and logs as well as configuration files. You can find it here:
69
-
70
- <details>
71
- <summary>Linux</summary>
72
-
73
- ```bash
74
- ~/.zedscripts
75
- ```
76
- </details>
77
-
78
- <details>
79
- <summary>Windows</summary>
80
-
81
- ```bash
82
- %USERPROFILE%\.zedscripts
83
- ```
84
- </details>
85
-
86
- ### Configuration
87
-
88
- The LSP uses configurations files which provide information to the LSP about various settings. You have access to a global configuration file
89
-
90
- Example configuration:
91
- ```json
92
- {
93
- "dataset": {
94
- "latest": true
95
- },
96
- "libraries": [
97
- "/home/simon/.steam/debian-installation/steamapps/common/ProjectZomboid/projectzomboid/media",
98
- ]
99
- }
100
- ```
101
-
102
- WIP: proper documentation will come soon
103
-
104
- ## IDE configuration
105
- Based on the IDE you use, you may need to install the ZedScripts LSP application for your OS in the [releases](https://github.com/PZ-Wiki-Modding/ZedScripts-LSP/releases) (Linux, Windows).
106
-
107
- ### Visual Studio Code
108
-
109
- Install the [ZedScripts extension](https://marketplace.visualstudio.com/items?itemName=SimKDT.ZedScripts) from the Visual Studio Code marketplace. The extension will handle the downloading and setup of the ZedScripts LSP server for you.
110
-
111
- ### VIM
112
-
113
- Using [yegappan/lsp](https://github.com/yegappan/lsp), setup the ZedScripts LSP server as follows:
114
-
115
- ```vim
116
- let lspServers = [
117
- \ #{
118
- \ name: 'zedscripts',
119
- \ filetype: ['text', 'zedscripts'],
120
- \ path: 'path/to/ZedScripts',
121
- \ args: []
122
- \ }
123
- \ ]
124
-
125
- autocmd User LspSetup call LspAddServer(lspServers)
126
- ```
127
-
128
- > [!NOTE]
129
- > You can see [this video](https://www.youtube.com/watch?v=-5lb_jLQmKc) which explains how to set up VIM, and notably setup a LSP server.
130
-
131
- ## License
132
- See [LICENSE](LICENSE) for details.
File without changes
File without changes