Repository navigation
Conversation
|
Thanks for adding this. I think we should also add some documentation to the doc_config.nu to help people understand how to change from vertical to horizontal. Perhaps somewhere in this section. This could be in a separate PR if needed. |
I'm not sure how to best introduce the new information in that file, there doesn't seem to be a lot of details about menus there currently. The file does suggest going to https://www.nushell.sh/book/line_editor.html#menus for more details, and updating the sample configuration under the "columnar menu" heading to include the traversal setting would likely be helpful. That's where I ended up when I searched for the available settings for the menu. |
Co-authored-by: Darren Schroeder <[email protected]>
You might just put the completion menu in there with the new setting but have the whole thing commented out but with a description of the new option. I'm really just trying to figure out how people will discover this feature and be able to toggle it. |
I added a configuration example with a short description as a comment - is that description enough or should it be expanded in some way? When we are happy with the comment I could create a PR for adding the option and comment to https://www.nushell.sh/book/line_editor.html#completion-menu as well. |
|
I think it looks good. Thanks! |
|
@simonborje Can you please look into this. I'm not seeing horizontal or vertical even though my current settings are setting it. {
name: completion_menu
only_buffer_difference: false
marker: $" \n❯ (char -u '1f4ce') "
type: {
layout: columnar
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
tab_traversal: "horizontal" # Direction in which pressing <Tab> will cycle through options, "horizontal" or "vertical"
}
style: {
text: { fg: "#33ff00" }
selected_text: {attr: r}
description_text: yellow
match_text: {attr: u}
selected_match_text: {attr: ur}
}
}This is what I'm seeing on my Mac. It's working great on Windows. I wonder if there is some CRLF issue? |
|
Does it work as expected when no suggestions have descriptions? |
|
I think that the menu will only use one column if any of the options has a description. |
|
it's |


Make columnar menu tab traversal direction configurable. The configurable traversal direction feature was added to
reedlinewith nushell/reedline#951. This PR makes that configuration option available innushell.Release notes summary - What our users need to know
The feature makes it possible to choose the direction that items are placed in the columnar menu. With the default value of
"horizontal", items are ordered left-to-right in each row, with later items appearing in rows below earlier items.With the value set to
"vertical", items are ordered top-to-bottom in each column, with later items appearing in columns to the right of earlier items.The configuration option is currently called "tab_traversal" with a default value of "horizontal".
In order to toggle horizontal or vertical, add or update the completion_menu in your config.nu
Tasks after submitting