chentoast / marks.nvim

A better user experience for viewing and interacting with Vim marks.
MIT License
788 stars 40 forks source link

Use quickfix instead of location list #24

Closed lcrockett closed 2 years ago

lcrockett commented 2 years ago

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 !

chentoast commented 2 years ago

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).

lcrockett commented 2 years ago

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:

  1. 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 '???'
}
  1. 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.