-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stephan Badragan
committed
May 8, 2024
1 parent
a218898
commit 783c05c
Showing
6 changed files
with
65 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
local utils = require('grug-far/utils') | ||
|
||
local function qflist(params) | ||
local context = params.context | ||
local state = context.state | ||
local resultsLocations = state.resultsLocations | ||
|
||
if #resultsLocations == 0 then | ||
return | ||
end | ||
|
||
local search = state.inputs.search | ||
|
||
vim.fn.setqflist(resultsLocations, 'r') | ||
vim.fn.setqflist({}, "a", | ||
{ title = "Grug FAR results" .. utils.strEllideAfter(search, context.options.maxSearchCharsInTitles, ' for: ') }) | ||
-- open list below taking whole horizontal space | ||
vim.cmd('botright copen | stopinsert') | ||
end | ||
|
||
return qflist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters