Many things are working
This commit is contained in:
parent
c42f197307
commit
4582bd5469
20 changed files with 715 additions and 300 deletions
|
@ -1,5 +1,5 @@
|
|||
-- Require all files in this tools dir, minus this init.lua file
|
||||
function script_path()
|
||||
local function script_path()
|
||||
return debug.getinfo(2, "S").source:sub(2):match("(.*/)")
|
||||
end
|
||||
-- Extract the directory name from the script path
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
-- Function to remove item from quickfix list
|
||||
function RemoveQFItem()
|
||||
local curqfidx = vim.fn.line(".") - 1
|
||||
local qfall = vim.fn.getqflist()
|
||||
table.remove(qfall, curqfidx + 1) -- Lua is 1-indexed
|
||||
vim.fn.setqflist(qfall, "r")
|
||||
vim.cmd(curqfidx .. "cfirst")
|
||||
vim.cmd("copen")
|
||||
local function RemoveQFItem()
|
||||
local currentIndex = vim.fn.line(".") - 1
|
||||
local quickfixList = vim.fn.getqflist()
|
||||
-- Remove current item and replace the quickfix list
|
||||
table.remove(quickfixList, currentIndex + 1) -- Lua is 1-indexed
|
||||
vim.fn.setqflist(quickfixList, "r")
|
||||
-- Keep cursor on the line it was +1 (so it goes to next item rather than back up)
|
||||
vim.cmd("cwindow | :" .. (currentIndex + 1))
|
||||
end
|
||||
|
||||
-- Command to call the function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue