Compare commits

..
6 Commits
Author SHA1 Message Date
DarthMooMancer 1f58fc6411 Updated statusbar 2026-10-27 12:28:04 -04:00
DarthMooMancer d750bb2da1 NVIM: forked colorscheme and using it here as it fixed all highlighting
problems, statuline refactored, removed redundant configs
2026-10-27 11:34:57 -04:00
DarthMooMancer 50dbf88e19 Merge branch 'master' of moo:DarthMooMancer/dotfiles 2026-10-12 14:32:32 -04:00
DarthMooMancer 65be670447 CHORE: CLeaned up neovim config 2026-10-12 14:31:39 -04:00
DarthMooMancer 64f10cea52 REFAcTOR: kept only FocusGained 2026-10-10 04:50:09 -04:00
DarthMooMancer 16e44a8f42 REFACTOR: reducing more 2026-10-10 04:38:45 -04:00
26 changed files with 830 additions and 676 deletions
+1
View File
@@ -6,6 +6,7 @@ font-size = 14
scrollback-limit = 10000 scrollback-limit = 10000
macos-titlebar-style = transparent macos-titlebar-style = transparent
macos-titlebar-proxy-icon = hidden macos-titlebar-proxy-icon = hidden
macos-option-as-alt = true
title = " " title = " "
background-opacity = 0.90 background-opacity = 0.90
background-blur = 64 background-blur = 64
+342
View File
@@ -0,0 +1,342 @@
vim.cmd('highlight clear')
if vim.fn.exists('syntax_on') then
vim.cmd.syntax('reset')
end
vim.o.background = 'dark'
vim.g.colors_name = 'min-kanso'
---@class PaletteColors
local palette = {
zenBg0 = '#090E13',
zenBg1 = '#1C1E25',
zenBg2 = '#22262D',
inkBg2 = '#22262D',
inkBg3 = '#393B44',
altBlue1 = '#223249',
altBlue2 = '#2D4F67',
diffGreen = '#2B3328',
diffYellow = '#49443C',
diffRed = '#43242B',
diffBlue = '#252535',
gitGreen = '#76946A',
gitRed = '#C34043',
gitYellow = '#DCA561',
red = '#C34043',
red2 = '#E46876',
red3 = '#c4746e',
yellow = '#DCA561',
yellow2 = '#E6C384',
yellow3 = '#c4b28a',
green = '#98BB6C',
green2 = '#87a987',
green3 = '#8a9a7b',
green4 = '#6A9589',
green5 = '#7AA89F',
blue = '#7FB4CA',
blue2 = '#658594',
blue3 = '#8ba4b0',
violet = '#938AA9',
violet2 = '#8992a7',
pink = '#a292a3',
orange = '#b6927b',
orange2 = '#b98d7b',
aqua = '#8ea4a2',
fg = '#C5C9C7',
fg2 = '#f2f1ef',
gray = '#717C7C',
gray2 = '#A4A7A4',
gray3 = '#909398',
gray4 = '#75797f',
gray5 = '#5C6066',
}
local theme = {
ui = {
none = 'NONE',
fg = palette.fg,
fg_dim = palette.gray2,
fg_reverse = palette.altBlue1,
bg_dim = palette.zenBg1,
bg_m3 = palette.zenBg0,
bg_m2 = palette.zenBg0,
bg_m1 = palette.zenBg0,
bg = palette.zenBg0,
bg_p1 = palette.zenBg1,
bg_p2 = palette.zenBg2,
special = palette.gray5,
indent_line = palette.inkBg2,
active_indent_line = palette.inkBg3,
whitespace = palette.inkBg3,
nontext = palette.gray5,
bg_visual = palette.inkBg3,
bg_search = palette.altBlue2,
cursor_line_nr_foreground = palette.gray5,
cursor_line_nr_active_foreground = palette.fg2,
cursor_bg = palette.fg2,
cursor_fg = palette.zenBg0,
pmenu = {
fg = palette.fg2,
fg_sel = 'NONE',
bg = palette.zenBg0,
bg_sel = palette.inkBg3,
bg_thumb = palette.inkBg3,
bg_sbar = palette.zenBg0,
},
float = {
fg = palette.gray2,
bg = palette.zenBg0,
fg_border = palette.zenBg2,
bg_border = palette.zenBg0,
},
},
syn = {
string = palette.green3,
variable = 'NONE',
number = palette.pink,
constant = palette.orange,
identifier = palette.violet2,
parameter = palette.gray3,
fun = palette.blue3,
statement = palette.violet2,
keyword = palette.violet2,
operator = palette.gray3,
preproc = palette.gray3,
type = palette.aqua,
regex = palette.red3,
deprecated = palette.gray,
punct = palette.gray3,
comment = palette.gray4,
special1 = palette.yellow3,
special2 = palette.violet2,
special3 = palette.violet2,
},
diag = {
error = palette.red,
ok = palette.green,
warning = palette.yellow,
info = palette.blue2,
hint = palette.green4,
},
diff = {
add = palette.diffGreen,
delete = palette.diffRed,
change = palette.diffBlue,
text = palette.diffYellow,
},
vcs = {
added = palette.gitGreen,
removed = palette.gitRed,
changed = palette.gitYellow,
untracked = palette.gray4,
},
}
-- Helper function to batch-apply highlights
local function set_highlights(highlights)
for group, opts in pairs(highlights) do
vim.api.nvim_set_hl(0, group, opts)
end
end
-- =========================================================================
-- Highlights Map
-- =========================================================================
set_highlights({
-- Editor Highlights
ColorColumn = { bg = theme.ui.bg_p1 },
Conceal = { fg = theme.ui.special, bold = true },
CurSearch = { fg = theme.ui.fg, bg = theme.ui.bg_search, bold = true },
Cursor = { fg = theme.ui.cursor_fg, bg = theme.ui.cursor_bg },
lCursor = { link = 'Cursor' },
CursorIM = { link = 'Cursor' },
CursorColumn = { link = 'CursorLine' },
CursorLine = { bg = theme.ui.bg_p2 },
Directory = { fg = theme.syn.fun },
DiffAdd = { bg = theme.diff.add },
DiffChange = { bg = theme.diff.change },
DiffDelete = { fg = theme.vcs.removed, bg = theme.diff.delete },
DiffText = { bg = theme.diff.text },
EndOfBuffer = { fg = theme.ui.bg },
ErrorMsg = { fg = theme.diag.error },
WinSeparator = { fg = theme.ui.bg_m3, bg = theme.ui.none },
VertSplit = { link = 'WinSeparator' },
Folded = { fg = theme.ui.special, bg = theme.ui.bg_p1 },
FoldColumn = { fg = theme.ui.nontext, bg = theme.ui.none },
SignColumn = { fg = theme.ui.special, bg = theme.ui.none },
IncSearch = { fg = theme.ui.fg_reverse, bg = theme.diag.warning },
Substitute = { fg = theme.ui.fg, bg = theme.vcs.removed },
LineNr = { fg = theme.ui.cursor_line_nr_foreground, bg = theme.ui.none },
CursorLineNr = { fg = theme.ui.cursor_line_nr_active_foreground, bg = theme.ui.none },
MatchParen = { fg = theme.diag.warning, bold = true },
ModeMsg = { fg = theme.diag.warning, bold = true },
MsgArea = vim.o.cmdheight == 0 and { link = 'StatusLine' } or { fg = theme.ui.fg_dim },
MsgSeparator = { bg = vim.o.cmdheight == 0 and theme.ui.bg or theme.ui.bg_m3 },
MoreMsg = { fg = theme.diag.info },
NonText = { fg = theme.ui.nontext },
Normal = { fg = theme.ui.fg, bg = theme.ui.bg },
NormalFloat = { fg = theme.ui.float.fg, bg = theme.ui.float.bg },
FloatBorder = { fg = theme.ui.float.fg_border, bg = theme.ui.float.bg_border },
FloatTitle = { fg = theme.ui.special, bg = theme.ui.float.bg_border, bold = true },
FloatFooter = { fg = theme.ui.nontext, bg = theme.ui.float.bg_border },
NormalNC = { link = 'Normal' },
Pmenu = { fg = theme.ui.pmenu.fg, bg = theme.ui.pmenu.bg },
PmenuSel = { fg = theme.ui.pmenu.fg_sel, bg = theme.ui.pmenu.bg_sel },
PmenuKind = { fg = theme.ui.fg_dim, bg = theme.ui.pmenu.bg },
PmenuKindSel = { fg = theme.ui.fg_dim, bg = theme.ui.pmenu.bg_sel },
PmenuExtra = { fg = theme.ui.special, bg = theme.ui.pmenu.bg },
PmenuExtraSel = { fg = theme.ui.special, bg = theme.ui.pmenu.bg_sel },
PmenuSbar = { bg = theme.ui.pmenu.bg_sbar },
PmenuThumb = { bg = theme.ui.pmenu.bg_thumb },
Question = { link = 'MoreMsg' },
QuickFixLine = { bg = theme.ui.bg_p1 },
Search = { fg = theme.ui.fg, bg = theme.ui.bg_search },
SpecialKey = { fg = theme.ui.special },
SpellBad = { undercurl = true, sp = theme.diag.error },
SpellCap = { undercurl = true, sp = theme.diag.warning },
SpellLocal = { undercurl = true, sp = theme.diag.warning },
SpellRare = { undercurl = true, sp = theme.diag.warning },
StatusLine = { fg = theme.ui.fg_dim, bg = theme.ui.none },
StatusLineNC = { fg = theme.ui.nontext, bg = theme.ui.none },
TabLine = { bg = theme.ui.none, fg = theme.ui.special },
TabLineFill = { bg = theme.ui.none },
TabLineSel = { fg = theme.ui.fg_dim, bg = theme.ui.bg_p1, bold = true },
Title = { fg = theme.syn.fun, bold = true },
Visual = { bg = theme.ui.bg_visual },
VisualNOS = { link = 'Visual' },
WarningMsg = { fg = theme.diag.warning },
Whitespace = { fg = theme.ui.whitespace },
WildMenu = { link = 'Pmenu' },
WinBar = { fg = theme.ui.fg_dim, bg = theme.ui.none },
WinBarNC = { fg = theme.ui.fg_dim, bg = theme.ui.none },
debugPC = { bg = theme.diff.delete },
debugBreakpoint = { fg = theme.syn.special1, bg = theme.ui.none },
LspReferenceText = { bg = theme.ui.bg_p2 },
LspReferenceRead = { link = 'LspReferenceText' },
LspReferenceWrite = { bg = theme.ui.bg_p2, underline = true },
-- Diagnostics
DiagnosticError = { fg = theme.diag.error },
DiagnosticWarn = { fg = theme.diag.warning },
DiagnosticInfo = { fg = theme.diag.info },
DiagnosticHint = { fg = theme.diag.hint },
DiagnosticOk = { fg = theme.diag.ok },
DiagnosticFloatingError = { fg = theme.diag.error },
DiagnosticFloatingWarn = { fg = theme.diag.warning },
DiagnosticFloatingInfo = { fg = theme.diag.info },
DiagnosticFloatingHint = { fg = theme.diag.hint },
DiagnosticFloatingOk = { fg = theme.diag.ok },
DiagnosticSignError = { fg = theme.diag.error, bg = theme.ui.none },
DiagnosticSignWarn = { fg = theme.diag.warning, bg = theme.ui.none },
DiagnosticSignInfo = { fg = theme.diag.info, bg = theme.ui.none },
DiagnosticSignHint = { fg = theme.diag.hint, bg = theme.ui.none },
DiagnosticVirtualTextError = { link = 'DiagnosticError' },
DiagnosticVirtualTextWarn = { link = 'DiagnosticWarn' },
DiagnosticVirtualTextInfo = { link = 'DiagnosticInfo' },
DiagnosticVirtualTextHint = { link = 'DiagnosticHint' },
DiagnosticUnderlineError = { undercurl = true, sp = theme.diag.error },
DiagnosticUnderlineWarn = { undercurl = true, sp = theme.diag.warning },
DiagnosticUnderlineInfo = { undercurl = true, sp = theme.diag.info },
DiagnosticUnderlineHint = { undercurl = true, sp = theme.diag.hint },
LspSignatureActiveParameter = { fg = theme.diag.warning },
LspCodeLens = { fg = theme.syn.comment },
-- Diff / VCS
diffAdded = { fg = theme.vcs.added },
diffRemoved = { fg = theme.vcs.removed },
diffDeleted = { fg = theme.vcs.removed },
diffChanged = { fg = theme.vcs.changed },
diffOldFile = { fg = theme.vcs.removed },
diffNewFile = { fg = theme.vcs.added },
-- Syntax Highlights
Comment = { fg = theme.syn.comment, italic = true },
Constant = { fg = theme.syn.constant },
String = { fg = theme.syn.string },
Character = { link = 'String' },
Number = { fg = theme.syn.number },
Boolean = { fg = theme.syn.constant },
Float = { link = 'Number' },
Identifier = { fg = theme.syn.identifier },
Function = { fg = theme.syn.fun },
Statement = { fg = theme.syn.statement },
Operator = { fg = theme.syn.operator },
Keyword = { fg = theme.syn.keyword, italic = true },
Exception = { fg = theme.syn.special2 },
PreProc = { fg = theme.syn.preproc },
Type = { fg = theme.syn.type },
Special = { fg = theme.syn.special1 },
Delimiter = { fg = theme.syn.punct },
Underlined = { fg = theme.syn.special1, underline = true },
Bold = { bold = true },
Italic = { italic = true },
Ignore = { link = 'NonText' },
Error = { fg = theme.diag.error },
Todo = { fg = theme.ui.fg_reverse, bg = theme.diag.info, bold = true },
qfLineNr = { link = 'LineNr' },
qfFileName = { link = 'Directory' },
markdownCode = { fg = theme.syn.string },
markdownCodeBlock = { fg = theme.syn.string },
markdownEscape = { fg = theme.ui.none },
-- Treesitter Highlights
['@variable'] = { fg = theme.ui.fg },
['@variable.builtin'] = { fg = theme.syn.special2, italic = true },
['@variable.parameter'] = { fg = theme.syn.parameter },
['@variable.member'] = { fg = theme.syn.identifier },
['@string.regexp'] = { fg = theme.syn.regex },
['@string.escape'] = { fg = theme.syn.regex },
['@string.special.symbol'] = { fg = theme.syn.identifier },
['@type'] = { link = 'Type' },
['@type.builtin'] = { fg = theme.syn.type },
['@attribute'] = { link = 'Constant' },
['@property'] = { fg = theme.syn.identifier },
['@function'] = { link = 'Function' },
['@function.builtin'] = { link = 'Function' },
['@function.call'] = { link = 'Function' },
['@function.method'] = { link = 'Function' },
['@function.method.call'] = { link = 'Function' },
['@constructor'] = { fg = theme.syn.special1 },
['@constructor.lua'] = { fg = theme.syn.keyword },
['@operator'] = { link = 'Operator' },
['@keyword.coroutine'] = { fg = theme.syn.keyword },
['@keyword.function'] = { fg = theme.syn.keyword },
['@keyword.operator'] = { fg = theme.syn.operator },
['@keyword.import'] = { link = 'PreProc' },
['@keyword.modifier'] = { fg = theme.syn.keyword },
['@keyword.storage'] = { fg = theme.syn.keyword },
['@keyword.return'] = { fg = theme.syn.special3, italic = true },
['@keyword.exception'] = { fg = theme.syn.special3 },
['@keyword.conditional'] = { fg = theme.syn.keyword },
['@punctuation.delimiter'] = { fg = theme.syn.punct },
['@punctuation.bracket'] = { fg = theme.syn.punct },
['@punctuation.special'] = { fg = theme.syn.special1 },
['@comment.error'] = { fg = theme.ui.fg, bg = theme.diag.error, bold = true },
['@comment.warning'] = { fg = theme.ui.fg_reverse, bg = theme.diag.warning, bold = true },
['@comment.note'] = { fg = theme.ui.fg_reverse, bg = theme.diag.hint, bold = true },
-- ['@comment.documentation'] = { link = '@tag' },
['@markup.strong'] = { bold = true },
['@markup.italic'] = { italic = true },
['@markup.strikethrough'] = { strikethrough = true },
['@markup.underline'] = { underline = true },
['@markup.heading'] = { link = 'Function' },
['@markup.quote'] = { link = '@variable.parameter' },
['@markup.math'] = { link = 'Constant' },
['@markup.environment'] = { link = 'Keyword' },
['@markup.raw'] = { link = 'String' },
['@diff.plus'] = { fg = theme.vcs.added },
['@diff.minus'] = { fg = theme.vcs.removed },
['@diff.delta'] = { fg = theme.vcs.changed },
['@tag.attribute'] = { fg = theme.syn.identifier },
['@tag.delimiter'] = { fg = theme.syn.punct },
['@lsp.type.keyword.lua'] = { fg = theme.syn.regex },
-- Plugins (Blink/Cmp, etc.)
BlinkCmpMenu = { link = 'Pmenu' },
BlinkCmpMenuSelection = { link = 'PmenuSel' },
BlinkCmpMenuBorder = { fg = theme.ui.bg_search, bg = theme.ui.pmenu.bg },
BlinkCmpLabel = { fg = theme.ui.pmenu.fg },
BlinkCmpLabelMatch = { fg = theme.syn.fun },
})
+3
View File
@@ -1,4 +1,7 @@
vim.loader.enable()
require('DarthMooMancer.opts') require('DarthMooMancer.opts')
vim.cmd.colorscheme('min-kanso')
require('DarthMooMancer.plugins') require('DarthMooMancer.plugins')
require('DarthMooMancer.keymaps') require('DarthMooMancer.keymaps')
require('DarthMooMancer.statusline') require('DarthMooMancer.statusline')
@@ -1,54 +1,46 @@
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv") local map = vim.keymap.set
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
vim.keymap.set('n', '<leader>ff', function() map('v', 'J', ":m '>+1<CR>gv=gv")
map('v', 'K', ":m '<-2<CR>gv=gv")
map('n', '<leader>ff', function()
require('conform').format({ async = true, lsp_format = 'never' }) require('conform').format({ async = true, lsp_format = 'never' })
end) end)
vim.keymap.set('n', '<leader>vs', ':vsplit<CR>') map('n', '<leader>vs', ':vsplit<CR>')
vim.keymap.set('n', '<leader>ss', ':split<CR>') map('n', '<leader>ss', ':split<CR>')
vim.keymap.set('n', '<leader>E', ':Ex<CR>') map('n', '<C-u>', '<C-u>zz')
vim.keymap.set('n', '<C-u>', '<C-u>zz') map('n', '<C-d>', '<C-d>zz')
vim.keymap.set('n', '<C-d>', '<C-d>zz') map('n', 'n', 'nzzzv')
vim.keymap.set('n', 'n', 'nzzzv') map('n', 'N', 'Nzzzv')
vim.keymap.set('n', 'N', 'Nzzzv') map('x', '<leader>p', [["_dP]])
vim.keymap.set('x', '<leader>p', [["_dP]]) map('n', '<leader><leader>', function()
vim.keymap.set('n', '<leader><leader>', function()
Snacks.picker.files() Snacks.picker.files()
end) end)
vim.keymap.set('n', '<leader>fh', function() map('n', '<leader>fh', function()
Snacks.picker.help() Snacks.picker.help()
end) end)
vim.keymap.set('n', '<leader>fg', function() map('n', '<leader>fg', function()
Snacks.picker.grep() Snacks.picker.grep()
end) end)
vim.keymap.set('n', '<leader>fm', function() map('n', '<leader>uu', function()
Snacks.picker.man()
end)
vim.keymap.set('n', '<leader>xn', function()
Snacks.picker.notifications()
end)
vim.keymap.set('n', '<leader>uu', function()
Snacks.picker.undo() Snacks.picker.undo()
end) end)
vim.keymap.set('n', '<leader>fs', vim.lsp.buf.document_symbol) map('n', '<leader>E', ':Ex<CR>')
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition) map('n', '<leader>fs', vim.lsp.buf.document_symbol)
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references) map('n', '<leader>gd', vim.lsp.buf.definition)
vim.keymap.set('n', '<leader>gR', vim.lsp.buf.rename) map('n', '<leader>gr', vim.lsp.buf.references)
vim.keymap.set('n', '<leader>gc', vim.lsp.buf.code_action) map('n', '<leader>gR', vim.lsp.buf.rename)
vim.keymap.set('n', '<leader>[', '<c-w>H', { silent = true, noremap = true }) map('n', '<leader>gc', vim.lsp.buf.code_action)
vim.keymap.set('n', '<leader>]', '<c-w>K', { silent = true, noremap = true }) map('n', '<leader>[', '<c-w>H', { silent = true, noremap = true })
vim.keymap.set('n', '[q', ':cprev<CR>zz', { desc = 'Previous Quickfix Item' }) map('n', '<leader>]', '<c-w>K', { silent = true, noremap = true })
vim.keymap.set('n', ']q', ':cnext<CR>zz', { desc = 'Next Quickfix Item' }) map('n', '<leader>lp', '<cmd>LivePreview pick<cr>')
vim.keymap.set('n', '<leader>qo', ':copen<CR>', { desc = 'Open Quickfix' }) map('n', '<C-h>', '<cmd>NvimTmuxNavigateLeft<CR>', { silent = true })
vim.keymap.set('n', '<leader>qc', ':cclose<CR>', { desc = 'Close Quickfix' }) map('n', '<C-j>', '<cmd>NvimTmuxNavigateDown<CR>', { silent = true })
vim.keymap.set('n', '<leader>lp', ':LivePreview pick<cr>') map('n', '<C-k>', '<cmd>NvimTmuxNavigateUp<CR>', { silent = true })
vim.keymap.set('n', '<C-h>', ':NvimTmuxNavigateLeft<CR>', { silent = true }) map('n', '<C-l>', '<cmd>NvimTmuxNavigateRight<CR>', { silent = true })
vim.keymap.set('n', '<C-j>', ':NvimTmuxNavigateDown<CR>', { silent = true }) map('n', '<leader>xx', function()
vim.keymap.set('n', '<C-k>', ':NvimTmuxNavigateUp<CR>', { silent = true }) vim.diagnostic.jump({ count = 1, float = false })
vim.keymap.set('n', '<C-l>', ':NvimTmuxNavigateRight<CR>', { silent = true }) end)
vim.keymap.set('n', '<leader>xx', ':Trouble diagnostics toggle<cr>') map('n', '<leader>zz', function()
vim.keymap.set('n', '<leader>zz', function()
Snacks.zen() Snacks.zen()
end) end)
-- vim.keymap.set('n', '<leader>mp', ':Vellum<cr>', { desc = 'Markdown preview' })
+26 -14
View File
@@ -1,16 +1,33 @@
local capabilities = require('blink.cmp').get_lsp_capabilities() require('lazydev').setup({
library = {
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
},
})
vim.lsp.config('*', { capabilities = require('blink.cmp').get_lsp_capabilities() })
vim.lsp.config('lua_ls', { vim.lsp.config('lua_ls', {
capabilities = capabilities,
settings = { settings = {
Lua = { Lua = {
diagnostics = { globals = { 'vim' } }, diagnostics = { globals = { 'vim' } },
completion = { callSnippet = 'Replace' },
hint = { enable = true },
codeLens = {
enable = true,
},
type = {
checkTableShape = true, -- Warns if you pass a table missing required fields
inferParamType = true, -- Tries to figure out argument types from usage
},
workspace = { workspace = {
library = vim.api.nvim_get_runtime_file('', true),
checkThirdParty = false, checkThirdParty = false,
}, },
didChangeWatchedFiles = {
dynamicRegistration = false,
},
}, },
}, },
}) })
vim.lsp.config('vtsls', { vim.lsp.config('vtsls', {
settings = { settings = {
typescript = { typescript = {
@@ -23,18 +40,13 @@ vim.lsp.config('vtsls', {
}, },
}) })
vim.lsp.config('html', {
capabilities = capabilities,
})
vim.lsp.enable({ vim.lsp.enable({
'lua_ls', 'lua_ls',
'clangd', 'clangd',
'rust-analyzer', 'pylsp',
'vtsls', -- 'rust-analyzer',
'tailwindcss-language-server', -- 'vtsls',
'cssls', -- 'tailwindcss-language-server',
'html', -- 'cssls',
'gopls', -- 'html',
'pylsp'
}) })
+26 -60
View File
@@ -2,76 +2,42 @@ vim.opt.termguicolors = true
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.opt.number = true vim.opt.number = true
vim.opt.relativenumber = true vim.opt.relativenumber = true
vim.opt.tabstop = 8 -- Number of spaces a <Tab> counts for vim.opt.colorcolumn = '100'
vim.opt.shiftwidth = 8 -- Number of spaces for autoindent (>>, <<, etc.) local shifts = {
vim.opt.softtabstop = 8 -- Number of spaces for <Tab> in insert mode (backspace deletes 4 spaces) lua = 4,
vim.opt.expandtab = true -- Use spaces instead of tabs python = 4,
rust = 4,
dart = 2,
html = 2,
javascript = 2,
typescript = 2,
}
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = vim.tbl_keys(shifts),
callback = function(ev) callback = function(ev)
local map = { local size = shifts[ev.match]
rust = { ts = 4, sw = 4, sts = 4 }, vim.bo[ev.buf].tabstop = size
lua = { ts = 4, sw = 4, sts = 4 }, vim.bo[ev.buf].shiftwidth = size
python = { ts = 4, sw = 4, sts = 4 }, vim.bo[ev.buf].softtabstop = size
dart = { ts = 2, sw = 2, sts = 2 }, vim.bo[ev.buf].expandtab = true
html = { ts = 2, sw = 2, sts = 2 },
javascript = { ts = 2, sw = 2, sts = 2 },
typescript = { ts = 2, sw = 2, sts = 2 },
}
local ft = map[ev.match]
if ft then
vim.bo[ev.buf].tabstop = ft.ts
vim.bo[ev.buf].shiftwidth = ft.sw
vim.bo[ev.buf].softtabstop = ft.sts
vim.bo[ev.buf].expandtab = ft.et ~= nil and ft.et or true
end
end, end,
}) })
vim.opt.autoindent = true -- Copy indent from current line when starting a new line
vim.opt.wrap = false vim.opt.wrap = false
vim.opt.swapfile = false vim.opt.swapfile = false
vim.opt.signcolumn = 'yes' vim.opt.signcolumn = 'number'
vim.opt.undofile = true -- Keeps undo history even after we close a file vim.opt.undofile = true -- Keeps undo history even after we close a file
vim.opt.scrolloff = 4 vim.opt.scrolloff = 15
vim.opt.sidescrolloff = 8 vim.opt.sidescrolloff = 15
vim.opt.hlsearch = false vim.opt.hlsearch = false
vim.opt.completeopt = { 'menuone', 'noselect', 'popup' }
vim.opt.wrapscan = true -- begin search from top of the file when nothng is found
vim.opt.cursorline = true -- enable cursorline vim.opt.cursorline = true -- enable cursorline
vim.opt.cursorlineopt = { 'screenline', 'number' } -- cursorline look vim.opt.cursorlineopt = { 'screenline', 'number' } -- cursorline look
vim.opt.foldmethod = 'indent' vim.g.netrw_browse_split = 0
vim.opt.foldcolumn = '0' vim.g.netrw_banner = 0
vim.opt.foldenable = false vim.g.netrw_liststyle = 3
vim.opt.shortmess = 'aFI' -- abbreviates messages and prevents file name being echoed when opened vim.g.netrw_winsize = 25
vim.opt.ignorecase = false -- ignore cases when searching
vim.opt.smartcase = true -- However if we use a capital in search string we then consider case-sensitivity, ignorecase is disabled
vim.opt.smartindent = false -- smarter indentation
vim.opt.smarttab = true -- make tab behaviour smarter
vim.opt.laststatus = 3
vim.opt.showmode = false vim.opt.showmode = false
-- vim.opt.cmdheight = 0
vim.opt.smoothscroll = true vim.opt.smoothscroll = true
vim.opt.spell = true vim.diagnostic.config({ severity_sort = true })
vim.diagnostic.config({
virtual_text = true, -- This is the magic line
signs = true, -- Shows icons in the gutter
underline = true,
update_in_insert = false, -- Don't clutter the screen while typing
severity_sort = true,
})
vim.o.winborder = 'rounded' vim.o.winborder = 'rounded'
vim.api.nvim_create_autocmd('FileType', { vim.opt.updatetime = 250
pattern = { 'text', 'plaintex' },
callback = function()
-- Enable visual soft-wrapping
vim.opt_local.wrap = true
vim.opt_local.linebreak = true
vim.opt_local.breakindent = true
-- Remap j/k to visual lines only inside this buffer
vim.keymap.set('n', 'j', 'gj', { buffer = true })
vim.keymap.set('n', 'k', 'gk', { buffer = true })
end,
})
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
@@ -1,10 +1,38 @@
require('DarthMooMancer.plugins.utils') vim.pack.add({
{ src = 'https://github.com/folke/snacks.nvim' },
{ src = 'https://github.com/nvim-mini/mini.nvim.git', version = vim.version.range('*') },
{ src = 'https://github.com/nvim-treesitter/nvim-treesitter' },
{ src = 'https://github.com/windwp/nvim-ts-autotag' },
{ src = 'https://github.com/saghen/blink.cmp', version = vim.version.range('*') },
{ src = 'https://github.com/folke/lazydev.nvim' },
{ src = 'https://github.com/mason-org/mason.nvim' },
{ src = 'https://github.com/mason-org/mason-lspconfig.nvim' },
{ src = 'https://github.com/neovim/nvim-lspconfig' },
{ src = 'https://github.com/stevearc/conform.nvim' },
{ src = 'https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git' },
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
{ src = 'https://github.com/brianhuster/live-preview.nvim' },
{ src = 'https://github.com/rachartier/tiny-inline-diagnostic.nvim' },
})
vim.opt.rtp:append('/Users/andrew/personal/Projects/Lua/vern-nvim')
require('nvim-tmux-navigation').setup({
disable_when_zoomed = true, -- defaults to false
})
require('tiny-inline-diagnostic').setup({
preset = 'minimal',
options = {
multilines = {
enabled = true,
always_show = true,
},
},
})
require('DarthMooMancer.plugins.blink-cmp') require('DarthMooMancer.plugins.blink-cmp')
require('DarthMooMancer.plugins.kanso')
require('DarthMooMancer.plugins.mini-nvim') require('DarthMooMancer.plugins.mini-nvim')
require('DarthMooMancer.plugins.polydev') require('DarthMooMancer.plugins.vern')
require('DarthMooMancer.plugins.treesitter') require('DarthMooMancer.plugins.treesitter')
require('DarthMooMancer.plugins.mason') require('DarthMooMancer.plugins.mason')
require('DarthMooMancer.plugins.snacks') require('DarthMooMancer.plugins.snacks')
require('DarthMooMancer.plugins.trouble')
require('DarthMooMancer.plugins.conform') require('DarthMooMancer.plugins.conform')
@@ -1,29 +1,21 @@
vim.pack.add({
{
src = 'https://github.com/saghen/blink.cmp',
version = vim.version.range('*'),
},
})
require('blink.cmp').setup({ require('blink.cmp').setup({
completion = { completion = {
documentation = { documentation = {
auto_show = true, auto_show = true,
auto_show_delay_ms = 100, auto_show_delay_ms = 150,
window = {
winhighlight = 'Normal:NormalFloat,FloatBorder:SnacksPickerBorder,CursorLine:Visual,Search:None',
},
}, },
menu = { menu = {
draw = {
columns = {
{ 'label', 'label_description', gap = 1 },
{ 'kind_icon', 'kind', gap = 1 },
{ 'source_name', gap = 1 },
},
},
scrollbar = false, scrollbar = false,
winhighlight = 'Pmenu:NormalFloat,FloatBorder:SnacksPickerBorder,PmenuSel:Visual,CursorLine:Visual,Search:None', },
},
sources = {
default = { 'lazydev', 'lsp', 'buffer', 'snippets', 'path' },
providers = {
lazydev = {
name = 'LazyDev',
module = 'lazydev.integrations.blink',
score_offset = 100,
},
}, },
}, },
}) })
@@ -1,19 +1,13 @@
vim.pack.add({ 'https://github.com/stevearc/conform.nvim' })
require('conform').setup({ require('conform').setup({
formatters_by_ft = { formatters_by_ft = {
rust = { 'rustfmt', lsp_format = 'fallback' },
lua = { 'stylua', lsp_format = 'fallback' }, lua = { 'stylua', lsp_format = 'fallback' },
javascript = { 'prettier', stop_after_first = true }, javascript = { 'prettier', stop_after_first = true },
typescript = { 'prettier', stop_after_first = true }, typescript = { 'prettier', stop_after_first = true },
json = { 'prettier' }, json = { 'prettier' },
html = { 'prettier' }, html = { 'prettier' },
go = { 'goimports' },
c = { 'clang-format' }, c = { 'clang-format' },
cpp = { 'clang-format' }, cpp = { 'clang-format' },
css = { 'csskit' }, python = { 'ruff_fix', 'ruff_format' },
dart = { 'dart_format', lsp_format = 'fallback' },
python = { 'autopep8' },
['_'] = { 'trim_whitespace' }, ['_'] = { 'trim_whitespace' },
}, },
format_on_save = { format_on_save = {
@@ -1,97 +0,0 @@
vim.pack.add({
{ src = 'https://github.com/b0o/incline.nvim' },
{ src = 'https://github.com/SmiteshP/nvim-navic' },
})
local helpers = require('incline.helpers')
local navic = require('nvim-navic')
local devicons = require('nvim-web-devicons')
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserNavicAttach', { clear = true }),
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.server_capabilities.documentSymbolProvider then
navic.attach(client, args.buf)
end
end,
})
require('incline').setup({
window = {
padding = 0,
margin = { horizontal = 0, vertical = 0 },
},
ignore = {
floating_wins = false,
wintypes = function(winid, wintype)
-- Check if snacks.zen is active anywhere in this tabpage
for _, w in ipairs(vim.api.nvim_tabpage_list_wins(0)) do
if vim.w[w].snacks_main then
return true -- Hide from ALL windows during Zen mode
end
end
-- Default incline behavior (ignore non-normal windows)
return wintype ~= ''
end,
},
render = function(props)
-- 1. Count normal splits in the current tabpage
local wins = vim.api.nvim_tabpage_list_wins(0)
local normal_splits = 0
for _, win in ipairs(wins) do
-- Also check for snacks.zen here as an immediate guard
if vim.w[win].snacks_main then
return ''
end
local config = vim.api.nvim_win_get_config(win)
if config.relative == '' then
normal_splits = normal_splits + 1
end
end
-- Hide if 2 or fewer normal splits are open (requires 3+)
if normal_splits <= 2 then
return ''
end
-- 2. Build the visual statusline
local filename =
vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ':t')
if filename == '' then
filename = '[No Name]'
end
local ft_icon, ft_color = devicons.get_icon_color(filename)
local modified = vim.bo[props.buf].modified
local res = {
ft_icon and {
' ',
ft_icon,
' ',
guibg = ft_color,
guifg = helpers.contrast_color(ft_color),
} or '',
' ',
{ filename, gui = modified and 'bold,italic' or 'bold' },
guibg = 'none',
}
if props.focused then
for _, item in ipairs(navic.get_data(props.buf) or {}) do
table.insert(res, {
{ ' > ', group = 'NavicSeparator' },
{ item.icon, group = 'NavicIcons' .. item.type },
{ item.name, group = 'NavicText' },
})
end
end
table.insert(res, ' ')
return res
end,
})
@@ -1,19 +0,0 @@
vim.pack.add({'https://github.com/webhooked/kanso.nvim' })
require('kanso').setup({
transparent = true,
overrides = function(colors)
local theme = colors.theme
return {
Normal = { bg = "none" },
NormalFloat = { bg = "none" },
FloatBorder = { bg = "none" },
FloatTitle = { bg = "none" },
SnacksPickerBorder = { fg = theme.ui.special, bg = "none" },
SnacksPickerTitle = { fg = theme.ui.special, bg = "none" },
SnacksInputBorder = { fg = theme.ui.special, bg = "none" },
}
end,
})
vim.cmd.colorscheme('kanso-zen')
@@ -1,19 +1,12 @@
vim.pack.add({
{ src = 'https://github.com/mason-org/mason.nvim' },
{ src = 'https://github.com/mason-org/mason-lspconfig.nvim' },
{ src = 'https://github.com/neovim/nvim-lspconfig' },
})
require('mason').setup() require('mason').setup()
require('mason-lspconfig').setup({ require('mason-lspconfig').setup({
ensure_installed = { ensure_installed = {
'vtsls', 'vtsls',
'lua_ls', 'lua_ls',
'pylsp', 'pylsp',
'gopls',
'html', 'html',
'cssls', 'cssls',
'bashls',
}, },
automatic_enable = false, automatic_enable = false,
}) })
require('mason-conform').setup()
@@ -1,14 +1,6 @@
vim.pack.add({
{
src = 'https://github.com/nvim-mini/mini.nvim.git',
version = vim.version.range('*')
}
})
local hipatterns = require('mini.hipatterns') local hipatterns = require('mini.hipatterns')
hipatterns.setup({ hipatterns.setup({
highlighters = { highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
fixme = { fixme = {
pattern = '%f[%w]()FIXME()%f[%W]', pattern = '%f[%w]()FIXME()%f[%W]',
group = 'MiniHipatternsFixme', group = 'MiniHipatternsFixme',
@@ -31,4 +23,5 @@ hipatterns.setup({
}) })
require('mini.pairs').setup() require('mini.pairs').setup()
-- require('mini.icons').setup() require('mini.surround').setup()
require('mini.icons').setup()
@@ -1,20 +0,0 @@
vim.pack.add({
{ src = 'https://github.com/folke/noice.nvim' },
{ src = 'https://github.com/MunifTanjim/nui.nvim' },
})
require('noice').setup({
lsp = {
override = {
['vim.lsp.util.convert_input_to_markdown_lines'] = true,
['vim.lsp.util.stylize_markdown'] = true,
},
},
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
})
@@ -1,3 +0,0 @@
vim.pack.add({'https://git.moomancer.xyz/DarthMooMancer/polydev.git' })
require('Polydev').setup()
@@ -1,25 +0,0 @@
vim.pack.add({
'https://github.com/sphamba/smear-cursor.nvim',
})
-- require('smear_cursor').setup({
-- matrix_pixel_threshold = 0.5,
-- stiffness = 0.8, -- 0.6 [0, 1]
-- trailing_stiffness = 0.6, -- 0.45 [0, 1]
-- stiffness_insert_mode = 0.7, -- 0.5 [0, 1]
-- trailing_stiffness_insert_mode = 0.7, -- 0.5 [0, 1]
-- damping = 0.95, -- 0.85 [0, 1]
-- damping_insert_mode = 0.95, -- 0.9 [0, 1]
-- distance_stop_animating = 0.5, -- 0.1 > 0
-- time_interval = 7,
-- })
--
require('smear_cursor').setup({
stiffness = 0.8, -- 0.6 [0, 1]
trailing_stiffness = 0.6, -- 0.45 [0, 1]
stiffness_insert_mode = 0.7, -- 0.5 [0, 1]
trailing_stiffness_insert_mode = 0.7, -- 0.5 [0, 1]
damping = 0.95, -- 0.85 [0, 1]
damping_insert_mode = 0.95, -- 0.9 [0, 1]
distance_stop_animating = 0.5, -- 0.1 > 0
})
@@ -1,33 +1,9 @@
vim.pack.add({ 'https://github.com/folke/snacks.nvim' })
require('snacks').setup({ require('snacks').setup({
notifier = { notifier = {
enabled = true, enabled = true,
}, },
animate = { enabled = true }, animate = { enabled = true },
input = { enabled = true }, input = { enabled = true },
-- scroll = {
-- enabled = true,
-- animate = {
-- -- duration = { step = 5, total = 120 },
-- duration = { step = 2, total = 60 },
-- easing = 'linear',
-- },
-- -- faster animation when repeating scroll after delay
-- animate_repeat = {
-- -- delay = 100, -- delay in ms before using the repeat animation
-- delay = 40, -- delay in ms before using the repeat animation
-- -- duration = { step = 2, total = 40 },
-- duration = { step = 1, total = 20 },
-- easing = 'linear',
-- },
-- -- what buffers to animate
-- filter = function(buf)
-- return vim.g.snacks_scroll ~= false
-- and vim.b[buf].snacks_scroll ~= false
-- and vim.bo[buf].buftype ~= 'terminal'
-- end,
-- },
picker = { picker = {
enabled = true, enabled = true,
prompt = '', prompt = '',
@@ -37,19 +13,26 @@ require('snacks').setup({
selected = '', selected = '',
}, },
}, },
sources = {
files = {
layout = {
preview = false, -- This now ONLY applies to Snacks.picker.files()
}, },
dim = {
scope = {
min_size = 3, -- Lower minimum so short loops/branches don't get ignored
max_size = 40, -- Allow slightly larger blocks (functions/structs) to stay lit
siblings = false, -- Set to false so only the exact active scope is highlighted
},
animate = {
enabled = vim.fn.has('nvim-0.10') == 1,
easing = 'outCubic',
duration = {
step = 15, -- ms per step
total = 180, -- maximum duration
}, },
}, },
}, },
zen = { zen = {
enabled = true, enabled = true,
toggles = { toggles = {
dim = false, dim = true,
diagnostics = true, diagnostics = true,
inlay_hints = false, inlay_hints = false,
}, },
@@ -1,24 +1,18 @@
vim.pack.add({ local parsers = {
{ 'json',
src = 'https://github.com/nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
},
{ src = 'https://github.com/windwp/nvim-ts-autotag' },
})
require('nvim-treesitter').install({
'rust', 'rust',
'c', 'c',
'cpp', 'cpp',
'lua', 'lua',
'javascript', 'javascript',
'go',
'typescript', 'typescript',
'tsx',
'css', 'css',
'html', 'html',
'python', 'python',
'yaml', 'yaml',
}) }
require('nvim-treesitter').install(parsers)
require('nvim-ts-autotag').setup({ require('nvim-ts-autotag').setup({
opts = { opts = {
@@ -28,22 +22,16 @@ require('nvim-ts-autotag').setup({
}, },
}) })
local group = vim.api.nvim_create_augroup('UserTreesitter', { clear = true })
vim.api.nvim_create_autocmd('FileType', { vim.api.nvim_create_autocmd('FileType', {
pattern = { group = group,
'c', desc = 'Start treesitter highlighting when a parser is installed',
'cpp', callback = function(ev)
'rust', local lang = vim.treesitter.language.get_lang(ev.match) or ev.match
'lua', if not vim.treesitter.language.add(lang) then
'typescript', return
'javascript', end
'css', vim.treesitter.start(ev.buf, lang)
'html',
'python',
'go',
'yaml',
},
callback = function()
vim.treesitter.start()
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end, end,
}) })
@@ -1,2 +0,0 @@
vim.pack.add({ 'https://github.com/folke/trouble.nvim' })
require('trouble').setup({})
@@ -1,13 +0,0 @@
vim.pack.add({
{ src = 'https://github.com/nvim-tree/nvim-web-devicons' },
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
{ src = 'https://github.com/brianhuster/live-preview.nvim' },
{ src = 'https://github.com/m4xshen/hardtime.nvim' },
})
require('nvim-tmux-navigation').setup({
disable_when_zoomed = true, -- defaults to false
})
require("hardtime").setup()
@@ -1,16 +0,0 @@
vim.pack.add({
{
src = 'https://github.com/blackhat-7/vellum.nvim',
},
})
vim.api.nvim_create_autocmd('FileType', {
pattern = 'markdown',
once = true,
callback = function()
local ok, vellum = pcall(require, 'vellum')
if ok then
vellum.setup({})
end
end,
})
@@ -0,0 +1,12 @@
require('vern-nvim').setup({
workspace_root = '~/personal/Projects_Testing',
c = {
templates = {
extras = {
linter = {
enabled = true,
},
},
},
},
})
@@ -1,113 +1,71 @@
local ok, D = pcall(require, 'nvim-web-devicons') local icon_cache = {}
local a, S = vim.api, vim.diagnostic.severity
local now = (vim.uv or vim.loop).now local diagnostic_configs = {
local C = a.nvim_get_current_buf { sev = vim.diagnostic.severity.ERROR, label = 'E', hl = 'DiagnosticError' },
local R = function() { sev = vim.diagnostic.severity.WARN, label = 'W', hl = 'DiagnosticWarn' },
vim.cmd.redrawstatus() { sev = vim.diagnostic.severity.HINT, label = 'H', hl = 'DiagnosticHint' },
end -- absorb autocmd ev (.file etc.) }
local M = '%m%r %='
local LOAD = '%#DiagnosticInfo#' function _G.Status()
local T, JOB = {}, nil local win = tonumber(vim.g.statusline_winid)
local IV = vim.g.statusline_prog_interval or 750 -- ms cap between progress redraws local buf = (win and vim.api.nvim_win_is_valid(win)) and vim.api.nvim_win_get_buf(win)
local LAST = 0 or vim.api.nvim_get_current_buf()
local function snap(bb) local bufname = vim.api.nvim_buf_get_name(buf)
local nm = ' %F' -- native tail: handles [No Name] and escaping in C local display_path = vim.fn.fnamemodify(bufname, ':.')
if ok then if display_path == '' then
local i, hl = D.get_icon(a.nvim_buf_get_name(bb), nil, { default = true }) display_path = '[No Name]'
if i then
nm = ' %#' .. hl .. '#' .. i .. ' %*%F'
end end
local ext = vim.fn.fnamemodify(bufname, ':e')
if ext == '' then
ext = display_path
end end
local x = vim.diagnostic.count(bb) local icon, hl = icon_cache[ext]
local e, w, h = x[S.ERROR] or 0, x[S.WARN] or 0, x[S.HINT] or 0 if not icon then
local dg = '' icon, hl = MiniIcons.get('file', display_path)
if e + w + h > 0 then icon_cache[ext] = { icon, hl }
dg = (e > 0 and ('%#DiagnosticError#E' .. e .. '%* ') or '')
.. (w > 0 and ('%#DiagnosticWarn#W' .. w .. '%* ') or '')
.. (h > 0 and ('%#DiagnosticHint#H' .. h .. '%* ') or '')
end
local rd, cs = '', vim.lsp.get_clients({ bufnr = bb })
if #cs > 0 then
local nm2 = {}
for i = 1, #cs do
nm2[i] = cs[i].name
end
rd = '󰄭 ' .. table.concat(nm2, '/') .. ' '
end
return nm .. M .. dg, rd
end
local function touch(bb, redraw)
local v = vim.b[bb] -- per-buffer cache; nvim frees b: vars on unload
if v then
v.d = true
end
if redraw then
R()
end
end
local function SYNC(force) -- refresh JOB; redraw only when it changed and (force or gate open)
local prev = JOB
JOB = nil
for _, t in pairs(T) do
for _, m in pairs(t) do
JOB = m
break
end
if JOB then
break
end
end
if JOB ~= prev and (force or now() - LAST >= IV) then
LAST = now()
R()
end
end
local G = a.nvim_create_augroup('STL5', { clear = true })
local function au(ev, cb)
a.nvim_create_autocmd(ev, { group = G, callback = cb })
end
au({ 'BufEnter', 'BufFilePost' }, function(e)
touch(e.buf, true)
end)
au('DiagnosticChanged', function(e)
touch(e.buf, e.buf == C())
end)
au({ 'LspAttach', 'LspDetach' }, function(e)
if e.event == 'LspDetach' then
T[e.data.client_id] = nil
SYNC(true)
end
touch(e.buf, true)
end)
au('LspProgress', function(e)
local v = e.data.params.value
if type(v) ~= 'table' then
return
end
local id, tk = e.data.client_id, e.data.params.token or 'default'
T[id] = T[id] or {}
if v.kind == 'end' or (v.kind == 'report' and v.percentage == 100) then
T[id][tk] = nil
SYNC(true) -- clear immediately, don't gate
else else
local m = (v.title and v.title ~= '' and v.title) or v.message or 'Loading...' icon, hl = icon[1], icon[2]
if v.title and v.message and v.message ~= '' then
m = v.title .. ' ' .. v.message
end end
T[id][tk] = m
SYNC() -- gated: at most one redraw per IV ms local nm = (icon ~= '' and hl ~= '') and ('%#' .. hl .. '#' .. icon .. '%* ' .. display_path)
or (' ' .. display_path)
local counts = vim.diagnostic.count(buf)
local parts = {}
for _, cfg in ipairs(diagnostic_configs) do
local n = counts[cfg.sev]
if n and n > 0 then
parts[#parts + 1] = ('%%#%s#%s%d%%*'):format(cfg.hl, cfg.label, n)
end end
end)
au('ColorScheme', R)
au('FocusGained', R)
local function Status()
local v = vim.b
if not v.h or v.d then
v.h, v.r = snap(C())
v.stl = v.h .. v.r
v.d = nil
end end
return JOB and (v.h .. LOAD .. JOB .. '%* ') or v.stl local dg = #parts > 0 and (table.concat(parts, ' ') .. ' ') or ''
local clients = vim.lsp.get_clients({ bufnr = buf })
local lsp_clients = ''
if #clients > 0 then
local names = vim.tbl_map(function(c)
return c.name
end, clients)
lsp_clients = '󰄭 ' .. table.concat(names, '/') .. ' '
end
local lsp_progress = vim.lsp.status()
local progress_str = lsp_progress ~= '' and ('%#DiagnosticInfo#' .. lsp_progress .. '%* ') or ''
return nm .. '%m%r %=' .. dg .. lsp_clients .. progress_str
end end
_G.Status = Status
vim.opt.statusline = '%!v:lua.Status()' vim.opt.statusline = '%!v:lua.Status()'
local augroup = vim.api.nvim_create_augroup('CustomStatusline', { clear = true })
vim.api.nvim_create_autocmd(
{ 'DiagnosticChanged', 'LspAttach', 'LspDetach', 'BufEnter', 'LspProgress' },
{
group = augroup,
callback = function()
vim.cmd.redrawstatus()
end,
}
)
+15 -43
View File
@@ -9,24 +9,20 @@
"rev": "016802de402556da54c36bd7359b441266b01cdd", "rev": "016802de402556da54c36bd7359b441266b01cdd",
"src": "https://github.com/stevearc/conform.nvim" "src": "https://github.com/stevearc/conform.nvim"
}, },
"hardtime.nvim": { "lazydev.nvim": {
"rev": "721a75b9a0c2eb1fb811d34507708ee315cb04eb", "rev": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d",
"src": "https://github.com/m4xshen/hardtime.nvim" "src": "https://github.com/folke/lazydev.nvim"
},
"incline.nvim": {
"rev": "debd628e9395f7a9da57bdc31ce75ca6b40a880b",
"src": "https://github.com/b0o/incline.nvim"
},
"kanso.nvim": {
"rev": "1afbbb449aa0254823dbe1932e3cbb51886ff9fe",
"src": "https://github.com/webhooked/kanso.nvim"
}, },
"live-preview.nvim": { "live-preview.nvim": {
"rev": "a6307fa340ed7c0d96f5c567afc8c991aad94ce0", "rev": "dad92ae9599f9b19a7dffe7d597d3376c110b818",
"src": "https://github.com/brianhuster/live-preview.nvim" "src": "https://github.com/brianhuster/live-preview.nvim"
}, },
"mason-conform.nvim": {
"rev": "132a3d0630de4bdb80e96ccd62b740fcf5754bdc",
"src": "https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git"
},
"mason-lspconfig.nvim": { "mason-lspconfig.nvim": {
"rev": "b3298993d55fa194279b5eb9dbfb3a43da65cadf", "rev": "a338f44149f5673882c32629697d67b0c0547aec",
"src": "https://github.com/mason-org/mason-lspconfig.nvim" "src": "https://github.com/mason-org/mason-lspconfig.nvim"
}, },
"mason.nvim": { "mason.nvim": {
@@ -38,28 +34,16 @@
"src": "https://github.com/nvim-mini/mini.nvim.git", "src": "https://github.com/nvim-mini/mini.nvim.git",
"version": ">=0.0.0" "version": ">=0.0.0"
}, },
"noice.nvim": {
"rev": "7bfd942445fb63089b59f97ca487d605e715f155",
"src": "https://github.com/folke/noice.nvim"
},
"nui.nvim": {
"rev": "10fc361835c856ba4233ef5ea135b919bf3dce97",
"src": "https://github.com/MunifTanjim/nui.nvim"
},
"nvim-lspconfig": { "nvim-lspconfig": {
"rev": "910f0c4d46aa186641518395bc7e6fffb4d23baf", "rev": "77b7432d4770d23b277d37923e5a08a442d8bb07",
"src": "https://github.com/neovim/nvim-lspconfig" "src": "https://github.com/neovim/nvim-lspconfig"
}, },
"nvim-navic": {
"rev": "455808fd0fae06e6d70fadfd61432275db8f34ce",
"src": "https://github.com/SmiteshP/nvim-navic"
},
"nvim-tmux-navigation": { "nvim-tmux-navigation": {
"rev": "4898c98702954439233fdaf764c39636681e2861", "rev": "4898c98702954439233fdaf764c39636681e2861",
"src": "https://github.com/alexghergh/nvim-tmux-navigation" "src": "https://github.com/alexghergh/nvim-tmux-navigation"
}, },
"nvim-treesitter": { "nvim-treesitter": {
"rev": "e289100ff98969e118c702199d88b764ce9e7fdf", "rev": "a2f694478be07f89c2d03cc17858a8745a400c4b",
"src": "https://github.com/nvim-treesitter/nvim-treesitter" "src": "https://github.com/nvim-treesitter/nvim-treesitter"
}, },
"nvim-ts-autotag": { "nvim-ts-autotag": {
@@ -67,28 +51,16 @@
"src": "https://github.com/windwp/nvim-ts-autotag" "src": "https://github.com/windwp/nvim-ts-autotag"
}, },
"nvim-web-devicons": { "nvim-web-devicons": {
"rev": "58447c1fca354bbf184425e4a8d01deecbd6f3c4", "rev": "ec309a0eaff6ea967e58c275996155ab5c16938d",
"src": "https://github.com/nvim-tree/nvim-web-devicons" "src": "https://github.com/nvim-tree/nvim-web-devicons"
}, },
"polydev": {
"rev": "2b30e36fade3272081f7166bc0ec614b0b7da1c9",
"src": "https://git.moomancer.xyz/DarthMooMancer/polydev.git"
},
"smear-cursor.nvim": {
"rev": "f6cb57c342268177f719acc3968b9d8de3ecc969",
"src": "https://github.com/sphamba/smear-cursor.nvim"
},
"snacks.nvim": { "snacks.nvim": {
"rev": "882c996cf28183f4d63640de0b4c02ec886d01f2", "rev": "882c996cf28183f4d63640de0b4c02ec886d01f2",
"src": "https://github.com/folke/snacks.nvim" "src": "https://github.com/folke/snacks.nvim"
}, },
"trouble.nvim": { "tiny-inline-diagnostic.nvim": {
"rev": "bd67efe408d4816e25e8491cc5ad4088e708a69a", "rev": "46ae9b3c8f3039e96ff4497d190ad0aee091f30d",
"src": "https://github.com/folke/trouble.nvim" "src": "https://github.com/rachartier/tiny-inline-diagnostic.nvim"
},
"vellum.nvim": {
"rev": "c9a8665c5d306bf56c6df89896fed8bfaf3110b3",
"src": "https://github.com/blackhat-7/vellum.nvim"
} }
} }
} }
+1 -1
View File
@@ -1,4 +1,4 @@
column_width = 120 column_width = 100
line_endings = "Unix" line_endings = "Unix"
indent_type = "Tabs" indent_type = "Tabs"
indent_width = 2 indent_width = 2
+149 -29
View File
@@ -1,62 +1,182 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# 1. Get active tmux sessions # Ensure Homebrew and standard paths are accessible inside fzf's preview subshell
sessions=$(tmux list-sessions -F "#S" 2>/dev/null) export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
# 2. Get directories from key work paths # Tabs definition
dirs=$(find ~ ~/.config ~/Projects ~/dotfiles ~/personal \ TABS=("All" "Projects" "Dotfiles" "Blank Session")
-mindepth 1 -maxdepth 4 \ TOTAL=${#TABS[@]}
\( -name ".git" -o -name "node_modules" -o -name ".cache" -o -name "Library" \) -prune \ ACTIVE_TAB=0
-o -type d -print 2>/dev/null)
# 3. Dynamic Previewer (Tree view for folders, Window list for sessions) # Terminal Palette Colors for the Tab Header (Ghostty palette 12 and 8)
CLR_ACTIVE=$(printf '\033[1;38;5;12m')
CLR_INACTIVE=$(printf '\033[38;5;8m')
CLR_RESET=$(printf '\033[0m')
# Dynamic Previewer (Restored exact working structure from your original script)
preview_cmd=' preview_cmd='
if [ -d {} ]; then if [ "{}" = "[Create Blank Session in ~]" ]; then
if command -v eza &>/dev/null; then echo "Will spawn an empty session in ~/"
eza --tree --level=2 --icons --color=always {} elif [ -d {} ]; then
elif command -v tree &>/dev/null; then if command -v eza >/dev/null 2>&1; then
tree -C -L 2 {} eza --tree --level=2 --icons --color=always --git-ignore -I "node_modules|build|dist|target|.cache" {}
elif command -v tree >/dev/null 2>&1; then
tree -C -L 2 --gitignore -I "node_modules|build|dist|target|.cache" {}
else else
ls -la --color=always {} ls -la --color=always {}
fi fi
else else
tmux list-windows -t {} 2>/dev/null tmux list-windows -t {} 2>/dev/null || echo "Session or path: {}"
fi' fi'
# 4. Kanagawa Wave Themed FZF Selector get_projects() {
selected=$(printf "%s\n%s" "$sessions" "$dirs" | grep -v '^$' | fzf \ if command -v fd &>/dev/null; then
[ -d "$HOME/Projects" ] && fd --type d --max-depth 2 . "$HOME/Projects" 2>/dev/null | sed 's:/*$::'
[ -d "$HOME/personal/Projects" ] && fd --type d --min-depth 2 --max-depth 2 . "$HOME/personal/Projects" 2>/dev/null | sed 's:/*$::'
else
if [ -d "$HOME/Projects" ]; then
find "$HOME/Projects" -mindepth 1 -maxdepth 2 \
\( -name ".git" -o -name "node_modules" -o -name "build" -o -name ".cache" \) -prune \
-o -type d -print 2>/dev/null | sed 's:/*$::'
fi
if [ -d "$HOME/personal/Projects" ]; then
find "$HOME/personal/Projects" -mindepth 2 -maxdepth 2 \
\( -name ".git" -o -name "node_modules" -o -name "build" -o -name ".cache" \) -prune \
-o -type d -print 2>/dev/null | sed 's:/*$::'
fi
fi
}
get_dotfiles() {
if command -v fd &>/dev/null; then
# 1. Standard ~/.config/<app>
[ -d "$HOME/.config" ] && fd --type d --max-depth 1 . "$HOME/.config" 2>/dev/null | sed 's:/*$::'
# 2. ~/dotfiles direct packages (e.g. ~/dotfiles/nvim, ~/dotfiles/tmux)
# and stow structures (e.g. ~/dotfiles/nvim/.config/nvim or ~/dotfiles/.config/*)
if [ -d "$HOME/dotfiles" ]; then
# Top-level dotfile modules (depth 1)
fd --type d --max-depth 1 . "$HOME/dotfiles" 2>/dev/null | sed 's:/*$::'
# Unhide and drill down specifically into any .config folders inside dotfiles
fd --type d --hidden --no-ignore --max-depth 4 \
--full-path '.*/\.config/[^/]+$' "$HOME/dotfiles" 2>/dev/null | sed 's:/*$::'
fi
else
# Fallback using find
if [ -d "$HOME/.config" ]; then
find "$HOME/.config" -mindepth 1 -maxdepth 1 -type d 2>/dev/null | sed 's:/*$::'
fi
if [ -d "$HOME/dotfiles" ]; then
# Dotfiles packages + nested .config targets up to 4 levels deep
find "$HOME/dotfiles" -mindepth 1 -maxdepth 4 \
\( -name ".git" -o -name "node_modules" -o -name ".cache" \) -prune \
-o -type d -print 2>/dev/null | grep -E '(dotfiles/[^/]+$|/\.config/[^/]+$)' | sed 's:/*$::'
fi
fi | sort -u
}
get_items_for_tab() {
local tab_idx=$1
case "$tab_idx" in
1) # Projects only
get_projects
;;
2) # Dotfiles only
get_dotfiles
;;
3) # Blank Session
echo "[Create Blank Session in ~]"
;;
*) # All: tmux sessions + projects + dotfiles + top-level home dirs
tmux list-sessions -F "#S" 2>/dev/null
get_projects
get_dotfiles
find "$HOME" -maxdepth 1 -mindepth 1 -type d ! -name "Library" 2>/dev/null | sed 's:/*$::'
;;
esac
}
render_header() {
local active=$1
local out=""
for i in "${!TABS[@]}"; do
local name="${TABS[$i]}"
if [ "$i" -eq "$active" ]; then
out+="${CLR_ACTIVE}[▶ ${name}]${CLR_RESET} "
else
out+="${CLR_INACTIVE} ${name} ${CLR_RESET} "
fi
done
printf "%s\n" "$out"
}
# ---------------------------------------------------------
# Tab Navigation Loop
# ---------------------------------------------------------
selected=""
while true; do
fzf_output=$( { render_header "$ACTIVE_TAB"; get_items_for_tab "$ACTIVE_TAB" | grep -v '^$'; } | fzf \
--ansi \
--header-lines=1 \
--expect=tab,btab \
--layout=reverse \ --layout=reverse \
--border=rounded \ --border=rounded \
--margin=1 \ --margin=15 \
--padding=1 \ --padding=0 \
--height=100% \ --height=100% \
--prompt="󱇗 " \ --prompt="󱇗 " \
--color="bg:#1F1F28,bg+:#223249,fg:#DCD7BA,fg+:#DCD7BA" \ --color="bg:#090E13,bg+:#22262D,fg:#c5c9c7,fg+:#ffffff" \
--color="hl:#2D4F67,hl+:#7E9CD8,prompt:#957FB8,pointer:#7E9CD8" \ --color="hl:#7fb4ca,hl+:#7fb4ca,prompt:#7fb4ca,pointer:#22262D" \
--color="info:#98BB6C,spinner:#957FB8,header:#7AA89F,border:#54546D" \ --color="info:#5C6066,spinner:#5C6066,header:#5C6066,border:#2d3139" \
--color="marker:#98BB6C" \ --color="label:#7fb4ca" \
--preview="$preview_cmd" \ --preview="$preview_cmd" \
--preview-window="right:55%:border-left") --preview-window="right:55%:border-left")
# Exit if fzf was cancelled fzf_status=$?
# Cancelled via Escape or Ctrl-C
[[ $fzf_status -ne 0 && $fzf_status -ne 1 ]] && exit 0
key=$(echo "$fzf_output" | head -n 1)
selection=$(echo "$fzf_output" | tail -n +2)
if [ "$key" = "tab" ]; then
ACTIVE_TAB=$(( (ACTIVE_TAB + 1) % TOTAL ))
elif [ "$key" = "btab" ]; then
ACTIVE_TAB=$(( (ACTIVE_TAB - 1 + TOTAL) % TOTAL ))
else
selected="$selection"
break
fi
done
[[ -z "$selected" ]] && exit 0 [[ -z "$selected" ]] && exit 0
# 5. Handle Session Creation / Switching # Strip trailing slash if present
if [[ -d "$selected" ]]; then selected="${selected%/}"
# Selection is a DIRECTORY -> Create session named after folder
session_name=$(basename "$selected" | tr '.: ' '_')
# ---------------------------------------------------------
# Handle Session Creation / Switching
# ---------------------------------------------------------
if [[ "$selected" == "[Create Blank Session in ~]" ]]; then
idx=1
while tmux has-session -t "=blank-$idx" 2>/dev/null; do
((idx++))
done
session_name="blank-$idx"
tmux new-session -d -s "$session_name" -c "$HOME"
elif [[ -d "$selected" ]]; then
session_name=$(basename "$selected" | tr '.: ' '_')
if ! tmux has-session -t "=$session_name" 2>/dev/null; then if ! tmux has-session -t "=$session_name" 2>/dev/null; then
tmux new-session -d -s "$session_name" -c "$selected" tmux new-session -d -s "$session_name" -c "$selected"
fi fi
else else
# Selection is an EXISTING SESSION -> Connect directly
session_name="$selected" session_name="$selected"
fi fi
# 6. Attach or Switch
if [[ -z "$TMUX" ]]; then if [[ -z "$TMUX" ]]; then
exec tmux attach-session -t "$session_name" exec tmux attach-session -t "$session_name"
else else
tmux switch-client -t "$session_name" tmux switch-client -t "$session_name"
fi fi