Neovim plugin for quickfix and local lists. You can add and remove items, or
you can create notes on current position to either lists. It can show in the
signcolumn
where the note is made, and/or show as extmarks
.
Both Quickfix and Location lists have the same set of functionalities.
Adding current location to the list:
Deleting from list:
Adding notes to the list:
This library supports Neovim v0.10.0 and newer.
This plugin depends are the following libraries. Please make sure to add them as dependencies in your package manager:
- arshlib.nvim
- (Optional) nvim-treesitter-textobjects
The nvim-treesitter-textobjects is only used for repeating the actions of next/previous item movements.
Please consider using the nvim-bqf plugin to get the most out of your lists.
Use your favourite package manager to install this library.
{
"arsham/listish.nvim",
dependencies = {
"arsham/arshlib.nvim",
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = true,
-- or to provide configuration
-- config = { theme_list = false, ..}
}
use({
"arsham/listish.nvim",
requires = {
"arsham/arshlib.nvim",
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = function()
require("listish").config({})
end,
})
By default this pluging adds all necessary commands and mappings, and updates the theme of the buffer. However you can change or disable them to your liking.
To disable set them to false
. For example:
require("listish").config({
theme_list = false,
local_list = false,
signs = false,
})
Here is the default settings:
{
theme_list = true,
clearqflist = "Clearquickfix", -- command
clearloclist = "Clearloclist", -- command
clear_notes = "ClearListNotes", -- command
lists_close = "<leader>cc", -- closes both qf/local lists
in_list_dd = "dd", -- delete current item in the list
signs = { -- show signs on the signcolumn
loclist = "", -- the icon/sigil/sign on the signcolumn
qflist = "", -- the icon/sigil/sign on the signcolumn
priority = 10,
},
extmarks = { -- annotate with extmarks
loclist_text = "loclist Note",
qflist_text = "Quickfix Note",
},
quickfix = {
open = "<leader>qo",
on_cursor = "<leader>qq", -- add current position to the list
add_note = "<leader>qn", -- add current position with your note to the list
clear = "<leader>qd", -- clear all items
close = "<leader>qc",
next = "]q",
prev = "[q",
},
loclist = {
open = "<leader>wo",
on_cursor = "<leader>ww",
add_note = "<leader>wn",
clear = "<leader>wd",
close = "<leader>wc",
next = "]w",
prev = "[w",
},
}
There are four highlight groups for signs and extmarks:
ListishQfSign
ListishQfExt
ListishLocalSign
ListishLocalExt
You can let your package manager to load this plugin on either key-mapping events or when the first quickfix/local list is opened. Packer example:
use({
"arsham/listish.nvim",
dependencies = {
"arsham/arshlib.nvim",
"nvim-treesitter/nvim-treesitter-textobjects",
},
config = function()
require("listish").config({})
end,
keys = {
"<leader>qq",
"<leader>qn",
"<leader>qo",
"<leader>ww",
"<leader>wn",
"<leader>wo",
},
ft = { "qf" },
})
- nvim-bqf: manipulate lists with fzf
- replacer.nvim: makes a quickfix list editable in both content and file path
- quickfix-reflector.vim: change code right in the quickfix window
Licensed under the MIT License. Check the LICENSE file for details.