You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-32Lines changed: 4 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,31 +130,15 @@ opening a certain file type, see the [Neovim LSP documentation](https://neovim.i
130
130
131
131
## Configuration
132
132
133
-
The language server needs to know your library mapping to perform full analysis of the code. For this it uses a
134
-
configuration file in the [TOML](https://github.com/toml-lang/toml) format named `vhdl_ls.toml`.
135
-
136
-
`vhdl_ls` will load configuration files in the following order of priority (first to last):
137
-
138
-
1. A file named `.vhdl_ls.toml` in the user home folder.
139
-
2. A file name from the `VHDL_LS_CONFIG` environment variable.
140
-
3. A file named `vhdl_ls.toml` in the workspace root.
141
-
142
-
Settings in a later files overwrites those from previously loaded files.
143
-
144
-
Define the VHDL revision to use for parsing and analysis with the `standard` key.
145
-
The expected value is the year associated the VHDL standard.
146
-
Supported standards are 1993, 2008 and 2019 where both the long version ("2008") and the short version ("08") can be
147
-
used.
148
-
If nothing is specified, 2008 is used.
133
+
The language server needs to know your library mapping to perform full analysis of the code. For this it uses a configuration file in the [TOML](https://github.com/toml-lang/toml) format named `vhdl_ls.toml`.
149
134
150
135
> [!NOTE]
151
-
> Defining the standard feature is a relatively new feature (since april 2024).
152
-
> Anything but the 2008 standard will not change much at the moment.
136
+
> Read the full documentation in [the wiki](https://github.com/VHDL-LS/rust_hdl/wiki/VHDL%E2%80%90LS-Configuration)
153
137
154
-
**Example vhdl_ls.toml**
138
+
### Example vhdl_ls.toml / Quickstart
155
139
156
140
```toml
157
-
# What standard to use. This is optional and defaults to VHDL2008.
141
+
# What standard to use. This is optional and defaults to VHDL 2008.
158
142
standard = "2008"
159
143
# The preferred case for completions.
160
144
preferred_case = "lower"
@@ -189,18 +173,6 @@ unused = 'error' # Upgrade the 'unused' diagnostic to the 'error' severity
189
173
unnecessary_work_library = false# Disable linting for the 'library work;' statement
190
174
```
191
175
192
-
Using the `lint` table, you can configure the severity of diagnostics or turn of diagnostics altogether.
193
-
194
-
> [!WARNING]
195
-
> You can overwrite every diagnostic error code including syntax or analysis errors using the lint table.
196
-
> However, the intended use-case is for lints only.
197
-
> Overwriting syntax or analysis errors (e.g., error codes `mismatched_kinds` or `syntax`) can cause unwanted side
198
-
> effects
199
-
200
-
Paths in the `vhdl_ls.toml` can contain glob patterns (i.e., `.../*/`).
201
-
On Unix machines, they can contain environment variables using the `$NAME` or `${NAME}` syntax.
202
-
On Windows machines, use the `%NAME%` syntax to substitute environment variables.
203
-
204
176
## Ignoring errors
205
177
206
178
You can use the comment-pair `-- vhdl_ls off` and `-- vhdl_ls on` to conditionally disable and re-enable parsing of
"description": "Defines VHDL libraries in the project. Each library name (except 'work') maps to an object specifying source files.",
27
+
"patternProperties": {
28
+
"^(?!work$).+$": {
29
+
"type": "object",
30
+
"description": "A VHDL library definition. Library names must not be 'work' (reserved by VHDL spec).",
31
+
"properties": {
32
+
"files": {
33
+
"type": "array",
34
+
"description": "Array of source file paths or glob patterns belonging to this library. Either absolute or relative to vhdl_ls.toml.",
35
+
"items": {
36
+
"type": "string",
37
+
"description": "A file path or glob pattern (e.g., 'src/**/*.vhd', 'lib/ieee.vhd')."
38
+
}
39
+
},
40
+
"exclude": {
41
+
"type": "array",
42
+
"description": "Array of source file paths or glob patterns to exclude from this library.",
43
+
"items": {
44
+
"type": "string",
45
+
"description": "A file path or glob pattern to exclude (e.g., 'legacy/*', 'src/*_old.vhd')."
46
+
}
47
+
},
48
+
"is_third_party": {
49
+
"type": "boolean",
50
+
"description": "Whether this library is third-party. May affect diagnostic reporting. Defaults to false.",
51
+
"default": false
52
+
}
53
+
},
54
+
"additionalProperties": false,
55
+
"required": ["files"]
56
+
}
57
+
},
58
+
"additionalProperties": false
59
+
},
60
+
"lint": {
61
+
"type": "object",
62
+
"description": "Configures linting rules. Each key is a rule name, and the value controls its behavior (true/false to enable/disable, or a string for specific severity).",
63
+
"patternProperties": {
64
+
"^.+$": {
65
+
"anyOf": [
66
+
{ "type": "boolean" },
67
+
{
68
+
"type": "string",
69
+
"enum": ["hint", "info", "warning", "error"]
70
+
}
71
+
],
72
+
"description": "Lint rule configuration. Can be a boolean (enable/disable) or a string (e.g., 'warning', 'error')."
0 commit comments