mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-03 22:14:39 +02:00
fix(terminal): make gf
behave. Fixes #3335
This commit is contained in:
parent
163f7ea303
commit
eb1c04bd31
1 changed files with 8 additions and 0 deletions
|
@ -73,6 +73,14 @@ function M.open(cmd, opts)
|
|||
vim.keymap.set("t", "<c-l>", "<c-l>", { buffer = buf, nowait = true })
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "gf", function()
|
||||
local f = vim.fn.findfile(vim.fn.expand("<cfile>"))
|
||||
if f ~= "" then
|
||||
vim.cmd("close")
|
||||
vim.cmd("e " .. f)
|
||||
end
|
||||
end, { buffer = buf })
|
||||
|
||||
vim.api.nvim_create_autocmd("BufEnter", {
|
||||
buffer = buf,
|
||||
callback = function()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue