Skip to content

Commit 7a74651

Browse files
committed
investigate improving plugin display names in the lazy dashboard. update the TODOs and README to reflect that this isn't possible
1 parent ef8d5ad commit 7a74651

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Changelog
22

33

4+
## [Unreleased]
5+
6+
### Docs
7+
8+
- Add note about plugin display names in the Lazy dashboard
9+
10+
411
## [0.2.0] - 2023-12-26
512

613
### Features

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,17 @@ Don't forget to update each plugin's dependencies as well
193193
}
194194
```
195195

196+
**Note on Plugin Names in Lazy Dashboard**
197+
198+
When you open the lazy dashboard with `:Lazy`, each plugin's display name is determined by its directory path. Using nix store paths, this becomes difficult to read because each plugin name is prepended with it's hash. As far as I'm aware there's no way to fix this.
199+
200+
Lazy provides the `name` option for plugin config which sets a custom display name for the plugin, but this also:
201+
- sets a custom directory path for the plugin
202+
- uses the custom name to try to find the plugins `setup()` function
203+
204+
Even with a `dir` configured, setting `name` will break plugin setup.
205+
206+
196207
### Mason
197208

198209
Mason is a package manager for LSP servers, DAP servers, linters, and formatters. Just like plugin management with Lazy, this conflicts with Nix. The easiest way to keep mason in your config on non-Nix platforms while disabling it on NixOS is to use the provided `mason_enabled` function to conditionally enable Mason.

TODO.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
can we let the user supply "my-plugin" while also checking the store for
1212
e.g. "My-Plugin", "my_plugin", "my-plugin.nvim"...
1313
- [x] figure out how to play nicely with mason
14-
- [ ] see if there's a way to improve plugin name display in the lazy dashboard (i.e. plugin name, not full nix store path)
14+
- [x] see if there's a way to improve plugin name display in the lazy dashboard (i.e. plugin name, not full nix store path)
15+
there is not. see the `Configuration of Other Plugins` section in the README for more details
1516

1617
## Configuration
1718

0 commit comments

Comments
 (0)