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

Feature: Improved FzfLua resume #1686

Closed
1 task done
miroshQa opened this issue Jan 8, 2025 · 52 comments
Closed
1 task done

Feature: Improved FzfLua resume #1686

miroshQa opened this issue Jan 8, 2025 · 52 comments

Comments

@miroshQa
Copy link

miroshQa commented Jan 8, 2025

Have you RTFM'd?

  • I have done proper research

Feature Request

Continuation of #1595

Problem:

Currently, ":FzfLua resume" is very limited compared to ":Telescope resume" because all picker actions that select an entry close the fzf process, so ":FzfLua resume" works by rerunning the picker again. However, rerunning the picker again is inefficient, and we also lose the selected entry position.

Solution:

All "select entry" actions should hide the picker by default instead of closing the process and performing the corresponding action (open file, etc.). It turned out to be possible to implement according to the discussion in #1595.

@miroshQa miroshQa added the feature request New feature label Jan 8, 2025
@miroshQa
Copy link
Author

miroshQa commented Jan 8, 2025

I also think it would be good to swap 'Esc' and 'A-Esc.' So, 'Esc' should hide the picker by default, and 'A-Esc' should terminate. That would provide better defaults in my opinion

@ibhagwan
Copy link
Owner

ibhagwan commented Jan 8, 2025

I also think it would be good to swap 'Esc' and 'A-Esc.' So, 'Esc' should hide the picker by default, and 'A-Esc' should terminate. That would provide better defaults in my opinion

I’m going to create a profile (name suggestion welcome) that if setup will change this behavior for the user.

You’ll be able to set it from :FzfLua profiles or:

require("fzf-lua").setup({"hide"}) -- or whatever name we come up with 

We might beed two profiles one for hide and another for “sticky” for what you wanted in the other issue.

@miroshQa
Copy link
Author

miroshQa commented Jan 8, 2025

Is the "hide" profile about the closing process and "sticky" about hiding the window? Did I understand that correctly?

Will the "sticky" profile be the default? I just don't get why anyone would want to use the "hide" profile then if it only has downsides, like not being able to fully use FzfLua resume. Or did I miss something, and it could actually be better for someone because we free up memory right after the picker closes, for example?

@ibhagwan
Copy link
Owner

ibhagwan commented Jan 8, 2025

Is the "hide" profile about the closing process and "sticky" about hiding the window? Did I understand that correctly?

I’m not sure myself haven’t given it much thought yet, “hide” would be just replacing abort with hide.
“Sticky” could potentially be having fzf-lua permanently open in a split for example and switching between buffers/files (not even sure if that’s possible).

Will the "sticky" profile be the default? I just don't get why anyone would want to use the "hide" profile then if it only has downsides, like not being able to fully use FzfLua resume. Or did I miss something, and it could actually be better for someone because we free up memory right after the picker closes, for example?

Nothing will be the new default unless you specifically set it to be. There is a potential downside to “hide” which is the process running in the background say you started a long running operation like grep_project on a huge project hide continues the process in the background consuming CPU (a lot of it sometimes), might not be desirable.

@ibhagwan
Copy link
Owner

@ibhagwan
If you select only one entry each time, they are the same.
If you select multiple entries(--multi)

exec_silent does nothing but hide when you hide enter
reload also cancel all your selection.
I think that's expected behavior for fzf: execute-silent won't do anything to tui while reload actually replace your list?

@phanen, just did some testing, exec_silent seems to work pretty good, I can’t reproduce what you’re describing here, the only downside is an extremely long command with a reserved function id for every bind.

It’s also not supported by skim or fzf < 0.36 but I deem that a non issue.

@ibhagwan
Copy link
Owner

Started work on this in the hide branch, don’t try it yet as I as to leave mid way so it’s not working :)

@phanen
Copy link
Contributor

phanen commented Jan 11, 2025

That's weird, they are different when do multi-select:

FZF_DEFAULT_OPTS=--multi bash mini.sh '+lua fzf=require"fzf-lua"' '+lua fzf.files{actions={enter={fn=fzf.hide,exec_silent=true}}}'
FZF_DEFAULT_OPTS=--multi bash mini.sh '+lua fzf=require"fzf-lua"' '+lua fzf.files{actions={enter={fn=fzf.hide,reload=true}}}'

