feat: add gx.nvim, comment-box, and machine-local override support
- Add gx.nvim for smart URL opening (GitHub, plugins, package.json, search) - Add comment-box.nvim with keymaps for creating/deleting comment boxes - Load machine-local secrets.lua and local.lua from ~/.config/.user-dots/nvim/ - Update README with new plugins, keymaps, and portability highlight Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ A modern, modular, and high-performance Neovim configuration built from scratch
|
|||||||
- **High Performance**: Featuring **blink.cmp** (Rust-based completion) and optimized **Snacks.nvim** components.
|
- **High Performance**: Featuring **blink.cmp** (Rust-based completion) and optimized **Snacks.nvim** components.
|
||||||
- **AI-Powered**: Native integration with the **GitHub Copilot Language Server**.
|
- **AI-Powered**: Native integration with the **GitHub Copilot Language Server**.
|
||||||
- **User-Centric QoL**: Hybrid line numbers, autosave-on-edit, and seamless system clipboard integration.
|
- **User-Centric QoL**: Hybrid line numbers, autosave-on-edit, and seamless system clipboard integration.
|
||||||
- **Resilient & Portable**: Intelligent terminal title management (Kitty + Fallback) and automatic project root detection.
|
- **Resilient & Portable**: Intelligent terminal title management (Kitty + Fallback), automatic project root detection, and machine-local override support.
|
||||||
- **Lean & Readable**: ~800 lines of Lua code (excluding comments and blanks).
|
- **Lean & Readable**: ~800 lines of Lua code (excluding comments and blanks).
|
||||||
|
|
||||||
## 📁 Architecture
|
## 📁 Architecture
|
||||||
@@ -88,6 +88,11 @@ nvim
|
|||||||
| `K` | Hover Documentation |
|
| `K` | Hover Documentation |
|
||||||
| `s` / `S` | Leap Motion (Normal/Window) |
|
| `s` / `S` | Leap Motion (Normal/Window) |
|
||||||
| `ys` / `ds` / `cs` | Surround (Add/Delete/Change) |
|
| `ys` / `ds` / `cs` | Surround (Add/Delete/Change) |
|
||||||
|
| `gx` / `gX` | Open URL under cursor (Gx.nvim) |
|
||||||
|
| `<leader>cbb` | Create Centered Comment Box |
|
||||||
|
| `<leader>cbl` | Create Centered Comment Line |
|
||||||
|
| `<leader>cbd` | Delete Comment Box/Line |
|
||||||
|
| `<leader>cbk` | Browse Box Style Catalog |
|
||||||
| `:Q` | Forced Write-All and Quit |
|
| `:Q` | Forced Write-All and Quit |
|
||||||
|
|
||||||
## 📜 License
|
## 📜 License
|
||||||
|
|||||||
@@ -34,3 +34,12 @@ require('lazyload')
|
|||||||
require('options')
|
require('options')
|
||||||
require('plugins')
|
require('plugins')
|
||||||
require('keymaps')
|
require('keymaps')
|
||||||
|
|
||||||
|
-- Source machine-local and secret overrides (silently ignored if absent)
|
||||||
|
local user_dots = vim.fn.expand("~/.config/.user-dots/nvim/")
|
||||||
|
for _, file in ipairs({ "secrets.lua", "local.lua" }) do
|
||||||
|
local path = user_dots .. file
|
||||||
|
if vim.fn.filereadable(path) == 1 then
|
||||||
|
dofile(path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|||||||
@@ -322,6 +322,14 @@ vim.keymap.set("n", "<leader>uu", "<cmd>UndotreeToggle<cr>", { desc = "Toggle Un
|
|||||||
|
|
||||||
----------------------------------------------------------
|
----------------------------------------------------------
|
||||||
|
|
||||||
|
-- Comment Box Keymaps
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>cbb", "<cmd>CBccbox<cr>", { desc = "Centered Box" })
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>cbl", "<cmd>CBcline<cr>", { desc = "Centered Line" })
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>cbd", "<cmd>CBd<cr>", { desc = "Delete Box/Line" })
|
||||||
|
vim.keymap.set("n", "<leader>cbk", "<cmd>CBcatalog<cr>", { desc = "Box Style Catalog" })
|
||||||
|
|
||||||
|
----------------------------------------------------------
|
||||||
|
|
||||||
-- Persistence Keymaps
|
-- Persistence Keymaps
|
||||||
vim.keymap.set("n", "<leader>qs", function()
|
vim.keymap.set("n", "<leader>qs", function()
|
||||||
require("persistence").load()
|
require("persistence").load()
|
||||||
|
|||||||
+23
-1
@@ -102,7 +102,14 @@ Config.plugins.snacks = {
|
|||||||
enabled = true,
|
enabled = true,
|
||||||
win = {
|
win = {
|
||||||
keys = {
|
keys = {
|
||||||
toggle = { "<c-/>", function(self) self:hide() end, mode = "t", desc = "Toggle Terminal" },
|
toggle = {
|
||||||
|
"<c-/>",
|
||||||
|
function(self)
|
||||||
|
self:hide()
|
||||||
|
end,
|
||||||
|
mode = "t",
|
||||||
|
desc = "Toggle Terminal",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -172,6 +179,21 @@ lazyload.on_vim_enter(function()
|
|||||||
vim.pack.add({ { src = "https://github.com/echasnovski/mini.pairs", name = "mini.pairs" } })
|
vim.pack.add({ { src = "https://github.com/echasnovski/mini.pairs", name = "mini.pairs" } })
|
||||||
require("mini.pairs").setup()
|
require("mini.pairs").setup()
|
||||||
|
|
||||||
|
-- Gx.nvim
|
||||||
|
vim.pack.add({ { src = "https://github.com/chrishrb/gx.nvim", name = "gx" } })
|
||||||
|
require("gx").setup({
|
||||||
|
handlers = {
|
||||||
|
plugin = true,
|
||||||
|
github = true,
|
||||||
|
package_json = true,
|
||||||
|
search = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Comment-box.nvim
|
||||||
|
vim.pack.add({ { src = "https://github.com/LudoPinelli/comment-box.nvim", name = "comment-box" } })
|
||||||
|
require("comment-box").setup()
|
||||||
|
|
||||||
-- Undotree
|
-- Undotree
|
||||||
vim.g.undotree_ShortIndicators = 0
|
vim.g.undotree_ShortIndicators = 0
|
||||||
vim.g.undotree_SplitWidth = 32
|
vim.g.undotree_SplitWidth = 32
|
||||||
|
|||||||
@@ -12,10 +12,18 @@
|
|||||||
"rev": "426dbebe06b5c69fd846ceb17b42e12f890aedf1",
|
"rev": "426dbebe06b5c69fd846ceb17b42e12f890aedf1",
|
||||||
"src": "https://github.com/catppuccin/nvim"
|
"src": "https://github.com/catppuccin/nvim"
|
||||||
},
|
},
|
||||||
|
"comment-box": {
|
||||||
|
"rev": "06bb771690bc9df0763d14769b779062d8f12bc5",
|
||||||
|
"src": "https://github.com/LudoPinelli/comment-box.nvim"
|
||||||
|
},
|
||||||
"conform": {
|
"conform": {
|
||||||
"rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395",
|
"rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395",
|
||||||
"src": "https://github.com/stevearc/conform.nvim"
|
"src": "https://github.com/stevearc/conform.nvim"
|
||||||
},
|
},
|
||||||
|
"cord.nvim": {
|
||||||
|
"rev": "0be090969e978f7442870ef227e09eff7bf3480d",
|
||||||
|
"src": "https://github.com/vyfor/cord.nvim"
|
||||||
|
},
|
||||||
"flash": {
|
"flash": {
|
||||||
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
|
"rev": "fcea7ff883235d9024dc41e638f164a450c14ca2",
|
||||||
"src": "https://github.com/folke/flash.nvim"
|
"src": "https://github.com/folke/flash.nvim"
|
||||||
@@ -36,6 +44,10 @@
|
|||||||
"rev": "21604255d0e8f9968322f61f2b6c09e5efe1285a",
|
"rev": "21604255d0e8f9968322f61f2b6c09e5efe1285a",
|
||||||
"src": "https://github.com/MagicDuck/grug-far.nvim"
|
"src": "https://github.com/MagicDuck/grug-far.nvim"
|
||||||
},
|
},
|
||||||
|
"gx": {
|
||||||
|
"rev": "ba9c408fc0130fc4548760c3933a81b58fc50de8",
|
||||||
|
"src": "https://github.com/chrishrb/gx.nvim"
|
||||||
|
},
|
||||||
"inc-rename": {
|
"inc-rename": {
|
||||||
"rev": "0074b551a17338ccdcd299bd86687cc651bcb33d",
|
"rev": "0074b551a17338ccdcd299bd86687cc651bcb33d",
|
||||||
"src": "https://github.com/smjonas/inc-rename.nvim"
|
"src": "https://github.com/smjonas/inc-rename.nvim"
|
||||||
|
|||||||
Reference in New Issue
Block a user