feat: nvim config tracks the live tree
Port the live ~/.config/nvim working tree (bcherb2/nvim master plus its uncommitted git.lua and minimap.lua edits): adds claudecode, eslint, lsp, typescript, meow-yarn and refactoring-fix specs, drops the files the live repo deleted, and takes live for everything else. Kept from public: lazy.lua with luarocks disabled, the ai_assist cond guard (nvim-ai-assist is not anonymously clonable, so a fresh box only gets it from the private clone list), and the scrubbed endpoint comment in place of live's LAN address.
This commit is contained in:
1 parent
9baaf78522
commit
0aaaf51421
28 files changed
+1001
-611
No files matched your search
@@ -13,3 +13,27 @@ vim.keymap.set("n", "<leader>cY", function()
|
||||
vim.fn.setreg("+", vim.fn.expand("%:p"))
|
||||
print("Copied absolute path: " .. vim.fn.expand("%:p"))
|
||||
end, { desc = "Copy absolute path" })
|
||||
|
||||
-- Select mode (Shift+arrows) replaces the selection with what you type, so `y`
|
||||
-- types a "y". Conventional copy/cut instead (<C-g> switches to Visual first).
|
||||
-- The `y`/`d` is fed remappable so buffer maps still apply (md-render's render
|
||||
-- view copies markdown source); `"+` is fed noremap so which-key's `"` trigger
|
||||
-- stays out. Both go to the front of typeahead, in this order.
|
||||
local function clipboard_op(prefix, op)
|
||||
return function()
|
||||
vim.api.nvim_feedkeys(op, "mi", false)
|
||||
vim.api.nvim_feedkeys(vim.keycode(prefix) .. '"+', "ni", false)
|
||||
end
|
||||
end
|
||||
vim.keymap.set("s", "<C-c>", clipboard_op("<C-g>", "y"), { desc = "Copy selection to clipboard" })
|
||||
vim.keymap.set("s", "<C-x>", clipboard_op("<C-g>", "d"), { desc = "Cut selection to clipboard" })
|
||||
vim.keymap.set("x", "<C-c>", clipboard_op("", "y"), { desc = "Copy selection to clipboard" })
|
||||
|
||||
-- VS Code's terminal toggle (Ctrl+`, the ~ key), mirroring LazyVim's <C-/>.
|
||||
-- Only reaches nvim when the terminal sends CSI u / kitty keys; the legacy
|
||||
-- encoding of Ctrl+` is NUL, which is <C-Space> (flash) and is left alone.
|
||||
local function toggle_terminal()
|
||||
Snacks.terminal.focus(nil, { cwd = LazyVim.root() })
|
||||
end
|
||||
vim.keymap.set({ "n", "t" }, "<C-`>", toggle_terminal, { desc = "Terminal (Root Dir)" })
|
||||
vim.keymap.set({ "n", "t" }, "<C-~>", toggle_terminal, { desc = "which_key_ignore" })
|
||||
Reference in new issue
Block a user