Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
brew "neovim"
brew "fd"

cask "ghostty"
cask "hammerspoon"
10 changes: 10 additions & 0 deletions configs/ghostty/config
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Treat Option as Alt so Neovim receives <A-...> key events properly
macos-option-as-alt = true

# Editor text size
font-size = 15

# Unbind Cmd keys so they pass through to Neovim via the kitty keyboard
# protocol. Neovim 0.11+ and Ghostty both support this protocol, so
# Neovim will receive these as <D-Right>, <D-Left>, etc. natively.
Expand All @@ -20,6 +23,10 @@ keybind = super+e=unbind
keybind = super+l=unbind
keybind = super+g=unbind
keybind = super+shift+g=unbind
keybind = super+j=unbind
keybind = super+shift+j=unbind
keybind = shift+arrow_left=unbind
keybind = shift+arrow_right=unbind

# Cmd+Shift+Arrow: split terminal in that direction
keybind = super+shift+arrow_down=new_split:down
Expand Down Expand Up @@ -56,3 +63,6 @@ keybind = super+/=unbind

# Cmd+A: send Escape to Neovim
keybind = super+a=esc:

# Cmd+B: pass through to Neovim to close buffer
keybind = super+b=unbind
2 changes: 2 additions & 0 deletions configs/nvim/after/ftplugin/sql.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
" Disable nvim's built-in sqlcomplete omni completion (drill errors)
setlocal omnifunc=
40 changes: 22 additions & 18 deletions configs/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@
{
"LazyVim": { "branch": "main", "commit": "c10948c50b18fae7f256433afdef09e432410480" },
"SchemaStore.nvim": { "branch": "main", "commit": "304d2286752923e3b0eb1ddcb3d4002a69b855ad" },
"SchemaStore.nvim": { "branch": "main", "commit": "76c1a2357d4a9da49a90f922e251e5c32d74c99b" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"bruno.nvim": { "branch": "main", "commit": "54bdebc62aa6ffc7906464a20d182c0a660be836" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"catppuccin": { "branch": "main", "commit": "49a926655a2f5579e9c276470fc300baaa49e524" },
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
"catppuccin": { "branch": "main", "commit": "edefef779ab08ce1a4a404713e3012b0d202bd35" },
"conform.nvim": { "branch": "master", "commit": "016802de402556da54c36bd7359b441266b01cdd" },
"crates.nvim": { "branch": "main", "commit": "694357861ec9ebf12475ddcdd04ea45a0923c32d" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"flash.nvim": { "branch": "main", "commit": "5f0f270fdc7c5b0c21d903ee85b9cb06f2ac636a" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "25050e4ed39e628282831d4cbecb1850454ce915" },
"grug-far.nvim": { "branch": "main", "commit": "c995bbacf8229dc096ec1c3d60f8531059c86c1b" },
"gitsigns.nvim": { "branch": "main", "commit": "5be654f2232c10ddcad19c1607a67b6b4b78fc29" },
"grug-far.nvim": { "branch": "main", "commit": "11595bf747edc270bce2069d1020502ad4ae56cf" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "40276c4df7e6bdce6801d6c035c6227f9115a855" },
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
"mini.ai": { "branch": "main", "commit": "4511b3481707c1d021485475d34f2ed2a50bf47b" },
"mini.icons": { "branch": "main", "commit": "d48ad47359218d2b019034f95f601b3861180885" },
"mini.pairs": { "branch": "main", "commit": "30cf2f01c4aaa2033db67376b9924fa2442c05d6" },
"mini.ai": { "branch": "main", "commit": "25248c6aa002391936a6200f12d1466015987133" },
"mini.icons": { "branch": "main", "commit": "98faae31e9be1cc054ae63485e58ceb185efcad0" },
"mini.pairs": { "branch": "main", "commit": "b1c5a726921b7a8c9321e9a7a208aa0571de5810" },
"neotest": { "branch": "master", "commit": "27bf921498043f7ecd821d6db68d05de244bbd02" },
"neotest-golang": { "branch": "main", "commit": "65b2be63c3de00e6f15c05388ebdc8d603dbd727" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-lint": { "branch": "master", "commit": "99cbc3ca8a76845fca50e496be7212bebf907dd3" },
"nvim-lspconfig": { "branch": "master", "commit": "a683e0ddf0cf64c6cd689e18ffb480ade3c162b7" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
"nui.nvim": { "branch": "main", "commit": "10fc361835c856ba4233ef5ea135b919bf3dce97" },
"nvim-lint": { "branch": "master", "commit": "3d55c8f67c6ae5c15e1042571e107c7a3d5c5f4e" },
"nvim-lspconfig": { "branch": "master", "commit": "684cb45c2faa24ce463b4fe9aaf011bfe1e0fb26" },
"nvim-nio": { "branch": "master", "commit": "edcc181a875301dd21840189aa2f2f9ad69fc172" },
"nvim-treesitter": { "branch": "main", "commit": "857651fce37eba032ebe28f3a206283cdc65c45a" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "898ee307df58f854d11cd7edd06472574d48014e" },
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
"persistence.nvim": { "branch": "main", "commit": "b20b2a7887bd39c1a356980b45e03250f3dce49c" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"render-markdown.nvim": { "branch": "main", "commit": "5adf0895310c1904e5abfaad40a2baad7fe44a07" },
"rustaceanvim": { "branch": "main", "commit": "d2f5271924117588c82bec9086c9807960aafe1e" },
"render-markdown.nvim": { "branch": "main", "commit": "4663eb3ecd538bd5062628fb6d95bbe6bdca78f6" },
"rustaceanvim": { "branch": "main", "commit": "e2798fe326bb3efd2d15b9a652ed3872d358c98d" },
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"ts-comments.nvim": { "branch": "main", "commit": "123a9fb12e7229342f807ec9e6de478b1102b041" },
"ts-comments.nvim": { "branch": "main", "commit": "a59d6092213447450191122c9346f309161504cb" },
"vim-dadbod": { "branch": "master", "commit": "6d1d41da4873a445c5605f2005ad2c68c99d8770" },
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
"vim-dadbod-ui": { "branch": "master", "commit": "afd07819d8efcefc3317205b855ad4e3513b0011" },
Expand Down
30 changes: 30 additions & 0 deletions configs/nvim/lua/config/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ map({ "n", "i", "v" }, "<D-l>", vim.lsp.buf.code_action, { desc = "Code actions"
-- Cmd+G: go to definition (matching Zed's Cmd+G behavior)
map({ "n", "i", "v" }, "<D-g>", vim.lsp.buf.definition, { desc = "Go to definition" })

-- Cmd+J: hover documentation (function params, types, etc)
map({ "n", "i", "v" }, "<D-j>", vim.lsp.buf.hover, { desc = "Hover documentation" })

-- Cmd+S: save current file
map({ "n", "i", "v" }, "<D-s>", function()
if vim.api.nvim_get_mode().mode ~= "n" then
Expand Down Expand Up @@ -242,6 +245,14 @@ map("n", "<S-Up>", "v<Up>", { desc = "Select previous line" })
map("n", "<S-Down>", "v<Down>", { desc = "Select next line" })
map("v", "<S-Up>", "<Up>", { desc = "Extend selection up" })
map("v", "<S-Down>", "<Down>", { desc = "Extend selection down" })
map("i", "<S-Up>", "<Esc>v<Up>", { desc = "Select previous line" })
map("i", "<S-Down>", "<Esc>v<Down>", { desc = "Select next line" })

-- Shift+Left/Right: highlight/select text horizontally (like Zed)
map("n", "<S-Left>", "v<Left>", { desc = "Select previous character" })
map("n", "<S-Right>", "v<Right>", { desc = "Select next character" })
map("v", "<S-Left>", "<Left>", { desc = "Extend selection left" })
map("v", "<S-Right>", "<Right>", { desc = "Extend selection right" })

-- Alt+Up/Down: move line (or visual selection) up/down
map("n", "<A-Down>", "<cmd>execute 'move .+' . v:count1<cr>==", { desc = "Move Line Down" })
Expand All @@ -257,4 +268,23 @@ map("v", "<A-S-Up>", "y'<P", { desc = "Duplicate Selection Above" })

map("n", "n", "nzzzv", { desc = "Next search result centered" })
map("n", "N", "Nzzzv", { desc = "Previous search result centered" })
map("n", "f", "/", { desc = "Search (like /)" })
map("n", "rr", vim.lsp.buf.rename, { desc = "Rename" })

-- Leader+b+a: delete all buffers (keeping the current window)
map("n", "<leader>ba", function()
-- skip the current buffer so the window stays open
local current = vim.api.nvim_get_current_buf()
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if bufnr ~= current and vim.api.nvim_buf_is_loaded(bufnr) and vim.bo[bufnr].buflisted then
pcall(vim.api.nvim_buf_delete, bufnr, { force = true })
end
end
vim.notify("Deleted all other buffers")
end, { desc = "Delete All Other Buffers" })

-- Substitute word under cursor across file
map("n", "s", ":%s/<C-r><C-w>//g<Left><Left>", { desc = "Substitute word under cursor" })

-- Close current buffer
map("n", "<D-b>", "<cmd>bdelete<cr>", { desc = "Close buffer" })
35 changes: 35 additions & 0 deletions configs/nvim/lua/plugins/bruno.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
return {
{
"romek-codes/bruno.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
{
"folke/snacks.nvim",
opts = { picker = { enabled = true } },
},
},
config = function(_, opts)
require("bruno").setup(opts)

local map = LazyVim.safe_keymap_set
map("n", "<leader>rr", "<cmd>BrunoRun<CR>", { desc = "Bruno: run request" })
map("n", "<leader>rl", "<cmd>BrunoReplay<CR>", { desc = "Bruno: re-run last request" })
map("n", "<leader>re", "<cmd>BrunoEnv<CR>", { desc = "Bruno: switch environment" })
map("n", "<leader>rs", "<cmd>BrunoSearch<CR>", { desc = "Bruno: search requests" })
map("n", "<leader>rc", "<cmd>BrunoCopy<CR>", { desc = "Bruno: copy as curl" })
map("n", "<leader>ri", "<cmd>BrunoInspect<CR>", { desc = "Bruno: inspect last request" })
map("n", "<leader>rt", "<cmd>BrunoToggleView<CR>", { desc = "Bruno: toggle output view" })
end,
opts = {
collection_paths = {
{ name = "web", path = vim.fn.expand("~") .. "/Code/go/web/requests" },
},
picker = "snacks",
},
},
{
"nvim-treesitter/nvim-treesitter",
optional = true,
opts = { ensure_installed = { "http", "lua" } },
},
}
4 changes: 4 additions & 0 deletions configs/nvim/lua/plugins/go.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
return {
{ import = "lazyvim.plugins.extras.test.core" },
{ import = "lazyvim.plugins.extras.lang.go" },
}
4 changes: 3 additions & 1 deletion configs/nvim/lua/plugins/multicursor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ return {
branch = 'master',
init = function()
vim.g.VM_maps = {
['Find Under'] = '<D-d>',
['Find Under'] = '<D-d>',
['Find Subword Under'] = '<D-d>',
['Add Cursor Down'] = '<M-C-Down>', -- free up <C-Down>
['Add Cursor Up'] = '<M-C-Up>', -- free up <C-Up>
}
end,
},
Expand Down
24 changes: 24 additions & 0 deletions configs/nvim/lua/plugins/snacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,30 @@ return {
hidden = true,
ignored = true,
exclude = { "node_modules" },
win = {
list = {
keys = {
["f"] = "explorer_close_all",
},
},
},
jump = { close = true },
layout = {
layout = {
box = "horizontal",
width = 90,
min_width = 90,
height = 0.8,
{
box = "vertical",
border = true,
title = "{title} {live} {flags}",
{ win = "input", height = 1, border = "bottom" },
{ win = "list", border = "none" },
},
{ win = "preview", title = "{preview}", border = true, width = 0.5 },
},
},
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion configs/nvim/lua/plugins/sql.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return {
"neovim/nvim-lspconfig",
opts = {
servers = {
sqlls = {},
sqlls = false,
},
},
},
Expand Down
9 changes: 9 additions & 0 deletions configs/nvim/lua/plugins/test.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
{
"nvim-neotest/neotest",
keys = {
{ "<leader>tt", function() require("neotest").run.run() end, desc = "Run Nearest Test (Neotest)" },
{ "<leader>tf", function() require("neotest").run.run(vim.fn.expand("%")) end, desc = "Run File (Neotest)" },
},
},
}