Use quickfix instead of location list
lcrockett opened this issue · 2 comments
The README states marks can be extracted to the quickfix or location list, as I interpret it. I am unable to find out how to extract marks to the quickfix list however and by default they are sent to the location list.
I'd prefer the quickfix list over the location list; how would I be able to extract marks to the quickfix list ?
Cheers on this plugin, great successor to vim-bookmarks
!
This is a pretty reasonable request and shouldn't be too hard to implement; I just have to decide on an exact interface for the commands (separate commands for quick/loc list versus accepting a "quickfix/loclist" argument to one command).
I'd reckon separate commands would be the way to go as many other (ViM / Neovim) plugins follow that same proven path, even though with Lua based Neovim plugins you also see a followed approach in using function names instead.
To ensure consistency I think either one of the following 2 option schemes fits:
- Keeping the current
*List*
command names and introducing a configuration switch to specify which list is preferred (location vs. quickfix)
require'marks'.setup {
-- preferred list to extract marks to
extract_list = 'quickfix', -- can be either 'quickfix' or 'location'. Defaults to '???'
}
- Exposing the following commands
:MarksListBufQuickfix
:MarksListGlobalQuickfix
:MarksListAllQuickfix
:BookmarksListQuickfix
:BookmarksListAllQuickfix
:MarksListBufLocation
:MarksListGlobalLocation
:MarksListAllLocation
:BookmarksListLocation
:BookmarksListAllLocation
Keeping the current command names ensures compatibility, refactoring command names makes it easier to distinguish by command alone which prevents a (re)- setup of configuration and makes it easier to integrate in other plugins such as folke/which-key.nvim
or by just specifying keymaps.