1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
*quicker.txt*
*Quicker* *quicker* *quicker.nvim*
--------------------------------------------------------------------------------
CONTENTS *quicker-contents*
1. Options |quicker-options|
2. Api |quicker-api|
--------------------------------------------------------------------------------
OPTIONS *quicker-options*
>lua
require("quicker").setup({
-- Local options to set for quickfix
opts = {
buflisted = false,
number = false,
relativenumber = false,
signcolumn = "auto",
winfixheight = true,
wrap = false,
},
-- Set to false to disable the default options in `opts`
use_default_opts = true,
-- Keymaps to set for the quickfix buffer
keys = {
-- { ">", "<cmd>lua require('quicker').expand()<CR>", desc = "Expand quickfix content" },
},
-- Callback function to run any custom logic or keymaps for the quickfix buffer
on_qf = function(bufnr) end,
edit = {
-- Enable editing the quickfix like a normal buffer
enabled = true,
-- Set to true to write buffers after applying edits.
-- Set to "unmodified" to only write unmodified buffers.
autosave = "unmodified",
},
-- Keep the cursor to the right of the filename and lnum columns
constrain_cursor = true,
highlight = {
-- Use treesitter highlighting
treesitter = true,
-- Use LSP semantic token highlighting
lsp = true,
-- Load the referenced buffers to apply more accurate highlights (may be slow)
load_buffers = true,
},
follow = {
-- When quickfix window is open, scroll to closest item to the cursor
enabled = false,
},
-- Map of quickfix item type to icon
type_icons = {
E = " ",
W = " ",
I = " ",
N = " ",
H = " ",
},
-- Border characters
borders = {
vert = "┃",
-- Strong headers separate results from different files
strong_header = "━",
strong_cross = "╋",
strong_end = "┫",
-- Soft headers separate results within the same file
soft_header = "╌",
soft_cross = "╂",
soft_end = "┨",
},
-- How to trim the leading whitespace from results. Can be 'all', 'common', or false
trim_leading_whitespace = "common",
-- Maximum width of the filename column
max_filename_width = function()
return math.floor(math.min(95, vim.o.columns / 2))
end,
-- How far the header should extend to the right
header_length = function(type, start_col)
return vim.o.columns - start_col
end,
})
<
--------------------------------------------------------------------------------
API *quicker-api*
expand({opts}) *quicker.expand*
Expand the context around the quickfix results.
Parameters:
{opts} `nil|quicker.ExpandOpts`
{before} `nil|integer` Number of lines of context to show
before the line (default 2)
{after} `nil|integer` Number of lines of context to show
after the line (default 2)
{add_to_existing} `nil|boolean`
{loclist_win} `nil|integer`
Note:
If there are multiple quickfix items for the same line of a file, only the first
one will remain after calling expand().
collapse() *quicker.collapse*
Collapse the context around quickfix results, leaving only the `valid`
items.
toggle_expand({opts}) *quicker.toggle_expand*
Toggle the expanded context around the quickfix results.
Parameters:
{opts} `nil|quicker.ExpandOpts`
{before} `nil|integer` Number of lines of context to show
before the line (default 2)
{after} `nil|integer` Number of lines of context to show
after the line (default 2)
{add_to_existing} `nil|boolean`
{loclist_win} `nil|integer`
refresh({loclist_win}, {opts}) *quicker.refresh*
Update the quickfix list with the current buffer text for each item.
Parameters:
{loclist_win} `nil|integer`
{opts} `nil|quicker.RefreshOpts`
{keep_diagnostics} `nil|boolean` If a line has a diagnostic type, keep
the original text and display it as virtual text
after refreshing from source.
is_open({loclist_win}) *quicker.is_open*
Parameters:
{loclist_win} `nil|integer` Check if loclist is open for the given window.
If nil, check quickfix.
toggle({opts}) *quicker.toggle*
Toggle the quickfix or loclist window.
Parameters:
{opts} `nil|quicker.OpenOpts`
{loclist} `nil|boolean` Toggle the loclist instead of the
quickfix list
{focus} `nil|boolean` Focus the quickfix window after toggling
(default false)
{height} `nil|integer` Height of the quickfix window when
opened. Defaults to number of items in the list.
{min_height} `nil|integer` Minimum height of the quickfix window.
Default 4.
{max_height} `nil|integer` Maximum height of the quickfix window.
Default 10.
{open_cmd_mods} `nil|quicker.OpenCmdMods` A table of modifiers for the
quickfix or loclist open commands.
open({opts}) *quicker.open*
Open the quickfix or loclist window.
Parameters:
{opts} `nil|quicker.OpenOpts`
{loclist} `nil|boolean` Toggle the loclist instead of the
quickfix list
{focus} `nil|boolean` Focus the quickfix window after toggling
(default false)
{height} `nil|integer` Height of the quickfix window when
opened. Defaults to number of items in the list.
{min_height} `nil|integer` Minimum height of the quickfix window.
Default 4.
{max_height} `nil|integer` Maximum height of the quickfix window.
Default 10.
{open_cmd_mods} `nil|quicker.OpenCmdMods` A table of modifiers for the
quickfix or loclist open commands.
close({opts}) *quicker.close*
Close the quickfix or loclist window.
Parameters:
{opts} `nil|quicker.CloseOpts`
{loclist} `nil|boolean` Close the loclist instead of the quickfix list
================================================================================
vim:tw=80:ts=2:ft=help:norl:syntax=help:
|