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>
This commit is contained in:
@@ -5,3 +5,5 @@ require("config.macros")
|
|||||||
vim.opt.swapfile = false
|
vim.opt.swapfile = false
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.relativenumber = true
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
vim.keymap.set("i", "<S-CR>", "\\n", { desc = "Insert literal newline" })
|
||||||
|
|||||||
+5
-2
@@ -1,11 +1,10 @@
|
|||||||
{
|
{
|
||||||
"LazyVim": { "branch": "main", "commit": "561da43c435f330674c9b18bb335be7e1126d928" },
|
"LazyVim": { "branch": "main", "commit": "561da43c435f330674c9b18bb335be7e1126d928" },
|
||||||
"blink-copilot": { "branch": "main", "commit": "5d35fd07fcc148be20442da1bdd2407e03263d7d" },
|
"SchemaStore.nvim": { "branch": "main", "commit": "aa25399c48236b77af71d4b64cdf157d2ba4e990" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
|
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"catppuccin": { "branch": "main", "commit": "af58927c55c9f3272c940ff02b3cee94a1249f26" },
|
"catppuccin": { "branch": "main", "commit": "af58927c55c9f3272c940ff02b3cee94a1249f26" },
|
||||||
"conform.nvim": { "branch": "master", "commit": "9fd3d5e0b689ec1bf400c53cbbec72c6fdf24081" },
|
"conform.nvim": { "branch": "master", "commit": "9fd3d5e0b689ec1bf400c53cbbec72c6fdf24081" },
|
||||||
"copilot.lua": { "branch": "master", "commit": "3123983d00ae6859f8bc987d14ebb524bb41b618" },
|
|
||||||
"flash.nvim": { "branch": "main", "commit": "3be9bf7e85550045ec576379a0c45aac144d0438" },
|
"flash.nvim": { "branch": "main", "commit": "3be9bf7e85550045ec576379a0c45aac144d0438" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
|
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
|
||||||
@@ -32,9 +31,13 @@
|
|||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "10126effbafb74541b69219711dfb2c631e7ebf8" },
|
"render-markdown.nvim": { "branch": "main", "commit": "10126effbafb74541b69219711dfb2c631e7ebf8" },
|
||||||
"snacks.nvim": { "branch": "main", "commit": "bebf0bd38e3e7071abc4085ad46f1ebc32cdfe17" },
|
"snacks.nvim": { "branch": "main", "commit": "bebf0bd38e3e7071abc4085ad46f1ebc32cdfe17" },
|
||||||
|
"supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "19d461ddd543e938eb22505fb03fa878800270b6" },
|
"todo-comments.nvim": { "branch": "main", "commit": "19d461ddd543e938eb22505fb03fa878800270b6" },
|
||||||
"tokyonight.nvim": { "branch": "main", "commit": "d14614cbfc63b6037bfccd48bb982d2ad2003352" },
|
"tokyonight.nvim": { "branch": "main", "commit": "d14614cbfc63b6037bfccd48bb982d2ad2003352" },
|
||||||
"trouble.nvim": { "branch": "main", "commit": "c098362fe603d3922095e7db595961e020bdf2d0" },
|
"trouble.nvim": { "branch": "main", "commit": "c098362fe603d3922095e7db595961e020bdf2d0" },
|
||||||
"ts-comments.nvim": { "branch": "main", "commit": "217ab9cc137fceb6659b53790bd25e608219abe1" },
|
"ts-comments.nvim": { "branch": "main", "commit": "217ab9cc137fceb6659b53790bd25e608219abe1" },
|
||||||
|
"vim-dadbod": { "branch": "master", "commit": "e95afed23712f969f83b4857a24cf9d59114c2e6" },
|
||||||
|
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
|
||||||
|
"vim-dadbod-ui": { "branch": "master", "commit": "48c4f271da13d380592f4907e2d1d5558044e4e5" },
|
||||||
"which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" }
|
"which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" }
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -1,9 +1,11 @@
|
|||||||
{
|
{
|
||||||
"extras": [
|
"extras": [
|
||||||
"lazyvim.plugins.extras.ai.copilot",
|
|
||||||
"lazyvim.plugins.extras.lang.astro",
|
"lazyvim.plugins.extras.lang.astro",
|
||||||
|
"lazyvim.plugins.extras.lang.json",
|
||||||
"lazyvim.plugins.extras.lang.markdown",
|
"lazyvim.plugins.extras.lang.markdown",
|
||||||
"lazyvim.plugins.extras.lang.tailwind"
|
"lazyvim.plugins.extras.lang.sql",
|
||||||
|
"lazyvim.plugins.extras.lang.tailwind",
|
||||||
|
"lazyvim.plugins.extras.lang.toml"
|
||||||
],
|
],
|
||||||
"install_version": 8,
|
"install_version": 8,
|
||||||
"news": {
|
"news": {
|
||||||
|
|||||||
+17
-1
@@ -26,7 +26,7 @@
|
|||||||
-- map("n", "<C-p>", "<cmd>Ex<cr>", { desc = "Explorer (netrw)" }) -- built-in
|
-- map("n", "<C-p>", "<cmd>Ex<cr>", { desc = "Explorer (netrw)" }) -- built-in
|
||||||
-- end
|
-- end
|
||||||
--
|
--
|
||||||
-- -- Ctrl+Shift+P → “command palette”
|
-- -- Ctrl+Shift+P → "command palette"
|
||||||
-- -- Many terminals don't send <C-S-p>, so keep <leader>P as a reliable fallback.
|
-- -- Many terminals don't send <C-S-p>, so keep <leader>P as a reliable fallback.
|
||||||
-- if has_cmd("WhichKey") then
|
-- if has_cmd("WhichKey") then
|
||||||
-- map("n", "<C-S-p>", "<cmd>WhichKey<cr>", { desc = "Command Palette" })
|
-- map("n", "<C-S-p>", "<cmd>WhichKey<cr>", { desc = "Command Palette" })
|
||||||
@@ -35,3 +35,19 @@
|
|||||||
-- map("n", "<C-S-p>", "<cmd>Telescope commands<cr>", { desc = "Command Palette" })
|
-- map("n", "<C-S-p>", "<cmd>Telescope commands<cr>", { desc = "Command Palette" })
|
||||||
-- map("n", "<leader>P", "<cmd>Telescope commands<cr>", { desc = "Command Palette [fallback]" })
|
-- map("n", "<leader>P", "<cmd>Telescope commands<cr>", { desc = "Command Palette [fallback]" })
|
||||||
-- end
|
-- 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" })
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
require("config.remote_clipboard").setup()
|
||||||
-- Options are automatically loaded before lazy.nvim startup
|
-- Options are automatically loaded before lazy.nvim startup
|
||||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||||
-- Add any additional options here
|
-- Add any additional options here
|
||||||
|
|||||||
@@ -0,0 +1,99 @@
|
|||||||
|
-- Clipboard for sessions whose yanks may need to reach another machine:
|
||||||
|
-- every copy is emitted as OSC 52 (inside tmux this becomes a tmux buffer,
|
||||||
|
-- rebroadcast to every attached client, local or SSH). Paste prefers the
|
||||||
|
-- local Wayland clipboard when one is available, so content copied in other
|
||||||
|
-- apps remains pasteable; without a display, paste is an OSC 52 query that
|
||||||
|
-- tmux (or the terminal) answers.
|
||||||
|
local M = {}
|
||||||
|
|
||||||
|
local function proc_lines(pid, file)
|
||||||
|
local ok, lines = pcall(vim.fn.readfile, "/proc/" .. pid .. "/" .. file)
|
||||||
|
return ok and lines or {}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function proc_ppid(pid)
|
||||||
|
for _, line in ipairs(proc_lines(pid, "status")) do
|
||||||
|
local ppid = line:match("^PPid:%s+(%d+)")
|
||||||
|
if ppid then
|
||||||
|
return tonumber(ppid)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function ancestor_process_named(name)
|
||||||
|
local pid = vim.fn.getpid()
|
||||||
|
|
||||||
|
for _ = 1, 16 do
|
||||||
|
local ppid = proc_ppid(pid)
|
||||||
|
if not ppid or ppid <= 1 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local comm = proc_lines(ppid, "comm")[1] or ""
|
||||||
|
if comm:find(name, 1, true) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
pid = ppid
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function M.setup()
|
||||||
|
local in_tmux = vim.env.TMUX ~= nil
|
||||||
|
local in_ssh = vim.env.SSH_TTY ~= nil or vim.env.SSH_CONNECTION ~= nil
|
||||||
|
local in_herdr = vim.env.HERDR_PANE_ID ~= nil or ancestor_process_named("herdr")
|
||||||
|
|
||||||
|
if not (in_tmux or in_ssh or in_herdr) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local osc52 = require("vim.ui.clipboard.osc52")
|
||||||
|
local has_wayland = vim.env.WAYLAND_DISPLAY ~= nil
|
||||||
|
and vim.fn.executable("wl-copy") == 1
|
||||||
|
and vim.fn.executable("wl-paste") == 1
|
||||||
|
|
||||||
|
local function copy(register)
|
||||||
|
local emit = osc52.copy(register)
|
||||||
|
|
||||||
|
return function(lines)
|
||||||
|
if has_wayland then
|
||||||
|
local cmd = { "wl-copy", "--sensitive", "--type", "text/plain" }
|
||||||
|
if register == "*" then
|
||||||
|
cmd[#cmd + 1] = "--primary"
|
||||||
|
end
|
||||||
|
vim.fn.system(cmd, lines)
|
||||||
|
end
|
||||||
|
|
||||||
|
if vim.g.omarchy_remote_clipboard_osc52 ~= false then
|
||||||
|
emit(lines)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function paste(register)
|
||||||
|
if not has_wayland then
|
||||||
|
return osc52.paste(register)
|
||||||
|
end
|
||||||
|
|
||||||
|
return function()
|
||||||
|
local cmd = { "wl-paste", "--no-newline" }
|
||||||
|
if register == "*" then
|
||||||
|
cmd[#cmd + 1] = "--primary"
|
||||||
|
end
|
||||||
|
|
||||||
|
local lines = vim.fn.systemlist(cmd, "", 1)
|
||||||
|
return vim.v.shell_error == 0 and lines or {}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
vim.g.clipboard = {
|
||||||
|
name = "OmarchyRemoteClipboard",
|
||||||
|
copy = { ["+"] = copy("+"), ["*"] = copy("*") },
|
||||||
|
paste = { ["+"] = paste("+"), ["*"] = paste("*") },
|
||||||
|
cache_enabled = 0,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
return M
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
return {
|
||||||
|
"LazyVim/LazyVim",
|
||||||
|
opts = {
|
||||||
|
news = {
|
||||||
|
lazyvim = false,
|
||||||
|
neovim = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -4,7 +4,19 @@ return {
|
|||||||
opts = {
|
opts = {
|
||||||
formatters = {
|
formatters = {
|
||||||
prettier = {
|
prettier = {
|
||||||
command = "/home/pastilhas/.local/share/mise/installs/node/22.20.0/bin/prettier",
|
-- No `command` here on purpose. conform inherits it from its built-in
|
||||||
|
-- prettier definition, which resolves the name on PATH — and mason.nvim
|
||||||
|
-- puts ~/.local/share/nvim/mason/bin on Neovim's PATH, so the copy
|
||||||
|
-- listed in `ensure_installed` below is found automatically.
|
||||||
|
--
|
||||||
|
-- This used to hardcode a mise node path
|
||||||
|
-- (.../mise/installs/node/22.20.0/bin/prettier). That node version has
|
||||||
|
-- since been replaced by 24.19.0, so the path no longer existed and
|
||||||
|
-- prettier formatting was silently doing nothing.
|
||||||
|
--
|
||||||
|
-- `args` is set rather than appended, so it replaces conform's default
|
||||||
|
-- argument list. --no-config keeps formatting consistent regardless of
|
||||||
|
-- any .prettierrc in the project.
|
||||||
args = { "--no-config", "--stdin-filepath", "$FILENAME" },
|
args = { "--no-config", "--stdin-filepath", "$FILENAME" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ return {
|
|||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
opts = {
|
opts = {
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
enabled = true,
|
enabled = false,
|
||||||
exclude = { "vue" },
|
exclude = { "vue" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
return {
|
|
||||||
"NickvanDyke/opencode.nvim",
|
|
||||||
dependencies = {
|
|
||||||
-- Recommended for `ask()` and `select()`.
|
|
||||||
-- Required for `toggle()`.
|
|
||||||
{ "folke/snacks.nvim", opts = { input = {}, picker = {} } },
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
vim.g.opencode_opts = {
|
|
||||||
-- Your configuration, if any — see `lua/opencode/config.lua`
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Required for `vim.g.opencode_opts.auto_reload`
|
|
||||||
vim.opt.autoread = true
|
|
||||||
|
|
||||||
-- Recommended/example keymaps
|
|
||||||
vim.keymap.set({ "n", "x" }, "<leader>oa", function()
|
|
||||||
require("opencode").ask("@this: ", { submit = true })
|
|
||||||
end, { desc = "Ask about this" })
|
|
||||||
vim.keymap.set({ "n", "x" }, "<leader>os", function()
|
|
||||||
require("opencode").select()
|
|
||||||
end, { desc = "Select prompt" })
|
|
||||||
vim.keymap.set({ "n", "x" }, "<leader>o+", function()
|
|
||||||
require("opencode").prompt("@this")
|
|
||||||
end, { desc = "Add this" })
|
|
||||||
vim.keymap.set("n", "<leader>ot", function()
|
|
||||||
require("opencode").toggle()
|
|
||||||
end, { desc = "Toggle embedded" })
|
|
||||||
vim.keymap.set("n", "<leader>oc", function()
|
|
||||||
require("opencode").command()
|
|
||||||
end, { desc = "Select command" })
|
|
||||||
vim.keymap.set("n", "<leader>on", function()
|
|
||||||
require("opencode").command("session_new")
|
|
||||||
end, { desc = "New session" })
|
|
||||||
vim.keymap.set("n", "<leader>oi", function()
|
|
||||||
require("opencode").command("session_interrupt")
|
|
||||||
end, { desc = "Interrupt session" })
|
|
||||||
vim.keymap.set("n", "<leader>oA", function()
|
|
||||||
require("opencode").command("agent_cycle")
|
|
||||||
end, { desc = "Cycle selected agent" })
|
|
||||||
vim.keymap.set("n", "<S-C-u>", function()
|
|
||||||
require("opencode").command("messages_half_page_up")
|
|
||||||
end, { desc = "Messages half page up" })
|
|
||||||
vim.keymap.set("n", "<S-C-d>", function()
|
|
||||||
require("opencode").command("messages_half_page_down")
|
|
||||||
end, { desc = "Messages half page down" })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user