Commit 2d49435 1 parent 1dd0db5 commit 2d49435 Copy full SHA for 2d49435
File tree 2 files changed +7
-15
lines changed
2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,6 @@ function M.init(opts)
14
14
vim .api .nvim_command [[ au BufEnter * lua require("diaglist").diagnostics_hook(false)]]
15
15
vim .api .nvim_command [[ aug END]]
16
16
17
- vim .api .nvim_command [[ aug qf_hook]]
18
- vim .api .nvim_command [[ au!]]
19
- vim .api .nvim_command [[ au! QuickFixCmdPre * lua require("diaglist").quick_fix_hook()]]
20
- vim .api .nvim_command [[ aug END]]
21
-
22
17
if opts == nil then
23
18
opts = {}
24
19
end
@@ -57,12 +52,4 @@ function M.diagnostics_hook(diag_changed)
57
52
q .diagnostics_hook ()
58
53
end
59
54
60
- function M .quick_fix_hook ()
61
- if M .debug then
62
- print (" foreign quickfix populated, setting flag" )
63
- end
64
- q .foreign_qf = true
65
- end
66
-
67
-
68
55
return M
Original file line number Diff line number Diff line change @@ -4,8 +4,12 @@ local util = require('diaglist.util')
4
4
5
5
local M = {}
6
6
7
- M .foreign_qf = false
8
7
M .last_priority_uri = nil
8
+ M .title = ' Workspace Diagnostics'
9
+
10
+ local function is_qf_foreign ()
11
+ return vim .fn .getqflist { title = 0 }.title ~= M .title
12
+ end
9
13
10
14
local function populate_qflist (open_qflist )
11
15
local priority_uri = vim .uri_from_bufnr (0 )
@@ -21,6 +25,7 @@ local function populate_qflist(open_qflist)
21
25
})
22
26
23
27
vim .fn .setqflist (all_diagnostics , ' r' )
28
+ vim .fn .setqflist ({}, ' a' , {title = ' Workspace Diagnostics' })
24
29
end
25
30
26
31
M .open_all_diagnostics = function ()
@@ -29,7 +34,7 @@ M.open_all_diagnostics = function()
29
34
end
30
35
31
36
M .diagnostics_hook = function ()
32
- if not M . foreign_qf then
37
+ if not is_qf_foreign () then
33
38
populate_qflist ()
34
39
elseif M .debug then
35
40
print (' foreign quickfix, not populating' )
You can’t perform that action at this time.
0 commit comments