(patch mini.sh to make it allow nvim args:

-HOME=${TEMPDIR} PACKPATH=${packpath} ${nvim_bin} -u ${tmp_rtp}/${plug_name}/scripts/init.lua
+HOME=${TEMPDIR} PACKPATH=${packpath} ${nvim_bin} -u ${tmp_rtp}/${plug_name}/scripts/init.lua "$@"

@ibhagwan
Copy link
Owner

That's weird, they are different when do multi-select:

@phanen, I'm not sure if I'm getting it, you set the action fn to hide without performing any edit, why would you expect it to do anything?

It seems everything working as expected for me, can you both try the hide branch and lmk if it works well for you @miroshQa, @phanen?

@phanen
Copy link
Contributor

phanen commented Jan 14, 2025

@phanen, I'm not sure if I'm getting it, you set the action fn to hide without performing any edit, why would you expect it to do anything?

@ibhagwan No, sorry for my poor explaining. With these command you should have launch fzf win, then:

  1. Type tab to select multiple entries.
  2. Type enter.
  3. FzfLua resume

Then reload and exec_silence should have different behaviors. That's what I want to explain. Not a problem, I think.

People use this "hide" profile usually just select one -> hide -> resume and select another one -> hide... Nothing different in this case.

But when select multiple one -> hide -> resume, select multiple one again... I personally rely on the behavior of reload. There's no problem, since I just bind this behavior to another special key.

It seems everything working as expected for me, can you both try the hide branch and lmk if it works well for you @miroshQa, @phanen?

Crash with prefix="select-all"?

require('fzf-lua').setup {
  'hide',
  actions = {
    files = { ['alt-q'] = { fn = fa.file_sel_to_qf, prefix = 'select-all' } },
  },
}
[Fzf-lua] fzf error 2: unknown action: select-allexecute-silent(VIMRUNTIME='/

I guess prefix and exec_silent cannot be used together.

@ibhagwan
Copy link
Owner

ibhagwan commented Jan 14, 2025

Then reload and exec_silence should have different behaviors. That's what I want to explain. Not a problem, I think.

Reload is completely different action, it’s used to reload the list completely, an example would be git_status after a stage/unstafe, you want to reload the list to get the new file status.

But when select multiple one -> hide -> resume, select multiple one again... I personally rely on the behavior of reload. There's no problem, since I just bind this behavior to another special key.

Maybe you can bind a key in fzf to clear-selection or toggle-selection?

I guess prefix and exec_silent cannot be used together.

Can be used together this is a bug, I just have add the prefix to the action select-all+execute-action(…).

@phanen
Copy link
Contributor

phanen commented Jan 14, 2025

Another bug, only happened when you set more than 8 binds...

{
  "hide",
  actions = {
    files = {
      ["alt-1"] = function() end,
      ["alt-2"] = function() end,
      ["alt-3"] = function() end,
      ["alt-4"] = function() end,
      ["alt-5"] = function() end,
      ["alt-6"] = function() end,
      ["alt-7"] = function() end,
      ["alt-8"] = function() end,
      ["alt-9"] = function() end,
      -- ["alt-0"] = function() end,
    },
  },
}

Then FzfLua files

@miroshQa
Copy link
Author

That's weird, they are different when do multi-select:

@phanen, I'm not sure if I'm getting it, you set the action fn to hide without performing any edit, why would you expect it to do anything?

It seems everything working as expected for me, can you both try the hide branch and lmk if it works well for you @miroshQa, @phanen?

Everything works well! 👍

@ibhagwan
Copy link
Owner

Another bug, only happened when you set more than 8 binds...

{
  "hide",
  actions = {
    files = {
      ["alt-1"] = function() end,
      ["alt-2"] = function() end,
      ["alt-3"] = function() end,
      ["alt-4"] = function() end,
      ["alt-5"] = function() end,
      ["alt-6"] = function() end,
      ["alt-7"] = function() end,
      ["alt-8"] = function() end,
      ["alt-9"] = function() end,
      -- ["alt-0"] = function() end,
    },
  },
}

Then FzfLua files

@phanen, easy fix, probably just need to increase the size of our circular buffer caching the fzf callbacks:

local _MAX_LEN = vim.g.fzf_lua_shell_maxlen or 10

@ibhagwan
Copy link
Owner

@phanen, try the latest commit? Both prefix issue and the 10+ binds issue was fixed.

@phanen
Copy link
Contributor

phanen commented Jan 14, 2025

@ibhagwan Everything work fine for me now. Thanks for your works!

@ibhagwan
Copy link
Owner

With 10+ custom binds in files we get to a 20 registered functions, changed the ring buffer size to 50, should hopefully be fine for a while, I'm thinking how can I eliminate these callbacks but doesn't seem like possible, even with fzf --listen as we still have to run specific lua code for each action.

ibhagwan added a commit that referenced this issue Jan 14, 2025
The profile changes the default binds to hide the fzf-lua window
instead of aborting it, therefore keeping cursor position, selection,
etc.

Note that this also continues long running operations in the background
so be mindful of sending fzf to background on a large mono repo, can
still be aborted with `ctrl-c` or `alt-esc`.

Enable with:
```lua
-- Set as base profile
:lua require("fzf-lua").setup({"hide"})
-- More than one profile
:lua require("fzf-lua").setup({"border-fused","hide"})
-- Or with `profiles`:
:FzfLua profiles load=hide
-- More than one profile
:FzfLua profiles load={"border-fused","hide"}
```
@ibhagwan
Copy link
Owner

321b545, wrote proper commit message, gonna give this a few days of testing and feedback and take it from there.

@miroshQa
Copy link
Author

miroshQa commented Jan 14, 2025

Shouldn't this README tip be changed to something like this?

Tip

By default, pressing Esc or selecting any entry terminates the fzf process. As such, the resume feature is not perfect and is limited to resuming the picker query and sometimes additional parameters, such as regex in grep. For a more "complete" resume, use the "hide" profile. This will keep the fzf process running in the background, allowing "FzfLua resume" to restore the picker state entirely, including cursor position and selection.

To configure hiding by default:

require("fzf-lua").setup({
  "hide",
  -- your other settings here 
})

@ibhagwan
Copy link
Owner

Shouldn't this README tip be changed to something like this?

Tip

By default, pressing Esc or selecting any entry terminates the fzf process. As such, the resume feature is not perfect and is limited to resuming the picker query and sometimes additional parameters, such as regex in grep. For a more "complete" resume, use the "hide" profile. This will keep the fzf process running in the background, allowing "FzfLua resume" to restore the picker state entirely, including cursor position and selection.

To configure hiding by default:

require("fzf-lua").setup({
  "hide",
  -- your other settings here 
})

Good idea @miroshQa, not sure if it’s possible to submit a PR to the PR but I can add it later :)

ibhagwan added a commit that referenced this issue Jan 14, 2025
The profile changes the default binds to hide the fzf-lua window
instead of aborting it, therefore keeping cursor position, selection,
etc.

Note that this also continues long running operations in the background
so be mindful of sending fzf to background on a large mono repo, can
still be aborted with `ctrl-c` or `alt-esc`.

Enable with:
```lua
-- Set as base profile
:lua require("fzf-lua").setup({"hide"})
-- More than one profile
:lua require("fzf-lua").setup({"border-fused","hide"})
-- Or with `profiles`:
:FzfLua profiles load=hide
-- More than one profile
:FzfLua profiles load={"border-fused","hide"}
```
@ibhagwan
Copy link
Owner

ibhagwan commented Jan 14, 2025

ecefa89

@miroshQa, also added hide to profile list.

I have to say been running this for a while and I really like this new additon.

ibhagwan added a commit that referenced this issue Jan 14, 2025
The profile changes the default binds to hide the fzf-lua window
instead of aborting it, therefore keeping cursor position, selection,
etc.

Note that this also continues long running operations in the background
so be mindful of sending fzf to background on a large mono repo, can
still be aborted with `ctrl-c` or `alt-esc`.

Enable with:
```lua
-- Set as base profile
:lua require("fzf-lua").setup({"hide"})
-- More than one profile
:lua require("fzf-lua").setup({"border-fused","hide"})
-- Or with `profiles`:
:FzfLua profiles load=hide
-- More than one profile
:FzfLua profiles load={"border-fused","hide"}
```
@phanen
Copy link
Contributor

phanen commented Jan 15, 2025

require("fzf-lua").fzf_exec("ls")
E5108: Error executing lua ...al/share/nvim/lazy/fzf-lua/lua/fzf-lua/profiles/hide.lua:34: attempt to index field 'actions' (a nil value)
stack traceback:
        ...al/share/nvim/lazy/fzf-lua/lua/fzf-lua/profiles/hide.lua:34: in function 'enrich'
        ...an/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/config.lua:822: in function 'normalize_opts'
        ...phan/.local/share/nvim/lazy/fzf-lua/lua/fzf-lua/core.lua:140: in function 'fzf_exec'

@phanen
Copy link
Contributor

phanen commented Jan 15, 2025

Another two issues for hide:

  • --history is unusable since we didn't accept
  • for the same reason, get_last_query is also unusable?

ibhagwan added a commit that referenced this issue Jan 15, 2025
The profile changes the default binds to hide the fzf-lua window
instead of aborting it, therefore keeping cursor position, selection,
etc.

Note that this also continues long running operations in the background
so be mindful of sending fzf to background on a large mono repo, can
still be aborted with `ctrl-c` or `alt-esc`.

Enable with:
```lua
-- Set as base profile
:lua require("fzf-lua").setup({"hide"})
-- More than one profile
:lua require("fzf-lua").setup({"border-fused","hide"})
-- Or with `profiles`:
:FzfLua profiles load=hide
-- More than one profile
:FzfLua profiles load={"border-fused","hide"}
```
@ibhagwan
Copy link
Owner

require("fzf-lua").fzf_exec("ls")

Fixed in the last force push ced1e22

Another two issues for hide:
--history is unusable since we didn't accept
for the same reason, get_last_query is also unusable?

All of the exit chain isn’t called as the process is sent to background, colorschemes doesn’t restore the original scheme on hide as well, to fix last query I’d have to resort to extracting it from the window object as I used to in the past (instead of relying on --print-query).

ibhagwan added a commit that referenced this issue Jan 15, 2025
The profile changes the default binds to hide the fzf-lua window
instead of aborting it, therefore keeping cursor position, selection,
etc.

Note that this also continues long running operations in the background
so be mindful of sending fzf to background on a large mono repo, can
still be aborted with `ctrl-c` or `alt-esc`.

Enable with:
```lua
-- Set as base profile
:lua require("fzf-lua").setup({"hide"})
-- More than one profile
:lua require("fzf-lua").setup({"border-fused","hide"})
-- Or with `profiles`:
:FzfLua profiles load=hide
-- More than one profile
:FzfLua profiles load={"border-fused","hide"}
```
ibhagwan added a commit that referenced this issue Jan 19, 2025
The profile changes the default binds to hide the fzf-lua window
instead of aborting it, therefore keeping cursor position, selection,
etc.

Note that this also continues long running operations in the background
so be mindful of sending fzf to background on a large mono repo, can
still be aborted with `ctrl-c` or `alt-esc`.

Enable with:
```lua
-- Set as base profile
:lua require("fzf-lua").setup({"hide"})
-- More than one profile
:lua require("fzf-lua").setup({"border-fused","hide"})
-- Or with `profiles`:
:FzfLua profiles load=hide
-- More than one profile
:FzfLua profiles load={"border-fused","hide"}
```
ibhagwan added a commit that referenced this issue Jan 19, 2025
The profile changes the default binds to hide the fzf-lua window
instead of aborting it, therefore keeping cursor position, selection,
etc.

Note that this also continues long running operations in the background
so be mindful of sending fzf to background on a large mono repo, can
still be aborted with `ctrl-c` or `alt-esc`.

Enable with:
```lua
-- Set as base profile
:lua require("fzf-lua").setup({"hide"})
-- More than one profile
:lua require("fzf-lua").setup({"border-fused","hide"})
-- Or with `profiles`:
:FzfLua profiles load=hide
-- More than one profile
:FzfLua profiles load={"border-fused","hide"}
```
ibhagwan added a commit that referenced this issue Jan 19, 2025
The profile changes the default binds to hide the fzf-lua window
instead of aborting it, therefore keeping cursor position, selection,
etc.

Note that this also continues long running operations in the background
so be mindful of sending fzf to background on a large mono repo, can
still be aborted with `ctrl-c` or `alt-esc`.

Enable with:
```lua
-- Set as base profile
:lua require("fzf-lua").setup({"hide"})
-- More than one profile
:lua require("fzf-lua").setup({"border-fused","hide"})
-- Or with `profiles`:
:FzfLua profiles load=hide
-- More than one profile
:FzfLua profiles load={"border-fused","hide"}
```
ibhagwan added a commit that referenced this issue Jan 19, 2025
The profile changes the default binds to hide the fzf-lua window
instead of aborting it, therefore keeping cursor position, selection,
etc.

Note that this also continues long running operations in the background
so be mindful of sending fzf to background on a large mono repo, can
still be aborted with `ctrl-c` or `alt-esc`.

Enable with:
```lua
-- Set as base profile
:lua require("fzf-lua").setup({"hide"})
-- More than one profile
:lua require("fzf-lua").setup({"border-fused","hide"})
-- Or with `profiles`:
:FzfLua profiles load=hide
-- More than one profile
:FzfLua profiles load={"border-fused","hide"}
```
@ibhagwan
Copy link
Owner

Closed via 34907b3

@miroshQa
Copy link
Author

miroshQa commented Jan 19, 2025

@ibhagwan Hmm, I updated the plugin to the latest version, and now the escape key closes the picker with a noticeable delay. It becomes even more interesting because if I manually change 'esc' to hide instead of selecting the 'hide' profile it becomes much faster

Slow escape config

return {
  "ibhagwan/fzf-lua",
  keys = {
    { "<leader>f", function() require('fzf-lua').files() end },
    { "<leader>'", function() require('fzf-lua').resume() end },
  },
  config = function()
    require("fzf-lua").setup({
      "hide",
      files = {
        git_icons = false,
      },
      winopts = {
        row = 0.5,
        width = 0.8,
        height = 0.8,
        preview = {
          horizontal = 'right:50%',
          scrollbar = false,
        },
        backdrop = 100,
      },
    })
  end
}

Fast escape config

return {
  "ibhagwan/fzf-lua",
  keys = {
    { "<leader>f", function() require('fzf-lua').files() end },
    { "<leader>'", function() require('fzf-lua').resume() end },
  },
  config = function()
    require("fzf-lua").setup({
      files = {
        git_icons = false,
      },
      winopts = {
        row = 0.5,
        width = 0.8,
        height = 0.8,
        preview = {
          horizontal = 'right:50%',
          scrollbar = false,
        },
        backdrop = 100,
      },
      keymap = {
        builtin = {
          true,
          ["<esc>"] = "hide",
        }
      }
    })
  end
}


@phanen
Copy link
Contributor

phanen commented Jan 19, 2025

Reproduced, I've been always binding my <esc> to hide.
hide profile shell out from fzf's esc key, while builtin <esc> controlled directly by neovim (faster).

@ibhagwan
Copy link
Owner

@ibhagwan Hmm, I updated the plugin to the latest version, and now the escape key closes the picker with a noticeable delay. It becomes even more interesting because if I manually change 'esc' to hide instead of selecting the 'hide' profile it becomes much faster

Reproduced, I've been always binding my to hide.
hide profile shell out from fzf's esc key, while builtin controlled directly by neovim (faster).

@phanen is correct, this is due to esc being now also wrpaped in exec-silent action which means that fzf now triggers the escape instead of the neovim mapping (much faster), the reason this was done is so that we can “save” the last query when we press escape, unfortunately this requires running an additional shell command.

I’ll look into getting the query data from the term buffer instead, if I leave everything in neovim it will be faster.

@miroshQa
Copy link
Author

miroshQa commented Jan 19, 2025

Maybe escape shouldn't save the query to the history? For me, it makes sense to save something to the history only if I choose something (Enter, Ctrl + V, etc.).

@ibhagwan
Copy link
Owner

Maybe escape shouldn't save the query to the history? For me, it makes sense to save something to the history only if I choose something (Enter, Ctrl + V, etc.).

We can skip the history but we do need last query for picker specific resume (think hide then restart a new picker, now use the old picker with resume=true).

ibhagwan added a commit that referenced this issue Jan 19, 2025
@ibhagwan
Copy link
Owner

ibhagwan commented Jan 19, 2025

85fa30e

@miroshQa, @phanen - can you try the latest commit?

ibhagwan added a commit that referenced this issue Jan 19, 2025
ibhagwan added a commit that referenced this issue Jan 19, 2025
@miroshQa
Copy link
Author

No delay now, nice!

@ibhagwan
Copy link
Owner

No delay now, nice!

Fantastic, Ty for the update @miroshQa!

@phanen
Copy link
Contributor

phanen commented Jan 19, 2025

get_last_query show me ❯ xxxxx ❮. I have:

  --prompt='❯ '
  --info='inline:❮ '

@ibhagwan
Copy link
Owner

get_last_query show me ❯ xxxxx ❮. I have:

  --prompt='❯ '
  --info='inline:❮ '

And that's the downside of using query extraction from the prompt, do you have these set in fzf_opts or FZF_DEFAULT_OPTS?

I wasn't aware --info='inline:❮ ' was a thing, but if you set it via fzf_opts that's an easy fix.

@phanen
Copy link
Contributor

phanen commented Jan 19, 2025

@ibhagwan

I wasn't aware --info='inline:❮ ' was a thing, but if you set it via fzf_opts that's an easy fix.

I will, but there's also

Try new feature just now. The get_last_query can just return me the --input-border.

╭───────────────────────────────────────────────────────────────────────────────────────╮

Image

With

          ['--info-command'] = 'echo -e "\x1b[33;1m$FZF_POS\x1b[m/$FZF_INFO 💛"',
          ['--input-border'] = 'rounded',

@phanen
Copy link
Contributor

phanen commented Jan 19, 2025

Maybe it can be tricky:

  • Is it possible to use change:execute-silent to update the query on every type rather than parse nvim's buffer?
  • Or give a parser function (e.g. opts.fn_query_get) to user for their own corner case handling?
  • Or tell user not to customize some of fzf's flags by their own but give designed wrapper opts? Like what --preview-window -> opts.winopts.preview.border.

@ibhagwan
Copy link
Owner

@phanen, with the last commit, as long as you're setting prompt via opts.prompt and info via fzf_opts["--info"], it should work.

75a7e16

@phanen
Copy link
Contributor

phanen commented Jan 19, 2025

And fzf_opts["--prompt"]...
❯ aaaaaaaaaaaaaaaaaaaaaa

And fzf_opts["--layout"] == "default" (query is at the bottom line rather than top...)

@ibhagwan
Copy link
Owner

Is it possible to use change:execute-silent to update the query on every type rather than parse nvim's buffer?

This will cause significant delays on typing, especially on Windows.

Or give a parser function (e.g. opts.fn_query_get) to user for their own corner case handling?
Or tell user not to customize some of fzf's flags by their own but give designed wrapper opts? Like what --preview-window -> opts.winopts.preview.border.

I don’t like giving this offloading this to the user, it’s a source of issues.

And fzf_opts["--prompt"]

This gets converted to opts.prompt:

-- below options can be specified directly in opts and will be
-- prioritized: opts.<name> is prioritized over fzf_opts["--name"]
for _, flag in ipairs({ "query", "prompt", "header", "preview" }) do
if opts[flag] ~= nil then
opts.fzf_opts["--" .. flag] = opts[flag]
end
end

And fzf_opts["--layout"] == "default" (query is at the bottom line rather than top...)

This should be fixed indeed.

This issue has gone too long and is already closed, we should open a new issue with all the edge cases we wish to solve and I’ll think of something, maybe vim._on_key hook instead of execute-silent ?

@phanen
Copy link
Contributor

phanen commented Jan 19, 2025

This issue has gone too long and is already closed, we should open a new issue with all the edge cases we wish to solve and I’ll think of something, maybe vim._on_key hook instead of execute-silent ?

I will open a new issue.

This gets converted to opts.prompt:

Sorry but what's the right way to force my prompt to be always something like '❯ ':
I find I'm using --prompt=❯ + picker({prompt=false})

@ibhagwan
Copy link
Owner

I will open a new issue.

I have an idea very close to a better solution, hide the window first and then send an addittional esc to the fzf window (for the execute-silent action) but I can't find a way to queue nvim keys to a specific buffer, check it out maybe you have an idea?

main...better_hide

Sorry but what's the right way to force my prompt to be always something like '❯ ':
I find I'm using --prompt=❯ + picker({prompt=false})

defaults = { prompt="" }

@phanen
Copy link
Contributor

phanen commented Jan 19, 2025

How about

            api.nvim_chan_send(term, vim.keycode("<Esc>"))

@ibhagwan
Copy link
Owner

How about

        api.nvim_chan_send(term, vim.keycode("<Esc>"))

Good idea, I’ll be able to try it in a few hours.

@phanen
Copy link
Contributor

phanen commented Jan 19, 2025

Track in #1731.

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

No branches or pull requests

3 participants