Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to disable popups for ui#input #317

Closed
shaunbalnave opened this issue Jul 19, 2023 · 4 comments
Closed

Option to disable popups for ui#input #317

shaunbalnave opened this issue Jul 19, 2023 · 4 comments

Comments

@shaunbalnave
Copy link

shaunbalnave commented Jul 19, 2023

I find the command line the more natural place to for example input the new name of a wiki page when calling wiki-page-rename (or something near the bottom like the telescope layout strategy "bottom_pane"). Wondering if you could add an option to disable the use of popups for ui#input? (sorry if it's there already and I missed it.)

@lervag
Copy link
Owner

lervag commented Jul 19, 2023

I find the command line the more natural place to for example input the new name of a wiki page when calling wiki-page-rename (or something near the bottom like the telescope layout strategy "bottom_pane").

That's fair!

Wondering if you could add an option to disable the use of popups for ui#input? (sorry if it's there already and I missed it.)

Nope, this is not there; I'll add it. I think I'll add something like this:

let g:wiki_ui_method = {
      \ 'input': 'legacy',
      \ 'confirm': 'legacy',
      \ 'select': 'nvim',
      \}

Where the defaults will be nvim on Neovim and legacy else. I want to call it "legacy", because it utilizes the "old" input() functions.

What do you think?

lervag added a commit that referenced this issue Jul 19, 2023
@lervag
Copy link
Owner

lervag commented Jul 19, 2023

I've added a first version now, please test. If you update, then you can use configuration similar to what I proposed above.

@lervag lervag closed this as completed Jul 19, 2023
lervag added a commit that referenced this issue Jul 19, 2023
@shaunbalnave
Copy link
Author

That's a good solution, thank you! I like the separation of input, confirm and select, I think legacy is good mainly for renames, since I check the status line for the current filename first so my eyes are already at the command line (and I'm used to using vim-eunuch to :Rename at the command line too)

@lervag
Copy link
Owner

lervag commented Jul 20, 2023

Great, I'm glad you like the solution!

One of the core ideas behind adding these popups was actually aligned to what you are writing. I found I was using these things while my eyes where focusing on the cursor, so having the popups there seemed more convenient :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants