kevinhwang91 / nvim-bqf

Better quickfix window in Neovim, polish old quickfix window.
BSD 3-Clause "New" or "Revised" License
1.69k stars 30 forks source link

opening quickfix list with `nvim -q` does not enable bqf #104

Closed bagohart closed 1 year ago

bagohart commented 1 year ago

Neovim version (nvim -v | head -n1)

NVIM v0.8.2

Operating system/version

Manjaro XFCE

How to reproduce the issue

  1. It fails on my full Packer-based config with ft = qf, and also on a minimal config. Save this as init.vim.reproduce_bug_in_bqf:
    
    let s:plug_dir = expand('/tmp/plugged/vim-plug')
    if !filereadable(s:plug_dir .. '/plug.vim')
    execute printf('!curl -fLo %s/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', s:plug_dir)
    end

execute 'set runtimepath+=' . s:plug_dir call plug#begin(s:plug_dir) Plug 'kevinhwang91/nvim-bqf' call plug#end() PlugInstall | quit

Also add a file `test` with

TODO nope TODO lol TODO


2. Start nvim from the shell, e.g. `nvim --clean -u init.vim.reproduce_bug_in_bqf -q $( rg --vimgrep -S TODO test| psub)` in fish or in bash `nvim --clean -u init.vim.reproduce_bug_in_bqf -q <( rg --vimgrep -S TODO test)`

### Expected behavior

The cursor is on the first match, the quickfix list should be open (or maybe not), and `bqf` should be started.

### Actual behavior

The cursor is on the first match, but `bqf` cannot be started. Invoke `copen`, the command `BqfEnable` is in scope, but executing it does not activate `nvim-bqf`.

The only way I found to activate `nvim-bqf` is to search for another term (put cursor on `nope`, press `*:vim // %<CR>`, then Bqf is activated, and then when pressing `<` Bqf is still activated. However, close the quickfix window with `:q` and do another `copen` and `bqf` is gone again, (but can be restored with `><`).
bagohart commented 1 year ago

That works, great! Thanks a lot, also for this nice plugin. It made me use the quickfix list a lot more, and that led to my discovering the nvim -q thing by the way :)

kevinhwang91 commented 1 year ago

Thanks, your contribution makes bqf get better.