update oil

This commit is contained in:
Volodymyr Patuta 2024-05-28 17:15:06 +02:00
parent 3fb9c805e2
commit 972165d32b
3 changed files with 24 additions and 3 deletions

View File

@ -15,7 +15,7 @@ vim.api.nvim_create_autocmd('User', {
local lazygit = Terminal:new({
cmd = "lazygit",
dir = "git_dir",
direction = "float",
direction = "tab",
float_opts = {
border = "none",
},

View File

@ -88,6 +88,13 @@ vim.api.nvim_create_autocmd("BufReadPost", {
end,
})
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = ".gitlab*",
callback = function()
vim.bo.filetype = "yaml.gitlab"
end,
})
vim.cmd [[
augroup change_cursor
au!

View File

@ -29,7 +29,17 @@ return {
},
keymaps = {
['g?'] = 'actions.show_help',
['<CR>'] = 'actions.select',
-- ['<CR>'] = 'actions.select',
["<CR>"] = function()
require("oil").select(nil, function(err)
if not err then
local curdir = require("oil").get_current_dir()
if curdir then
vim.cmd.lcd(curdir)
end
end
end)
end,
['<C-s>'] = 'actions.select_vsplit',
['<C-h>'] = 'actions.select_split',
['<C-p>'] = 'actions.preview',
@ -38,7 +48,11 @@ return {
['q'] = 'actions.close',
['<C-l>'] = 'actions.refresh',
['-'] = 'actions.parent',
['l'] = 'actions.parent',
-- ['l'] = 'actions.parent',
["l"] = function()
require("oil.actions").parent.callback()
vim.cmd.lcd(require("oil").get_current_dir())
end,
['_'] = 'actions.open_cwd',
['`'] = 'actions.cd',
['~'] = 'actions.tcd',