Skip to content

Commit 1441efe

Browse files
committed
Added scoop ppm troubleshooting section.
Reported on pragtical/lsp#12 and pragtical/plugin-manager#6
1 parent 76c813a commit 1441efe

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

docs/setup/windows.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ scoop bucket add extras
5050
scoop install pragtical
5151
```
5252

53+
:::note Issues when installing plugins using ppm and pragtical installed from scoop?
54+
Make sure to check the [plugins -> troubleshooting] section for an
55+
explanation and solution to this issue.
56+
:::
57+
58+
[plugins -> troubleshooting]: /docs/user-guide/plugins#ppm-installed-from-scoop-fails-to-install-plugins
5359
[1]: https://github.com/pragtical/pragtical/releases
5460
[2]: https://github.com/pragtical/pragtical/releases/download/rolling/Pragtical-rolling-x86_64-setup.exe
5561
[3]: https://github.com/pragtical/pragtical/releases/download/rolling/pragtical-rolling-windows-x86_64.zip

docs/user-guide/plugins.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,42 @@ To fix you can try the following steps:
181181
3. Re-open the editor, launch the plugin manager and try again.
182182
4. If this doesn't solves the problem open a [plugin manager issue].
183183

184+
### PPM Installed from Scoop Fails to Install Plugins
185+
186+
If you installed `ppm` and `pragtical` from Scoop and receive an error message
187+
when trying to install plugins, such as `can't find dependency`, it indicates
188+
that `ppm` was unable to locate the installation data files for `pragtical`.
189+
190+
Scoop adds the following directories to the environment variable `PATH`:
191+
192+
* `C:\ProgramData\scoop\shims` (for globally installed apps)
193+
* `C:\Users\<YourUsername>\scoop\shims` (for user-installed apps)
194+
195+
It installs wrapper executables in these directories that redirect to the
196+
actual application installation paths, which can be:
197+
198+
* `C:\ProgramData\scoop\apps\pragtical\current` (globally installed)
199+
* `C:\Users\<YourUsername>\scoop\apps\pragtical\current` (user installed)
200+
201+
This strategy of using redirector executable wrappers can cause the plugin
202+
manager to fail when searching for the data files. The `pragtical.exe`
203+
redirector binary located in `C:\ProgramData\scoop\shims` or
204+
`C:\Users\<YourUsername>\scoop\shims` does not reside alongside the core Lua
205+
runtime files.
206+
207+
To successfully install plugins that have explicit dependencies on core plugins,
208+
you can use the `--datadir` option to specify the installation path of
209+
`pragtical` data files. For example, to install `lsp_quicklintjs`, which depends
210+
on the core plugin `language_js`, you can run:
211+
212+
```sh
213+
ppm install lsp_quicklintjs --datadir='C:\ProgramData\scoop\apps\pragtical\current\data'
214+
```
215+
216+
Another workaround is to prepend `C:\ProgramData\scoop\apps\pragtical\current`
217+
or `C:\Users\<YourUsername>\scoop\apps\pragtical\current` to the PATH environment
218+
variable. This allows the plugin manager to properly locate the data directory,
219+
so you won't need to specify `--datadir` each time you call `ppm`.
184220

185221
[plugin manager issue]: https://github.com/pragtical/plugin-manager
186222
[plugins repository]: https://github.com/pragtical/plugins

0 commit comments

Comments
 (0)