This commit is contained in:
2026-06-06 17:35:38 -04:00
parent f6bf31d341
commit 2061bc59f7
7 changed files with 21 additions and 46 deletions

View File

@@ -82,33 +82,3 @@ vim.api.nvim_create_autocmd("LspProgress", {
})
end,
})
vim.api.nvim_create_autocmd({ 'FileType' }, {
pattern = { 'netrw' },
group = vim.api.nvim_create_augroup('NetrwOnRename', { clear = true }),
callback = function()
vim.keymap.set("n", "R", function()
local original_file_path = vim.b.netrw_curdir .. '/' .. vim.fn["netrw#Call"]("NetrwGetWord")
vim.ui.input({ prompt = 'Move/rename to:', default = original_file_path },
function(target_file_path)
if target_file_path and target_file_path ~= "" then
local file_exists = vim.uv.fs_access(target_file_path, "W")
if not file_exists then
vim.uv.fs_rename(original_file_path, target_file_path)
Snacks.rename.on_rename_file(original_file_path, target_file_path)
else
vim.notify(
"File '" .. target_file_path .. "' already exists! Skipping...",
vim.log.levels.ERROR)
end
-- Refresh netrw
vim.cmd(':Ex ' .. vim.b.netrw_curdir)
end
end)
end, { remap = true, buffer = true })
end
})

View File

@@ -23,11 +23,9 @@ if vim.g.neovide then
vim.g.neovide_opacity = 0.8
vim.o.guifont = "ComicShannsMono Nerd Font"
local function save() vim.cmd.write() end
local function copy() vim.cmd([[normal! "+y]]) end
local function paste() vim.api.nvim_paste(vim.fn.getreg("+"), true, -1) end
vim.keymap.set({ "n", "i", "v" }, "<S-C-s>", save)
vim.keymap.set("v", "<S-C-c>", copy, { silent = true })
vim.keymap.set({ "n", "i", "v", "c", "t" }, "<S-C-v>", paste)
end

View File

@@ -4,6 +4,7 @@ keymap("n", "<Esc>", ":nohlsearch<CR>")
keymap("n", "<leader>en", ":edit $MYVIMRC<CR>")
keymap("n", "<leader>ez", ":edit ~/.zshrc<CR>")
keymap("n", "<leader>eo", ":edit ~/dotfiles/oxwm/.config/oxwm/config.lua<CR>")
keymap("v", "J", ":m '>+1<CR>gv=gv")
keymap("v", "K", ":m '<-2<CR>gv=gv")
@@ -28,13 +29,13 @@ vim.keymap.set('n', '<leader>p', function()
end
vim.ui.select(dirs, { prompt = 'Pick dir:' }, function(choice)
if not choice then return end
vim.cmd('cd ' .. vim.fn.fnameescape(choice))
vim.notify('cd -> ' .. choice, vim.log.levels.INFO)
local escapedChoice = vim.fn.fnameescape(choice)
vim.cmd("cd " .. escapedChoice)
vim.cmd("Explore " .. escapedChoice)
vim.notify("cd -> " .. choice, vim.log.levels.INFO)
end)
end)
keymap("n", "<leader>lf", vim.lsp.buf.format)
keymap({ "n", "t" }, "<C-/>", function()

View File

@@ -3,10 +3,7 @@ vim.g.mapleader = " "
vim.pack.add {
{ src = "https://github.com/nvim-mini/mini.pick" },
{ src = "https://github.com/rafamadriz/friendly-snippets" },
{
src = "https://github.com/saghen/blink.cmp",
version = "1.*",
},
{ src = "https://github.com/saghen/blink.cmp" },
{ src = "https://github.com/nvim-lualine/lualine.nvim" },
{ src = "https://github.com/sphamba/smear-cursor.nvim" },

View File

@@ -6,8 +6,7 @@
},
"blink.cmp": {
"rev": "d0c5196dae32c53cde1208161554906f5b982de8",
"src": "https://github.com/saghen/blink.cmp",
"version": "'1.*'"
"src": "https://github.com/saghen/blink.cmp"
},
"blink.lib": {
"rev": "b127d48bf8e9ac9cf41f6e0fbead317503f76558",