feat(config): various config updates

Packaged updates to configuration.
This commit is contained in:
2025-08-23 11:52:26 -04:00
parent 00b23548c3
commit 4545e18a68
20 changed files with 564 additions and 107 deletions
+17
View File
@@ -152,3 +152,20 @@ vim.api.nvim_create_autocmd('FileType', {
vim.opt_local.formatoptions:remove({ 'o' })
end,
})
-- Run async commands with output to split
vim.api.nvim_create_user_command('RunAsync', function(async_opts)
-- Save current buffer first
vim.cmd('w')
-- Construct the full command
local cmd = table.concat(async_opts.fargs, ' ')
-- Open a horizontal split with the terminal running the command
vim.cmd('belowright split | terminal ' .. cmd)
-- Optional: return focus to original window
vim.cmd('wincmd p')
end, {
nargs = '+', -- Require at least one argument
})
+6
View File
@@ -2,6 +2,12 @@
-- │ Early interventions │
-- ╰─────────────────────────────────────────────────────────╯
-- Execute project-specific configuration if it exists
local project_config = vim.fn.getcwd() .. '/.nvim.lua'
if vim.fn.filereadable(project_config) == 1 then
dofile(project_config)
end
-- Address vim.hl bug impacting `:Inspect` command
---@see https://github.com/neovim/neovim/issues/31675
vim.hl = vim.highlight
+22 -13
View File
@@ -22,6 +22,7 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
local plugin_specs = {
{ -- LazyVim
'LazyVim/LazyVim',
-- dev = true,
priority = 900,
opts = require('data.types').lazyvim.opts,
},
@@ -35,19 +36,9 @@ local plugin_specs = {
{ import = 'plugins' }, -- General Plugins
}
-- Automatically import all subdirectories of `lua/plugins`
local plugin_dirs = vim.fn.glob('~/.config/nvim/lua/plugins/*', true, true)
for _, dir in ipairs(plugin_dirs) do
if vim.fn.isdirectory(dir) == 1 then
table.insert( -- Add directory to the plugin import table
plugin_specs,
{ import = 'plugins.' .. vim.fn.fnamemodify(dir, ':t') }
)
end
end
-- ━━━━━━━━━━━━━━━━━━━━━━━━━ Lazy Configuration ━━━━━━━━━━━━━━━━━━━━━━
-- Initialize Lazy plugin manager
require('lazy').setup({
local lazy_spec = {
spec = plugin_specs,
rocks = {
hererocks = vim.g.use_luarocks,
@@ -100,4 +91,22 @@ require('lazy').setup({
border = 'rounded',
title = ' Plugin Manager ',
},
})
}
-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━ Import Plugins ━━━━━━━━━━━━━━━━━━━━━━━━
-- Automatically import all subdirectories of `lua/plugins`
local plugin_dirs = vim.fn.glob('~/.config/nvim/lua/plugins/*', true, true)
for _, dir in ipairs(plugin_dirs) do
if vim.fn.isdirectory(dir) == 1 then
table.insert( -- Add directory to the plugin import table
plugin_specs,
{ import = 'plugins.' .. vim.fn.fnamemodify(dir, ':t') }
)
end
end
-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Setup Lazy ━━━━━━━━━━━━━━━━━━━━━━━━━━
-- Initialize Lazy plugin manager
require('lazy').setup(lazy_spec)
+1 -1
View File
@@ -8,7 +8,7 @@
vim.opt.guifont = 'Iosevka Rootiest V2:#e-subpixelantialias:h12'
-- refresh rate and translucency
vim.g.neovide_refresh_rate = 120
vim.g.neovide_transparency = 0.85
vim.g.neovide_opacity = 0.85
vim.g.neovide_window_blurred = true
vim.g.neovide_floating_blur_amount_x = 2.0
vim.g.neovide_floating_blur_amount_y = 2.0
+1 -1
View File
@@ -192,7 +192,7 @@ vim.g.statusline = "lualine" ---@type string Options: [status
-- Click git components on statusline to open LazyGit
vim.g.statusline_clickable_git = true ---@type boolean Options: <true|false>
-- Show wakatime stats on statusline
vim.g.stats_wakatime = true ---@type boolean Options: <true|false>
vim.g.stats_wakatime = false ---@type boolean Options: <true|false>
-- Show music stats on statusline
vim.g.stats_music = true ---@type boolean Options: <true|false>
-- Ignored player sources for music stats
+31
View File
@@ -107,6 +107,13 @@ vim.keymap.set(
{ noremap = true, desc = 'Replay last register' }
)
-- Duplicate and comment lines
vim.keymap.set('n', 'ycc', function()
vim.cmd('normal! ' .. vim.v.count1 .. 'yy')
vim.cmd('normal ' .. vim.v.count1 .. 'gcc')
vim.cmd("normal! ']$p")
end, { desc = 'Duplicate and comment lines' })
---------------------------------------------------------------------------
-- ╓─────────────────────────────────────────────────────────╖
-- ║ Scroll half a screen with <C-d> and <C-u> ║
@@ -149,3 +156,27 @@ vim.keymap.set('n', '<C-u>', function()
scroll('up')
end, { silent = true })
---------------------------------------------------------------------------
-- Dump floating window info to file
vim.keymap.set(
'n',
'<leader>fd',
require('data.func').dump_floating_window_info,
{ desc = 'Dump floating window info to file' }
)
---------------------------------------------------------------------------
-- Obsidian Project Configuration:
local function run_obsidian_config()
-- Reduce conceallevel for Obsidian UI
vim.o.conceallevel = 2
vim.cmd('Neominimap off')
end
vim.api.nvim_create_augroup('obsidian_config', { clear = true })
vim.api.nvim_create_autocmd({ 'BufNewFile', 'BufRead', 'BufEnter' }, {
group = 'obsidian_config',
pattern = vim.fn.expand('~') .. '/vaults/Rootiest Notes/**',
callback = run_obsidian_config,
})
---------------------------------------------------------------------------