Files
pastilhasandClaude Opus 5 e67ac43682 Drop opencode and supermaven, fix prettier, move path-copy keymaps
- Remove the opencode.nvim and supermaven-nvim plugin specs.
- formatting.lua: stop hardcoding prettier's path. It pointed at
  mise/installs/node/22.20.0, which no longer exists (now 24.19.0), so
  conform silently failed to format. Dropping `command` lets conform
  inherit its built-in definition and resolve prettier on PATH, which
  mason.nvim populates.
- keymaps.lua: move the file-path copy maps from <leader>cy/cY to
  <leader>yp/yP.
- Pick up Omarchy Quattro's remote_clipboard.lua and the news-alert
  suppression, plus the lazy-lock/lazyvim.json churn from the upgrade.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 16:05:34 +01:00

54 lines
2.3 KiB
Lua

-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any addtional keymaps here
--
-- vim.keymap.set("n", "<C-S-p>", function()
-- Snacks.explorer.open()
-- vim.schedule(function()
-- vim.api.nvim_feedkeys("/", "m", false)
-- end)
-- end, { desc = "Focus Explorer search" })
--
-- local map = vim.keymap.set
-- local function has_cmd(cmd)
-- return vim.fn.exists(":" .. cmd) == 2
-- end
--
-- -- Ctrl+P → open your file explorer (auto-detect)
-- if has_cmd("Neotree") then
-- map("n", "<C-p>", "<cmd>Neotree toggle reveal<cr>", { desc = "Explorer (Neo-tree)" })
-- elseif has_cmd("NvimTreeToggle") then
-- map("n", "<C-p>", "<cmd>NvimTreeFindFileToggle<cr>", { desc = "Explorer (nvim-tree)" })
-- elseif has_cmd("Oil") then
-- map("n", "<C-p>", "<cmd>Oil --float<cr>", { desc = "Explorer (Oil)" })
-- else
-- map("n", "<C-p>", "<cmd>Ex<cr>", { desc = "Explorer (netrw)" }) -- built-in
-- end
--
-- -- Ctrl+Shift+P → "command palette"
-- -- Many terminals don't send <C-S-p>, so keep <leader>P as a reliable fallback.
-- if has_cmd("WhichKey") then
-- map("n", "<C-S-p>", "<cmd>WhichKey<cr>", { desc = "Command Palette" })
-- map("n", "<leader>P", "<cmd>WhichKey<cr>", { desc = "Command Palette [fallback]" })
-- elseif has_cmd("Telescope") then
-- map("n", "<C-S-p>", "<cmd>Telescope commands<cr>", { desc = "Command Palette" })
-- map("n", "<leader>P", "<cmd>Telescope commands<cr>", { desc = "Command Palette [fallback]" })
-- end
-- Copy the current file's path to the system clipboard.
-- <leader>yp = relative to cwd, <leader>yP = absolute.
-- Writes to the "+" register, which LazyVim binds to the system clipboard via
-- clipboard=unnamedplus, so these land in the OS clipboard directly.
vim.keymap.set("n", "<leader>yp", function()
local relative_path = vim.fn.expand("%:~:.")
vim.fn.setreg("+", relative_path)
vim.notify("Copied relative path: " .. relative_path)
end, { desc = "Copy relative file path" })
vim.keymap.set("n", "<leader>yP", function()
local absolute_path = vim.fn.expand("%:p")
vim.fn.setreg("+", absolute_path)
vim.notify("Copied absolute path: " .. absolute_path)
end, { desc = "Copy absolute file path" })