Closed pidgeon777 closed 5 months ago
Additionally, it would be cool to display descriptions for the folders themselves, instead of the Expand to select an item...
text.
So, a couple things:
commands = {
{
"<CMD>lua require('mine.general_functions').profile_activator(1)<CR>",
description = "Profiler Activate",
},
-- ....
},
It looks like you're using the right-hand side (RHS) of a mapping, the first value in a command
table is supposed to be the LHS (like :MyCommand, e.g. the name of the command to run). I think probably what you actually want here is:
functions = {
{
function()
require('mine.general_functions').profile_activator(1)
end,
description = "Profiler Activate",
},
},
Additionally, it would be cool to display descriptions for the folders themselves, instead of the Expand to select an item... text.
This should be a very easy fix though.
It appears that no description was shown in the Legendary
panel because the width was too small: in reality, the description was there, but it was not visible.
Also, adding description
under the itemgroup
field in the Legendary
settings, actually replaced the Expand to select an item...
text with the description.
Gotcha, that makes sense. I'd recommend using functions
instead of commands
for the type of items you've listed above. It will work the same but give you a better UX experience.
Sounds like this is a non-issue then.
Similar Issues
Neovim Version
Steps to Reproduce
Run
:Legendary
.Expected Behavior
I would expect the description to be shown for each of the grouped commands.
Actual Behavior
When you run
:Legendary
, there will be some new folders in the results (Debug
,LSP
,Utils
) and the commands will be grouped under them:The problem is that no description will be shown for the folder sub-items, but just the raw command string, instead of the command description:
Minimal Configuration to Reproduce
Use this
legendary.nvim
config:Output from :LegendaryLog
``` [22/05/2024 14:29:44][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 14:27:57][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 14:24:06][legendary.nvim] Took 0.0756 ms to filter items in context. [22/05/2024 14:24:06][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 14:24:06][legendary.nvim] Relaunching select UI for an item group [22/05/2024 14:23:48][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 14:22:55][legendary.nvim] Took 0.4923 ms to filter items in context. [22/05/2024 14:22:55][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 14:18:46][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 14:16:56][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 14:16:08][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 14:15:07][legendary.nvim] Took 0.1672 ms to filter items in context. [22/05/2024 14:15:07][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 14:15:07][legendary.nvim] Relaunching select UI for an item group [22/05/2024 14:15:06][legendary.nvim] Took 1.4557 ms to filter items in context. [22/05/2024 14:15:06][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 14:14:46][legendary.nvim] Took 0.5837 ms to filter items in context. [22/05/2024 14:14:46][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 14:14:44][legendary.nvim] Took 3.5659 ms to filter items in context. [22/05/2024 14:14:44][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 14:14:43][legendary.nvim] Took 0.415 ms to filter items in context. [22/05/2024 14:14:43][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 14:14:36][legendary.nvim] Took 0.168 ms to filter items in context. [22/05/2024 14:14:36][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 14:14:36][legendary.nvim] Relaunching select UI for an item group [22/05/2024 14:14:31][legendary.nvim] Took 0.8971 ms to filter items in context. [22/05/2024 14:14:31][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 14:14:17][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 14:13:33][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 13:57:20][legendary.nvim] Took 0.0837 ms to filter items in context. [22/05/2024 13:57:20][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:57:20][legendary.nvim] Relaunching select UI for an item group [22/05/2024 13:57:19][legendary.nvim] Took 0.4672 ms to filter items in context. [22/05/2024 13:57:19][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:57:19][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 13:55:41][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:41][legendary.nvim] Preparing to execute selected item [22/05/2024 13:55:40][legendary.nvim] Took 0.0628 ms to filter items in context. [22/05/2024 13:55:40][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:40][legendary.nvim] Relaunching select UI for an item group [22/05/2024 13:55:39][legendary.nvim] Took 0.5087 ms to filter items in context. [22/05/2024 13:55:39][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:38][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:38][legendary.nvim] Preparing to execute selected item [22/05/2024 13:55:38][legendary.nvim] Took 0.01 ms to filter items in context. [22/05/2024 13:55:38][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:38][legendary.nvim] Relaunching select UI for an item group [22/05/2024 13:55:37][legendary.nvim] Took 0.9621 ms to filter items in context. [22/05/2024 13:55:37][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:36][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:36][legendary.nvim] Preparing to execute selected item [22/05/2024 13:55:34][legendary.nvim] Took 0.1342 ms to filter items in context. [22/05/2024 13:55:34][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:34][legendary.nvim] Relaunching select UI for an item group [22/05/2024 13:55:30][legendary.nvim] Took 9.1982 ms to filter items in context. [22/05/2024 13:55:30][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:28][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:28][legendary.nvim] Preparing to execute selected item [22/05/2024 13:55:24][legendary.nvim] Took 0.0315 ms to filter items in context. [22/05/2024 13:55:24][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:24][legendary.nvim] Relaunching select UI for an item group [22/05/2024 13:55:22][legendary.nvim] Took 6.9534 ms to filter items in context. [22/05/2024 13:55:22][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:18][legendary.nvim] Took 0.0401 ms to filter items in context. [22/05/2024 13:55:18][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:55:18][legendary.nvim] Relaunching select UI for an item group [22/05/2024 13:55:09][legendary.nvim] Took 4.4476 ms to filter items in context. [22/05/2024 13:55:09][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:54:46][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:54:46][legendary.nvim] Preparing to execute selected item [22/05/2024 13:54:45][legendary.nvim] Took 0.0745 ms to filter items in context. [22/05/2024 13:54:45][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:54:45][legendary.nvim] Relaunching select UI for an item group [22/05/2024 13:54:42][legendary.nvim] Took 0.9508 ms to filter items in context. [22/05/2024 13:54:42][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:54:34][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:54:34][legendary.nvim] Preparing to execute selected item [22/05/2024 13:54:28][legendary.nvim] Took 0.1571 ms to filter items in context. [22/05/2024 13:54:28][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:54:28][legendary.nvim] Relaunching select UI for an item group [22/05/2024 13:54:05][legendary.nvim] Took 0.4791 ms to filter items in context. [22/05/2024 13:54:05][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:54:03][legendary.nvim] Took 3.3629 ms to filter items in context. [22/05/2024 13:54:03][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:54:00][legendary.nvim] Took 1.5875 ms to filter items in context. [22/05/2024 13:54:00][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:54:00][legendary.nvim] setup() parsed and applied all configuration. [22/05/2024 13:51:44][legendary.nvim] Took 1.1046 ms to filter items in context. [22/05/2024 13:51:44][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:51:01][legendary.nvim] Took 0.5238 ms to filter items in context. [22/05/2024 13:51:01][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:50:49][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:50:49][legendary.nvim] Preparing to execute selected item [22/05/2024 13:50:44][legendary.nvim] Took 1.2398 ms to filter items in context. [22/05/2024 13:50:44][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:50:44][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:50:44][legendary.nvim] Preparing to execute selected item [22/05/2024 13:50:43][legendary.nvim] Took 1.2021 ms to filter items in context. [22/05/2024 13:50:43][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:50:43][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:50:43][legendary.nvim] Preparing to execute selected item [22/05/2024 13:50:38][legendary.nvim] Took 0.4417 ms to filter items in context. [22/05/2024 13:50:38][legendary.nvim] Config.sort.frecency is enabled, but sqlite is not available or database could not be opened, frecency is automatically disabled. [22/05/2024 13:50:38][legendary.nvim] setup() parsed and applied all configuration. ```:LegendaryLog
output (click to expand)Additional Details and/or Screenshots
No response