## Description
A minor update to add a confirmation dialogue before deleting a branch
in `git_branches`.
## Related Issue(s)
<!--
If this PR fixes any issues, please link to the issue here.
- Fixes #<issue_number>
-->
## Screenshots
<!-- Add screenshots of the changes if applicable. -->
---------
Co-authored-by: Ian Liu <ian.liu@tupl.com>
## Description
<!-- Describe the big picture of your changes to communicate to the
maintainers
why we should accept this pull request. -->
This PR adds two actions: `git_create_branch` and `git_delete_branch`.
They are aimed to be included in the `git_branches` picker to easily
create/delete git branches with custom keymaps.
## Related Issue(s)
<!--
If this PR fixes any issues, please link to the issue here.
- Fixes #<issue_number>
-->
## Screenshots
<!-- Add screenshots of the changes if applicable. -->
---------
Co-authored-by: Ian Liu <ian.liu@tupl.com>
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
vim.fn.setqflist() and vim.fn.setloclist() use (1,1)-indexing, but
vim.api.nvim_win_set_cursor() uses (1,0)-indexing. Adjust for this when
sending items to qflist/loclist.
## Description
Currently when you use picker.commands to select a command that requires
an argument, it will cause an error. `:BlickCmd` is one example. To
avoid the error we can feed the keys to enter the command mode and
populate the command and leave it to the user what they want to do.
This is also what telescope
[does](415af52339/lua/telescope/builtin/__internal.lua (L399))
in its builtin command picker.
nargs values `*` or `?` mean that the command can be executed both with
arguments and without. I think it is safer to leave it to the user to
decide if they want them to either trigger a run or provide the
arguments. But happy to change it if you think running the commands by
default makes sense.
---------
Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
## Description
This PR addresses an issue where the quickfix list (qflist) would open
on the left side of the screen when using vertical splits. By replacing
the default :copen command with :botright copen, this update ensures
that the qflist consistently opens at the bottom, regardless of the
current window layout.
## Reproduce:
1. Open Neovim: Start Neovim normally.
2. Create a Vertical Split
3. Use picker to pick anything
4. Press <c-q> to send them to quickfix list
```lua
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
vim.g.mapleader = " "
require("lazy.minit").repro({
spec = {
{
"Isrothy/snacks.nvim",
branch = "bottom-positioning-for-qf",
lazy = false,
keys = {
{
"<LEADER>ff",
function()
Snacks.picker.files()
end,
desc = "Files",
},
opts = {},
},
-- add any other plugins here
},
})
```
## Screenshots
before:
<img width="1439" alt="Screenshot 2025-01-31 at 23 48 59"
src="https://github.com/user-attachments/assets/d21b9668-ff4d-4464-84b4-48c47c48153a"
/>
after:
<img width="1438" alt="Screenshot 2025-01-31 at 23 50 11"
src="https://github.com/user-attachments/assets/6aba0840-2125-4336-92e2-7152e8669aa6"
/>