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
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,8 @@ CGE fork contributes back improvements that are not CGE-specific (see e.g. https
24
24
- Provide custom Lazarus config location (useful if you install Lazarus by [fpcupdeluxe](https://castle-engine.io/fpcupdeluxe) but still want `pasls` to read Lazarus config -- this is optional).
25
25
- Improve debugging by known log filename and more complete JSON logs.
26
26
27
+
- We add capability to configure the LSP server using `castle-pasls-paths.txt`, see below.
28
+
27
29
- We can also auto-detect _Castle Game Engine_ path in some situations:
28
30
- If the LSP server binary is distributed in `bin` of _Castle Game Engine_.
29
31
- Or if the environment 'CASTLE_ENGINE_PATH` is defined.
@@ -144,7 +146,7 @@ Additional keys in LSP initialization options can be used to influence the LSP s
144
146
145
147
- 2: Return an error to the LSP client. Some LSP clients will just hide the error, but some (like Emacs) will show it clearly and prominently.
146
148
147
-
## Extra configuration in castle-engine/pascal-language-server
149
+
## Extra configuration in castle-engine/pascal-language-server (castle-pasls.ini)
148
150
149
151
The `pasls` reads configuration file `castle-pasls.ini` in user config dir to enable some additional features.
150
152
@@ -194,6 +196,24 @@ option_2=-dSOME_DEFINE
194
196
option_3=-dSOMETHING_MORE
195
197
```
196
198
199
+
## Extra paths from `castle-pasls-paths.txt`
200
+
201
+
We also read `castle-pasls-paths.txt` file in the same directory as `castle-pasls.ini`.
202
+
203
+
The format of this is simpler: any line that is not empty and does not start with `#` (comment) is considered a path to add to FPC search paths. It is added as both units and include paths (causes both `-Fu` and `-Fi` for FPC).
204
+
205
+
This is useful e.g. to add paths to all your custom units, that you want to be available for autocompletion. It would be also possible to do this by extending `[extra_options]` in `castle-pasls.ini`, but that's sometimes too bothersome: you need to add them twice (if you want both `-Fu` and `-Fi`) and you need to remember to keep order of `option_xxx`.
0 commit comments