Skip to content

Commit

Permalink
fix(command): improved command completion
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Mar 28, 2024
1 parent cb2c5c9 commit aae1fd6
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions lua/trouble/command.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,26 @@ function M.complete_opts()
end
end
vim.list_extend(candidates, {
"focus=true",
"jump=true",
"win.type=float",
"win.type=split",
"win.position=top",
"win.position=bottom",
"win.position=left",
"win.position=right",
"win.relative=editor",
"win.relative=win",
"new=true",
})
for _, w in ipairs({ "results", "preview" }) do
local winopts = {
"win.type=float",
"win.type=split",
"win.position=top",
"win.position=bottom",
"win.position=left",
"win.position=right",
"win.relative=editor",
"win.relative=win",
}
vim.list_extend(
candidates,
vim.tbl_map(function(x)
return w .. "." .. x
end, winopts)
)
end
return candidates
end

Expand Down

0 comments on commit aae1fd6

Please sign in to comment.