overhaul of some dotfiles

This commit is contained in:
Blake Ridgway
2026-04-05 10:42:44 -05:00
parent 05cdb1ca14
commit 8a006faf65
69 changed files with 697 additions and 6191 deletions

View File

@@ -1,29 +1,39 @@
{
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
"NvChad": { "branch": "v2.5", "commit": "eb209a4a82aecabe609d8206b865e00a760fb644" },
"base46": { "branch": "v3.0", "commit": "45b336ec52615dd1a3aa47848d894616dd6293a5" },
"cmp-async-path": { "branch": "main", "commit": "b8aade3a0626f2bc1d3cd79affcd7da9f47f7ab1" },
"base46": { "branch": "v3.0", "commit": "884b990dcdbe07520a0892da6ba3e8d202b46337" },
"cmp-async-path": { "branch": "main", "commit": "f8af3f726e07f2e9d37672eaa9102581aefce149" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "178b8f0d70ee63db616a8b3bda637218eef121dd" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"gitsigns.nvim": { "branch": "main", "commit": "cdafc320f03f2572c40ab93a4eecb733d4016d07" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "4ed47e8c4c66c921dc1d6643977e0526e1f44396" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
"menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
"nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" },
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
"nvim-dap": { "branch": "master", "commit": "4f5deb110d9ff8994d96c21df95e2271d11214f9" },
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
"nvim-dap-ui": { "branch": "master", "commit": "d9770a55188bb34c2bdce7d90a6151181beb6966" },
"nvim-lspconfig": { "branch": "master", "commit": "dc7e7c7699cc01b1b6fefa97f9b496d8f447d7a1" },
"nvim-tree.lua": { "branch": "master", "commit": "1eda2569394f866360e61f590f1796877388cb8a" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-tree.lua": { "branch": "master", "commit": "31503ad5d869fca61461d82a9126f62480ecb0ab" },
"nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "40e9d5a6cc3db11b309e39593fc7ac03bb844e38" },
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope.nvim": { "branch": "master", "commit": "3a12a853ebf21ec1cce9a92290e3013f8ae75f02" },
"ui": { "branch": "v3.0", "commit": "bea2af0a76c1098fac0988ad296aa028cad2a333" },
"telescope.nvim": { "branch": "master", "commit": "cfb85dcf7f822b79224e9e6aef9e8c794211b20b" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"ui": { "branch": "v3.0", "commit": "cb75908a86720172594b30de147272c1b3a7f452" },
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View File

@@ -1,24 +1,19 @@
-- This file needs to have same structure as nvconfig.lua
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
-- Please read that file to know all available options :(
---@type ChadrcConfig
local M = {}
M.base46 = {
theme = "onedark",
-- hl_override = {
-- Comment = { italic = true },
-- ["@comment"] = { italic = true },
-- },
theme = "onedark",
}
-- M.nvdash = { load_on_startup = true }
-- M.ui = {
-- tabufline = {
-- lazyload = false
-- }
-- }
-- Enable the startup dashboard
M.nvdash = {
load_on_startup = true,
}
M.ui = {
tabufline = {
lazyload = false,
},
}
return M

View File

@@ -1,15 +1,17 @@
local options = {
return {
formatters_by_ft = {
lua = { "stylua" },
-- css = { "prettier" },
-- html = { "prettier" },
go = { "goimports", "gofmt" },
cs = { "csharpier" },
yaml = { "prettier" },
json = { "prettier" },
jsonc = { "prettier" },
sh = { "shfmt" },
bash = { "shfmt" },
},
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
format_on_save = {
timeout_ms = 1000,
lsp_fallback = true,
},
}
return options

92
nvim/lua/configs/dap.lua Normal file
View File

@@ -0,0 +1,92 @@
local dap = require "dap"
local dapui = require "dapui"
-- DAP UI setup
dapui.setup {
icons = { expanded = "", collapsed = "", current_frame = "" },
layouts = {
{
elements = {
{ id = "scopes", size = 0.35 },
{ id = "breakpoints", size = 0.15 },
{ id = "stacks", size = 0.25 },
{ id = "watches", size = 0.25 },
},
size = 45,
position = "left",
},
{
elements = {
{ id = "repl", size = 0.5 },
{ id = "console", size = 0.5 },
},
size = 12,
position = "bottom",
},
},
}
-- Auto open/close UI with debug session
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
-- Go: powered by nvim-dap-go (wraps delve)
require("dap-go").setup {
dap_configurations = {
{
type = "go",
name = "Debug file",
request = "launch",
program = "${file}",
},
{
type = "go",
name = "Debug package",
request = "launch",
program = "${fileDirname}",
},
{
type = "go",
name = "Attach to process",
mode = "local",
request = "attach",
processId = require("dap.utils").pick_process,
},
},
}
-- C# / .NET: netcoredbg
dap.adapters.coreclr = {
type = "executable",
command = vim.fn.stdpath "data" .. "/mason/bin/netcoredbg",
args = { "--interpreter=vscode" },
}
dap.configurations.cs = {
{
type = "coreclr",
name = "Launch .NET",
request = "launch",
program = function()
return vim.fn.input("Path to dll: ", vim.fn.getcwd() .. "/bin/Debug/", "file")
end,
},
{
type = "coreclr",
name = "Attach .NET",
request = "attach",
processId = require("dap.utils").pick_process,
},
}
-- Signs
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticError", linehl = "", numhl = "" })
vim.fn.sign_define("DapBreakpointCondition", { text = "", texthl = "DiagnosticWarn", linehl = "", numhl = "" })
vim.fn.sign_define("DapStopped", { text = "", texthl = "DiagnosticOk", linehl = "DapStoppedLine", numhl = "" })

View File

@@ -1,6 +1,48 @@
-- NvChad sets default capabilities (nvim-cmp) and on_attach via vim.lsp.config("*", ...)
require("nvchad.configs.lspconfig").defaults()
local servers = { "html", "cssls" }
vim.lsp.enable(servers)
-- Go
vim.lsp.config("gopls", {
settings = {
gopls = {
gofumpt = true,
usePlaceholders = true,
staticcheck = true,
analyses = {
unusedparams = true,
shadow = true,
nilness = true,
},
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
},
},
})
-- read :h vim.lsp.config for changing options of lsp servers
-- YAML
vim.lsp.config("yamlls", {
settings = {
yaml = {
validate = true,
schemaStore = {
enable = true,
url = "https://www.schemastore.org/api/json/catalog.json",
},
},
},
})
-- C# / OmniSharp
vim.lsp.config("omnisharp", {
enable_roslyn_analyzers = true,
organize_imports_on_format = true,
enable_import_completion = true,
})
-- Enable all servers (Mason puts their binaries on PATH automatically)
vim.lsp.enable({ "gopls", "yamlls", "bashls", "omnisharp" })

View File

@@ -1,10 +1,79 @@
require "nvchad.mappings"
-- add yours here
local map = vim.keymap.set
-- Quick command mode
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
map("i", "jk", "<ESC>", { desc = "Escape insert mode" })
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
-- Save with Ctrl+S
map({ "n", "i", "v" }, "<C-s>", "<cmd>w<cr>", { desc = "Save file" })
-- ── Git ──────────────────────────────────────────────────────────────────────
map("n", "<leader>gg", "<cmd>LazyGit<cr>", { desc = "Open LazyGit" })
-- ── Diagnostics (Trouble) ────────────────────────────────────────────────────
map("n", "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", { desc = "Workspace diagnostics" })
map("n", "<leader>xb", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", { desc = "Buffer diagnostics" })
map("n", "<leader>xs", "<cmd>Trouble symbols toggle focus=false<cr>", { desc = "Document symbols" })
map("n", "<leader>xl", "<cmd>Trouble lsp toggle focus=false win.position=right<cr>", { desc = "LSP references" })
map("n", "<leader>xq", "<cmd>Trouble qflist toggle<cr>", { desc = "Quickfix list" })
-- ── DAP ──────────────────────────────────────────────────────────────────────
map("n", "<leader>db", "<cmd>DapToggleBreakpoint<cr>", { desc = "Toggle breakpoint" })
map("n", "<leader>dB", function()
require("dap").set_breakpoint(vim.fn.input "Condition: ")
end, { desc = "Conditional breakpoint" })
map("n", "<leader>dc", "<cmd>DapContinue<cr>", { desc = "Continue" })
map("n", "<leader>di", "<cmd>DapStepInto<cr>", { desc = "Step into" })
map("n", "<leader>do", "<cmd>DapStepOver<cr>", { desc = "Step over" })
map("n", "<leader>dO", "<cmd>DapStepOut<cr>", { desc = "Step out" })
map("n", "<leader>dt", "<cmd>DapTerminate<cr>", { desc = "Terminate" })
map("n", "<leader>du", function() require("dapui").toggle() end, { desc = "Toggle DAP UI" })
map("n", "<leader>dr", function() require("dap").repl.open() end,{ desc = "Open REPL" })
map("n", "<leader>dgt", function() require("dap-go").debug_test() end, { desc = "Debug Go test" })
map("n", "<leader>dgl", function() require("dap-go").debug_last_test() end, { desc = "Debug last Go test" })
-- ── Terminal ──────────────────────────────────────────────────────────────────
map("n", "<leader>tf", "<cmd>ToggleTerm direction=float<cr>", { desc = "Float terminal" })
map("n", "<leader>th", "<cmd>ToggleTerm direction=horizontal<cr>", { desc = "Horizontal terminal" })
map("n", "<leader>tv", "<cmd>ToggleTerm direction=vertical<cr>", { desc = "Vertical terminal" })
-- ── TODO comments ─────────────────────────────────────────────────────────────
map("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find TODOs" })
map("n", "]t", function() require("todo-comments").jump_next() end, { desc = "Next TODO" })
map("n", "[t", function() require("todo-comments").jump_prev() end, { desc = "Prev TODO" })
-- ── Harpoon ───────────────────────────────────────────────────────────────────
map("n", "<leader>ha", function() require("harpoon"):list():add() end, { desc = "Add file" })
map("n", "<leader>hh", function()
local h = require "harpoon"
h.ui:toggle_quick_menu(h:list())
end, { desc = "Toggle menu" })
map("n", "<leader>h1", function() require("harpoon"):list():select(1) end, { desc = "File 1" })
map("n", "<leader>h2", function() require("harpoon"):list():select(2) end, { desc = "File 2" })
map("n", "<leader>h3", function() require("harpoon"):list():select(3) end, { desc = "File 3" })
map("n", "<leader>h4", function() require("harpoon"):list():select(4) end, { desc = "File 4" })
-- cycle through harpoon list
map("n", "<leader>hp", function() require("harpoon"):list():prev() end, { desc = "Prev file" })
map("n", "<leader>hn", function() require("harpoon"):list():next() end, { desc = "Next file" })
-- ── Oil ───────────────────────────────────────────────────────────────────────
map("n", "-", "<cmd>Oil<cr>", { desc = "Open parent dir (Oil)" })
map("n", "<leader>oo", "<cmd>Oil --float<cr>", { desc = "Oil (float)" })
-- ── which-key group labels ────────────────────────────────────────────────────
vim.schedule(function()
local ok, wk = pcall(require, "which-key")
if not ok then return end
wk.add {
{ "<leader>d", group = "Debug" },
{ "<leader>dg", group = "Go" },
{ "<leader>x", group = "Diagnostics" },
{ "<leader>t", group = "Terminal" },
{ "<leader>g", group = "Git" },
{ "<leader>h", group = "Harpoon" },
{ "<leader>o", group = "Oil" },
{ "<leader>f", group = "Find" },
}
end)

View File

@@ -1,6 +1,23 @@
require "nvchad.options"
-- add yours here!
local o = vim.opt
-- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!
o.relativenumber = true -- relative line numbers for fast navigation
o.scrolloff = 8 -- keep 8 lines visible above/below cursor
o.sidescrolloff = 8
o.wrap = false -- no line wrapping
o.undofile = true -- persist undo history across sessions
o.splitbelow = true -- horizontal splits open below
o.splitright = true -- vertical splits open to the right
o.colorcolumn = "120" -- column ruler at 120 chars
o.cursorline = true -- highlight current line
-- Go uses real tabs; everything else uses 4-space soft tabs
vim.api.nvim_create_autocmd("FileType", {
pattern = "go",
callback = function()
vim.opt_local.expandtab = false
vim.opt_local.tabstop = 4
vim.opt_local.shiftwidth = 4
end,
})

View File

@@ -1,11 +1,22 @@
return {
-- Treesitter: syntax highlighting + code understanding
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"vim", "lua", "vimdoc",
"go", "gomod", "gowork", "gosum",
"c_sharp",
"yaml",
"bash",
"json", "jsonc",
"toml",
"markdown", "markdown_inline",
},
},
},
-- These are some examples, uncomment them if you want to see them work!
-- LSP servers
{
"neovim/nvim-lspconfig",
config = function()
@@ -13,16 +24,107 @@ return {
end,
},
-- test new blink
-- { import = "nvchad.blink.lazyspec" },
-- Formatting (with format-on-save)
{
"stevearc/conform.nvim",
event = "BufWritePre",
opts = require "configs.conform",
},
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- ensure_installed = {
-- "vim", "lua", "vimdoc",
-- "html", "css"
-- },
-- },
-- },
-- Mason: auto-install LSPs, formatters, and DAP adapters
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
-- LSPs
"gopls",
"omnisharp",
"yaml-language-server",
"bash-language-server",
-- Formatters / linters
"goimports",
"csharpier",
"prettier",
"shfmt",
"stylua",
-- DAP adapters
"delve", -- Go debugger
"netcoredbg", -- .NET debugger
},
},
},
-- Diagnostics panel
{
"folke/trouble.nvim",
cmd = "Trouble",
opts = { use_diagnostic_signs = true },
},
-- Floating terminal
{
"akinsho/toggleterm.nvim",
version = "*",
cmd = "ToggleTerm",
keys = { [[<C-\>]] },
opts = {
open_mapping = [[<C-\>]],
direction = "float",
float_opts = { border = "curved" },
},
},
-- Lazygit inside Neovim
{
"kdheepak/lazygit.nvim",
cmd = "LazyGit",
dependencies = { "nvim-lua/plenary.nvim" },
},
-- DAP core + UI
{
"mfussenegger/nvim-dap",
dependencies = {
"rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio", -- required by dap-ui
"leoluz/nvim-dap-go",
},
config = function()
require "configs.dap"
end,
},
-- Highlight TODO/FIXME/HACK/NOTE comments
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
event = "BufReadPost",
opts = {},
},
-- Harpoon2: quick-jump between pinned files per project
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {},
},
-- Oil: edit the filesystem like a buffer
{
"stevearc/oil.nvim",
lazy = false,
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
-- Keep nvim-tree as the default explorer; oil opens on demand via `-`
default_file_explorer = false,
columns = { "icon", "permissions", "size", "mtime" },
view_options = { show_hidden = true },
-- Don't clobber window-navigation keys
keymaps = {
["<C-h>"] = false,
["<C-l>"] = false,
},
},
},
}

1
nvim/nvim Symbolic link
View File

@@ -0,0 +1 @@
/home/bridgway/dotfiles/nvim