feat: updates to neovim config

This commit is contained in:
2026-05-26 23:52:47 -04:00
parent befb444f12
commit 8e2e5a06ef
12 changed files with 174 additions and 97 deletions
+10 -10
View File
@@ -5,16 +5,16 @@ vim.api.nvim_create_autocmd({ "FocusGained", "BufEnter", "CursorHold", "CursorHo
})
-- get terminal to follow directory
vim.api.nvim_create_autocmd({ 'TermRequest' }, {
desc = 'Handles OSC 7 dir change requests',
callback = function(ev)
local pwd, n = string.gsub(ev.data.sequence, '\027]7;file://[^/]*', '')
if n <= 0 then return end
if vim.fn.isdirectory(pwd) == 0 then return end
if vim.api.nvim_get_current_buf() ~= ev.buf then return end
vim.cmd.cd(pwd)
end
})
-- vim.api.nvim_create_autocmd({ 'TermRequest' }, {
-- desc = 'Handles OSC 7 dir change requests',
-- callback = function(ev)
-- local pwd, n = string.gsub(ev.data.sequence, '\027]7;file://[^/]*', '')
-- if n <= 0 then return end
-- if vim.fn.isdirectory(pwd) == 0 then return end
-- if vim.api.nvim_get_current_buf() ~= ev.buf then return end
-- vim.cmd.cd(pwd)
-- end
-- })
-- Check if we need to reload the file when it changed
vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, {