Compare commits

..
18 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
DarthMooMancer 37197ed4ae Update README.md 2026-10-10 03:34:15 -04:00
DarthMooMancer 4275967e0a TMUX: Updated tmux bar
Ghostty: Updated scrollback and sizing and macos specific settings
2026-10-10 03:32:40 -04:00
DarthMooMancer ca015f90f9 REFACTOR: Even more cleanup 2026-10-10 03:26:15 -04:00
DarthMooMancer 10ef727e6f REFACTOR: Opencode heavily optimized statusline 2026-10-10 01:55:48 -04:00
DarthMooMancer 1356ec1860 REFACTOR: Minimized bar even more 2026-10-10 00:59:03 -04:00
DarthMooMancer 5e8d29a82b REFACTOR: Updated bar and updated keymaps/options 2026-10-05 21:44:48 -04:00
DarthMooMancer 75e4e77dba CHORE: Fixing some minor bugs 2026-10-03 01:53:11 -04:00
DarthMooMancer f74d475dfb CHORE: Cleaned up zshrc, added tpm to tmux and cleaned up old hex codes
and modified macutil
2026-10-03 00:48:50 -04:00
DarthMooMancer bf1b2d5042 CHORE: Cleaned up the status bar and finished it 2026-10-03 00:48:06 -04:00
DarthMooMancer 9ea6881d0e CHORE: Fixed bugs in statusbar 2026-10-03 00:13:24 -04:00
DarthMooMancer f242ace8a6 REFACTOR: Changed status bar significantly to improve performance and be
a little smaller
2026-10-02 23:59:54 -04:00
DarthMooMancer f8578e46c8 REFACTOR: Heavy refactor of layout and ui and plugin optimizations 2026-10-02 23:34:59 -04:00
36 changed files with 956 additions and 888 deletions
Vendored
BIN
View File
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
tmux/.config/tmux/plugins
.DS_Store
+1 -1
View File
@@ -1,4 +1,4 @@
Zenful Dotfiles
Daily Driving:
Ghostty (With Neovim and Tmux) and Zen Browser for development
Ghostty (With Neovim and Tmux)
+1
View File
@@ -26,3 +26,4 @@ brew "go"
brew "wget"
brew "jq"
brew "ruby"
brew "opencode"
Binary file not shown.
+4 -3
View File
@@ -3,16 +3,17 @@ font-family = "JetBrainsMono Nerd Font Medium"
font-thicken = true
font-size = 14
scrollback-limit = 10000
macos-titlebar-style = transparent
macos-titlebar-proxy-icon = hidden
macos-option-as-alt = true
title = " "
background-opacity = 0.92
background-opacity = 0.90
background-blur = 64
confirm-close-surface = false
window-padding-x = 15
window-padding-y = 15
mouse-hide-while-typing = true
adjust-cell-height = 5%
adjust-cell-width = -5%
alpha-blending = linear-corrected
mouse-hide-while-typing = true
copy-on-select = true
+5 -1
View File
@@ -26,7 +26,6 @@ DOTFILES_DIR="$HOME/dotfiles"
if [ ! -d "$DOTFILES_DIR" ]; then
echo "Cloning dotfiles..."
git clone https://git@moo:dmm/dotfiles.git
cd dotfiles
fi
cd "$DOTFILES_DIR"
brew bundle --file=.Brewfile
@@ -34,6 +33,11 @@ brew bundle --file=.Brewfile
stow .
cd ~/
TPM_DIR="$HOME/.config/tmux/plugins/tpm/"
if [ ! -d "$TPM_DIR" ]; then
echo "Cloning tpm..."
git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
fi
# Enable Touch ID for sudo
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+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 },
})
+6 -26
View File
@@ -1,28 +1,8 @@
--- Options
require('DarthMooMancer.plugins')
vim.loader.enable()
require('DarthMooMancer.opts')
require('DarthMooMancer.colors')
require('DarthMooMancer.keymaps')
require('DarthMooMancer.ui')
require('DarthMooMancer.lsp')
require('DarthMooMancer.tools')
vim.cmd.colorscheme('min-kanso')
vim.api.nvim_create_autocmd('FileType', {
pattern = {
'c',
'cpp',
'rust',
'lua',
'typescript',
'javascript',
'css',
'html',
'python',
'go',
'yaml',
},
callback = function()
vim.treesitter.start()
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
})
require('DarthMooMancer.plugins')
require('DarthMooMancer.keymaps')
require('DarthMooMancer.statusline')
require('DarthMooMancer.lsp')
@@ -1,25 +0,0 @@
require('kanso').setup({
transparent = true,
-- foreground = {
-- dark = "saturated", -- Use default colors in dark mode
-- },
overrides = function(colors)
local theme = colors.theme
return {
Normal = { bg = "none" },
NormalFloat = { bg = "none" },
FloatBorder = { bg = "none" },
FloatTitle = { bg = "none" },
TelescopeBorder = { fg = theme.ui.special, bg = "none" },
TelescopePromptBorder = { fg = theme.ui.special, bg = "none" },
TelescopeResultsBorder = { fg = theme.ui.special, bg = "none" },
TelescopePreviewBorder = { fg = theme.ui.special, bg = "none" },
NotifyBackground = { bg = "none" },
NotifyBorder = { fg = theme.ui.special, bg = "none" },
NotifyBody = { fg = theme.ui.fg, bg = "none" },
NotifyTitle = { fg = theme.ui.special, bg = "none" },
}
end,
})
vim.cmd.colorscheme('kanso-zen')
@@ -1,68 +1,46 @@
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")
vim.keymap.set('n', '<leader>ff', function()
local map = vim.keymap.set
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' })
end)
vim.keymap.set('n', '<leader>vs', ':vsplit<CR>')
vim.keymap.set('n', '<leader>ss', ':split<CR>')
vim.keymap.set('n', '<leader>E', ':Ex<CR>')
vim.keymap.set('n', '<C-u>', '<C-u>zz')
vim.keymap.set('n', '<C-d>', '<C-d>zz')
vim.keymap.set('n', 'n', 'nzzzv')
vim.keymap.set('n', 'N', 'Nzzzv')
vim.keymap.set('x', '<leader>p', [["_dP]])
local builtin = require('telescope.builtin')
vim.keymap.set(
'n',
'<leader><leader>',
builtin.find_files,
{ desc = 'Telescope find files' }
)
vim.keymap.set(
'n',
'<leader>fh',
builtin.help_tags,
{ desc = 'Telescope help tags' }
)
vim.keymap.set(
'n',
'<leader>fg',
builtin.live_grep,
{ desc = 'Telescope live grep' }
)
vim.keymap.set(
'n',
'<leader>fm',
builtin.man_pages,
{ desc = 'Telescope man_pages' }
)
vim.keymap.set(
'n',
'<leader>xn',
':Telescope notify<CR>',
{ desc = 'Telescope notify' }
)
map('n', '<leader>vs', ':vsplit<CR>')
map('n', '<leader>ss', ':split<CR>')
map('n', '<C-u>', '<C-u>zz')
map('n', '<C-d>', '<C-d>zz')
map('n', 'n', 'nzzzv')
map('n', 'N', 'Nzzzv')
map('x', '<leader>p', [["_dP]])
map('n', '<leader><leader>', function()
Snacks.picker.files()
end)
map('n', '<leader>fh', function()
Snacks.picker.help()
end)
map('n', '<leader>fg', function()
Snacks.picker.grep()
end)
map('n', '<leader>uu', function()
Snacks.picker.undo()
end)
vim.keymap.set('n', '<leader>fs', vim.lsp.buf.document_symbol)
vim.keymap.set('n', '<leader>gd', vim.lsp.buf.definition)
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references)
vim.keymap.set('n', '<leader>gR', vim.lsp.buf.rename)
vim.keymap.set('n', '<leader>gc', vim.lsp.buf.code_action)
vim.keymap.set('n', '<leader>uu', ':UndotreeToggle<CR>')
vim.keymap.set('n', '<leader>[', '<c-w>H', { silent = true, noremap = true })
vim.keymap.set('n', '<leader>]', '<c-w>K', { silent = true, noremap = true })
vim.keymap.set('n', '[q', ':cprev<CR>zz', { desc = 'Previous Quickfix Item' })
vim.keymap.set('n', ']q', ':cnext<CR>zz', { desc = 'Next Quickfix Item' })
vim.keymap.set('n', '<leader>qo', ':copen<CR>', { desc = 'Open Quickfix' })
vim.keymap.set('n', '<leader>qc', ':cclose<CR>', { desc = 'Close Quickfix' })
vim.keymap.set('n', '<leader>lp', ':LivePreview pick<cr>')
vim.keymap.set('n', '<C-h>', ':NvimTmuxNavigateLeft<CR>', { silent = true })
vim.keymap.set('n', '<C-j>', ':NvimTmuxNavigateDown<CR>', { silent = true })
vim.keymap.set('n', '<C-k>', ':NvimTmuxNavigateUp<CR>', { silent = true })
vim.keymap.set('n', '<C-l>', ':NvimTmuxNavigateRight<CR>', { silent = true })
vim.keymap.set('n', '<leader>xx', ':Trouble diagnostics toggle<cr>')
vim.keymap.set('n', '<leader>zz', ':ZenMode<cr>')
local dropbar_api = require("dropbar.api")
vim.keymap.set("n", "<Leader>;", dropbar_api.pick, { desc = "Pick symbols in winbar" })
vim.keymap.set("n", "[;", dropbar_api.goto_context_start, { desc = "Go to start of current context" })
vim.keymap.set("n", "];", dropbar_api.select_next_context, { desc = "Select next context" })
map('n', '<leader>E', ':Ex<CR>')
map('n', '<leader>fs', vim.lsp.buf.document_symbol)
map('n', '<leader>gd', vim.lsp.buf.definition)
map('n', '<leader>gr', vim.lsp.buf.references)
map('n', '<leader>gR', vim.lsp.buf.rename)
map('n', '<leader>gc', vim.lsp.buf.code_action)
map('n', '<leader>[', '<c-w>H', { silent = true, noremap = true })
map('n', '<leader>]', '<c-w>K', { silent = true, noremap = true })
map('n', '<leader>lp', '<cmd>LivePreview pick<cr>')
map('n', '<C-h>', '<cmd>NvimTmuxNavigateLeft<CR>', { silent = true })
map('n', '<C-j>', '<cmd>NvimTmuxNavigateDown<CR>', { silent = true })
map('n', '<C-k>', '<cmd>NvimTmuxNavigateUp<CR>', { silent = true })
map('n', '<C-l>', '<cmd>NvimTmuxNavigateRight<CR>', { silent = true })
map('n', '<leader>xx', function()
vim.diagnostic.jump({ count = 1, float = false })
end)
map('n', '<leader>zz', function()
Snacks.zen()
end)
+23 -61
View File
@@ -1,66 +1,33 @@
require('mason').setup()
require('mason-lspconfig').setup({
ensure_installed = {
'vtsls',
'lua_ls',
'pylsp',
'gopls',
'html',
'cssls',
'bashls',
},
automatic_enable = false,
})
require('nvim-treesitter').install({
'rust',
'c',
'cpp',
'lua',
'javascript',
'go',
'typescript',
'css',
'html',
'python',
'yaml',
})
require('conform').setup({
formatters_by_ft = {
rust = { 'rustfmt', lsp_format = 'fallback' },
lua = { 'stylua', lsp_format = 'fallback' },
javascript = { 'prettier', stop_after_first = true },
typescript = { 'prettier', stop_after_first = true },
json = { 'prettier' },
html = { 'prettier' },
go = { 'goimports' },
c = { 'clang-format' },
cpp = { 'clang-format' },
css = { 'csskit' },
dart = { 'dart_format', lsp_format = 'fallback' },
python = { 'autopep8' },
['_'] = { 'trim_whitespace' },
},
format_on_save = {
timeout_ms = 2000,
lsp_format = 'fallback',
require('lazydev').setup({
library = {
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
},
})
local capabilities = require('blink.cmp').get_lsp_capabilities()
vim.lsp.config('*', { capabilities = require('blink.cmp').get_lsp_capabilities() })
vim.lsp.config('lua_ls', {
capabilities = capabilities,
settings = {
Lua = {
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 = {
library = vim.api.nvim_get_runtime_file('', true),
checkThirdParty = false,
},
didChangeWatchedFiles = {
dynamicRegistration = false,
},
},
},
})
vim.lsp.config('vtsls', {
settings = {
typescript = {
@@ -73,18 +40,13 @@ vim.lsp.config('vtsls', {
},
})
vim.lsp.config('html', {
capabilities = capabilities,
})
vim.lsp.enable({
'lua_ls',
'clangd',
'rust-analyzer',
'vtsls',
'tailwindcss-language-server',
'cssls',
'html',
'gopls',
'pylsp'
'pylsp',
-- 'rust-analyzer',
-- 'vtsls',
-- 'tailwindcss-language-server',
-- 'cssls',
-- 'html',
})
+25 -47
View File
@@ -2,64 +2,42 @@ vim.opt.termguicolors = true
vim.g.mapleader = ' '
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.tabstop = 8 -- Number of spaces a <Tab> counts for
vim.opt.shiftwidth = 8 -- Number of spaces for autoindent (>>, <<, etc.)
vim.opt.softtabstop = 8 -- Number of spaces for <Tab> in insert mode (backspace deletes 4 spaces)
vim.opt.expandtab = true -- Use spaces instead of tabs
vim.opt.colorcolumn = '100'
local shifts = {
lua = 4,
python = 4,
rust = 4,
dart = 2,
html = 2,
javascript = 2,
typescript = 2,
}
vim.api.nvim_create_autocmd('FileType', {
pattern = vim.tbl_keys(shifts),
callback = function(ev)
local map = {
rust = { ts = 4, sw = 4, sts = 4 },
lua = { ts = 4, sw = 4, sts = 4 },
python = { ts = 4, sw = 4, sts = 4 },
dart = { ts = 2, sw = 2, sts = 2 },
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
local size = shifts[ev.match]
vim.bo[ev.buf].tabstop = size
vim.bo[ev.buf].shiftwidth = size
vim.bo[ev.buf].softtabstop = size
vim.bo[ev.buf].expandtab = true
end,
})
vim.opt.autoindent = true -- Copy indent from current line when starting a new line
vim.opt.wrap = 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.scrolloff = 4
vim.opt.sidescrolloff = 8
vim.opt.scrolloff = 15
vim.opt.sidescrolloff = 15
vim.opt.hlsearch = false
vim.opt.completeopt = { 'menuone', 'noselect', 'popup' }
vim.opt.cursorline = true -- enable cursorline
vim.opt.cursorlineopt = { 'screenline', 'number' } -- cursorline look
vim.g.netrw_browse_split = 0
vim.g.netrw_banner = 0
vim.g.netrw_liststyle = 3
vim.g.netrw_winsize = 25
vim.opt.wrapscan = true -- begin search from top of the file when nothng is found
vim.opt.cursorline = true -- enable cursorline
vim.opt.cursorlineopt = { 'screenline', 'number' } -- cursorline look
vim.opt.foldmethod = 'indent'
vim.opt.foldcolumn = '1'
vim.opt.foldenable = false
vim.opt.shortmess = 'aF' -- abbreviates messages and prevents file name being echoed when opened
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.cmdheight = 0
vim.opt.smoothscroll = true
vim.opt.spell = 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.diagnostic.config({ severity_sort = true })
vim.o.winborder = 'rounded'
vim.opt.updatetime = 250
@@ -1,43 +1,38 @@
vim.pack.add({
-- Themes
{ src = 'https://github.com/webhooked/kanso.nvim' },
-- The rest
{ src = 'https://github.com/mbbill/undotree' },
{
src = 'https://github.com/nvim-mini/mini.pairs',
version = vim.version.range('*'),
},
{
src = 'https://github.com/nvim-mini/mini.hipatterns',
version = vim.version.range('*'),
},
{ src = 'https://github.com/nvim-tree/nvim-web-devicons' },
{ src = 'https://github.com/nvim-telescope/telescope.nvim' },
{
src = 'https://github.com/saghen/blink.cmp',
version = vim.version.range('*'),
},
{ src = 'https://git.moomancer.xyz/DarthMooMancer/polydev.git' },
{
src = 'https://github.com/nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
},
{ src = 'https://github.com/alexghergh/nvim-tmux-navigation' },
{ 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://github.com/b0o/incline.nvim' },
{ src = 'https://github.com/windwp/nvim-ts-autotag' },
{ src = 'https://github.com/MunifTanjim/nui.nvim' },
{ src = 'https://github.com/nvim-lua/plenary.nvim' },
{ src = 'https://github.com/folke/noice.nvim' },
-- { src = 'https://github.com/stevearc/dressing.nvim' },
{ src = 'https://github.com/rcarriga/nvim-notify' },
{ src = 'https://github.com/folke/trouble.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/m4xshen/hardtime.nvim' },
{ src = 'https://github.com/Bekaboo/dropbar.nvim' },
{ src = 'https://github.com/folke/zen-mode.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.mini-nvim')
require('DarthMooMancer.plugins.vern')
require('DarthMooMancer.plugins.treesitter')
require('DarthMooMancer.plugins.mason')
require('DarthMooMancer.plugins.snacks')
require('DarthMooMancer.plugins.conform')
@@ -0,0 +1,21 @@
require('blink.cmp').setup({
completion = {
documentation = {
auto_show = true,
auto_show_delay_ms = 150,
},
menu = {
scrollbar = false,
},
},
sources = {
default = { 'lazydev', 'lsp', 'buffer', 'snippets', 'path' },
providers = {
lazydev = {
name = 'LazyDev',
module = 'lazydev.integrations.blink',
score_offset = 100,
},
},
},
})
@@ -0,0 +1,17 @@
require('conform').setup({
formatters_by_ft = {
lua = { 'stylua', lsp_format = 'fallback' },
javascript = { 'prettier', stop_after_first = true },
typescript = { 'prettier', stop_after_first = true },
json = { 'prettier' },
html = { 'prettier' },
c = { 'clang-format' },
cpp = { 'clang-format' },
python = { 'ruff_fix', 'ruff_format' },
['_'] = { 'trim_whitespace' },
},
format_on_save = {
timeout_ms = 2000,
lsp_format = 'fallback',
},
})
@@ -0,0 +1,12 @@
require('mason').setup()
require('mason-lspconfig').setup({
ensure_installed = {
'vtsls',
'lua_ls',
'pylsp',
'html',
'cssls',
},
automatic_enable = false,
})
require('mason-conform').setup()
@@ -0,0 +1,27 @@
local hipatterns = require('mini.hipatterns')
hipatterns.setup({
highlighters = {
fixme = {
pattern = '%f[%w]()FIXME()%f[%W]',
group = 'MiniHipatternsFixme',
},
hack = {
pattern = '%f[%w]()HACK()%f[%W]',
group = 'MiniHipatternsHack',
},
todo = {
pattern = '%f[%w]()TODO()%f[%W]',
group = 'MiniHipatternsTodo',
},
note = {
pattern = '%f[%w]()NOTE()%f[%W]',
group = 'MiniHipatternsNote',
},
hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
require('mini.pairs').setup()
require('mini.surround').setup()
require('mini.icons').setup()
@@ -0,0 +1,40 @@
require('snacks').setup({
notifier = {
enabled = true,
},
animate = { enabled = true },
input = { enabled = true },
picker = {
enabled = true,
prompt = '',
icons = {
ui = {
selected = '',
},
},
},
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 = {
enabled = true,
toggles = {
dim = true,
diagnostics = true,
inlay_hints = false,
},
},
})
@@ -0,0 +1,37 @@
local parsers = {
'json',
'rust',
'c',
'cpp',
'lua',
'javascript',
'typescript',
'tsx',
'css',
'html',
'python',
'yaml',
}
require('nvim-treesitter').install(parsers)
require('nvim-ts-autotag').setup({
opts = {
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = false, -- Auto close on trailing </
},
})
local group = vim.api.nvim_create_augroup('UserTreesitter', { clear = true })
vim.api.nvim_create_autocmd('FileType', {
group = group,
desc = 'Start treesitter highlighting when a parser is installed',
callback = function(ev)
local lang = vim.treesitter.language.get_lang(ev.match) or ev.match
if not vim.treesitter.language.add(lang) then
return
end
vim.treesitter.start(ev.buf, lang)
end,
})
@@ -0,0 +1,12 @@
require('vern-nvim').setup({
workspace_root = '~/personal/Projects_Testing',
c = {
templates = {
extras = {
linter = {
enabled = true,
},
},
},
},
})
@@ -0,0 +1,71 @@
local icon_cache = {}
local diagnostic_configs = {
{ sev = vim.diagnostic.severity.ERROR, label = 'E', hl = 'DiagnosticError' },
{ sev = vim.diagnostic.severity.WARN, label = 'W', hl = 'DiagnosticWarn' },
{ sev = vim.diagnostic.severity.HINT, label = 'H', hl = 'DiagnosticHint' },
}
function _G.Status()
local win = tonumber(vim.g.statusline_winid)
local buf = (win and vim.api.nvim_win_is_valid(win)) and vim.api.nvim_win_get_buf(win)
or vim.api.nvim_get_current_buf()
local bufname = vim.api.nvim_buf_get_name(buf)
local display_path = vim.fn.fnamemodify(bufname, ':.')
if display_path == '' then
display_path = '[No Name]'
end
local ext = vim.fn.fnamemodify(bufname, ':e')
if ext == '' then
ext = display_path
end
local icon, hl = icon_cache[ext]
if not icon then
icon, hl = MiniIcons.get('file', display_path)
icon_cache[ext] = { icon, hl }
else
icon, hl = icon[1], icon[2]
end
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
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
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,
}
)
@@ -1,87 +0,0 @@
local hipatterns = require('mini.hipatterns')
hipatterns.setup({
highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
fixme = {
pattern = '%f[%w]()FIXME()%f[%W]',
group = 'MiniHipatternsFixme',
},
hack = {
pattern = '%f[%w]()HACK()%f[%W]',
group = 'MiniHipatternsHack',
},
todo = {
pattern = '%f[%w]()TODO()%f[%W]',
group = 'MiniHipatternsTodo',
},
note = {
pattern = '%f[%w]()NOTE()%f[%W]',
group = 'MiniHipatternsNote',
},
hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
require('mini.pairs').setup()
require('nvim-tmux-navigation').setup({
disable_when_zoomed = true, -- defaults to false
})
-- require("zen-mode").toggle({
-- })
require('blink.cmp').setup({
completion = {
documentation = {
auto_show = true,
auto_show_delay_ms = 100,
window = {
winhighlight = 'Normal:NormalFloat,FloatBorder:TelescopeBorder,CursorLine:Visual,Search:None',
},
},
menu = {
draw = {
columns = {
{ "label", "label_description", gap = 1 },
{ "kind_icon", "kind", gap = 1 },
{ "source_name", gap = 1 },
},
},
scrollbar = false,
winhighlight =
'Pmenu:NormalFloat,FloatBorder:TelescopeBorder,PmenuSel:TelescopeSelection,CursorLine:TelescopeSelection,Search:None',
},
},
})
require('Polydev').setup()
require('nvim-ts-autotag').setup({
opts = {
enable_close = true, -- Auto close tags
enable_rename = true, -- Auto rename pairs of tags
enable_close_on_slash = false, -- Auto close on trailing </
},
})
require('trouble').setup({})
require("telescope").setup({
defaults = {
prompt_prefix = "", -- Changes the search icon/prompt prefix
selection_caret = "", -- Changes the arrow/caret next to the selected item
layout_strategy = "horizontal",
layout_config = {
horizontal = {
prompt_position = 'top',
prompt_min_width = 40,
prompt_max_width = 80,
preview_width = 80,
},
},
sorting_strategy = "ascending",
preview = {
hide_on_startup = true,
},
},
})
require("hardtime").setup()
-328
View File
@@ -1,328 +0,0 @@
--- Derive a highlight from an existing scheme group.
local function derive_hl(name, opts)
local base = opts.base and vim.api.nvim_get_hl(0, { name = opts.base })
or {}
local fg = opts.fg and vim.api.nvim_get_hl(0, { name = opts.fg }) or {}
local bg = opts.bg and vim.api.nvim_get_hl(0, { name = opts.bg }) or {}
vim.api.nvim_set_hl(0, name, {
fg = fg.fg or base.fg,
bg = bg.bg or base.bg,
bold = opts.bold,
})
end
--- Derive a mode highlight where bg comes from a syntax group and fg contrasts.
local function derive_mode_hl(name, color_group)
local color = vim.api.nvim_get_hl(0, { name = color_group })
local status_bg = vim.api.nvim_get_hl(0, { name = 'StatusLine' })
vim.api.nvim_set_hl(0, name, {
bg = color.fg,
fg = status_bg.bg or '#191724',
bold = true,
})
end
--- (Re)build all statusline highlight groups from current scheme.
local function setup_statusline_highlights()
derive_mode_hl('StatusModeNormal', 'Type')
derive_mode_hl('StatusModeInsert', 'String')
derive_mode_hl('StatusModeVisual', 'Statement')
derive_mode_hl('StatusModeCommand', 'PreProc')
derive_mode_hl('StatusModeReplace', 'WarningMsg')
derive_mode_hl('StatusModeTerminal', 'Special')
derive_hl('StatusGit', { base = 'CursorLine', fg = 'LineNr' })
derive_hl('StatusLsp', { base = 'StatusLine', fg = 'DiagnosticInfo' })
derive_hl('StatusLspSpinner', { base = 'StatusLine', fg = 'Constant' })
derive_hl(
'StatusDiagError',
{ base = 'StatusLine', fg = 'DiagnosticError' }
)
derive_hl('StatusDiagWarn', { base = 'StatusLine', fg = 'DiagnosticWarn' })
derive_hl('StatusDiagHint', { base = 'StatusLine', fg = 'DiagnosticHint' })
derive_hl('StatusCursor', { base = 'CursorLine', fg = 'Normal' })
-- derive_hl('StatusGitAdded', { base = 'StatusLine', fg = 'OkMsg' })
derive_hl('StatusGitAdded', { base = 'StatusLine', fg = 'MoreMsg' })
derive_hl(
'StatusGitRemoved',
{ base = 'StatusLine', fg = 'DiagnosticError' }
)
derive_hl('StatusRecording', { base = 'StatusLine', fg = 'WarningMsg' })
end
vim.api.nvim_create_autocmd('ColorScheme', {
callback = setup_statusline_highlights,
})
setup_statusline_highlights()
--- Mode text mapping.
local mode_map = {
['n'] = ' NORM ',
['i'] = ' INS ',
['v'] = ' VIS ',
['V'] = ' V-LINE ',
[''] = ' V-BLK ',
['R'] = ' REPL ',
['c'] = ' CMD ',
['t'] = ' TERM ',
}
local mode_hl_map = {
['n'] = 'StatusModeNormal',
['i'] = 'StatusModeInsert',
['v'] = 'StatusModeVisual',
['V'] = 'StatusModeVisual',
[''] = 'StatusModeVisual',
['R'] = 'StatusModeReplace',
['c'] = 'StatusModeCommand',
['t'] = 'StatusModeTerminal',
}
--- Git branch (async, cached per buffer, refreshed every 5s)
local function update_git_branch()
if vim.bo.buftype ~= '' then
return
end
vim.system(
{ 'git', 'branch', '--show-current' },
{ text = true },
function(out)
vim.b.git_branch = (out.code == 0 and out.stdout or ''):gsub(
'%s+',
''
)
end
)
end
vim.uv.new_timer():start(5000, 5000, vim.schedule_wrap(update_git_branch))
vim.api.nvim_create_autocmd({ 'BufEnter', 'FocusGained' }, {
callback = function()
update_git_branch()
end,
})
--- LSP progress (Neovim 0.10+ built-in handler)
local progress = {}
local spinner_frames =
{ '⣾', '⣽', '⣻', '⢿', '⡿', '⣟', '⣯', '⣷' }
local frame = 0
--- Clean stale progress messages periodically
local progress_timer = vim.uv.new_timer()
local function start_progress_timer()
if not progress_timer:is_active() then
progress_timer:start(0, 200, function()
local now = vim.loop.now()
for k, v in pairs(progress) do
local ttl = v.done and 2000 or 10000
if now - v.t > ttl then
progress[k] = nil
end
end
if next(progress) then
frame = (frame % #spinner_frames) + 1
vim.schedule(function()
vim.cmd('redrawstatus')
end)
else
progress_timer:stop()
vim.schedule(function()
vim.cmd('redrawstatus')
end)
end
end)
end
end
vim.api.nvim_create_autocmd('LspProgress', {
callback = function(ev)
local d = ev.data
if not d then
return
end
local params = d.params
if not params or not params.token then
return
end
local key = d.client_id .. ':' .. tostring(params.token)
local value = params.value or {}
if value.kind == 'begin' then
progress[key] = {
msg = (value.message or 'working...'):gsub('%%', '%%%%'),
t = vim.loop.now(),
}
start_progress_timer()
elseif value.kind == 'report' then
local msg_parts = {}
if value.message then
msg_parts[#msg_parts + 1] = value.message
end
if value.percentage ~= nil then
msg_parts[#msg_parts + 1] = '(' .. value.percentage .. '%%)'
end
progress[key] = {
msg = table.concat(msg_parts, ' '),
t = vim.loop.now(),
}
elseif value.kind == 'end' then
if progress[key] then
progress[key].done = true
end
vim.cmd('redrawstatus')
end
end,
})
vim.api.nvim_create_autocmd({ 'LspAttach', 'LspDetach' }, {
callback = function(args)
local names = {}
for _, c in ipairs(vim.lsp.get_clients({ bufnr = args.buf })) do
table.insert(names, c.name)
end
vim.b[args.buf].lsp_names = #names > 0
and (' ● ' .. table.concat(names, ', ') .. ' ')
or ''
end,
})
local function lsp_section()
local client_ids = {}
for _, c in
ipairs(vim.lsp.get_clients({ bufnr = vim.api.nvim_get_current_buf() }))
do
client_ids[c.id] = true
end
local latest = nil
for key, p in pairs(progress) do
local cid = tonumber(key:match('^(%d+):'))
if cid and client_ids[cid] then
if not latest or p.t > latest.t then
latest = p
end
end
end
if latest and (not latest.done or (vim.loop.now() - latest.t < 2000)) then
return '%#StatusLspSpinner# ○ ' .. latest.msg .. ' %*'
end
return '%#StatusLsp#' .. (vim.b.lsp_names or '') .. '%*'
end
local diag_cache = {}
local function build_diag_string(counts)
local parts = {}
if counts[1] and counts[1] > 0 then
table.insert(parts, '%#StatusDiagError# E' .. counts[1] .. ' %*')
end
if counts[2] and counts[2] > 0 then
table.insert(parts, '%#StatusDiagWarn# W' .. counts[2] .. ' %*')
end
if counts[4] and counts[4] > 0 then
table.insert(parts, '%#StatusDiagHint# H' .. counts[4] .. ' %*')
end
return table.concat(parts)
end
local function update_diag_cache(ev)
diag_cache[ev.buf] = build_diag_string(vim.diagnostic.count(ev.buf))
end
vim.api.nvim_create_autocmd(
'DiagnosticChanged',
{ callback = update_diag_cache }
)
local function update_git_diff()
if vim.bo.buftype ~= '' then
return
end
local file = vim.fn.expand('%:p')
if file == '' then
return
end
vim.system(
{ 'git', 'diff', '--numstat', 'HEAD', '--', file },
{ text = true },
function(out)
if out.code ~= 0 or out.stdout == '' then
vim.b.git_diff = nil
return
end
local added, removed = out.stdout:match('(%d+)%s+(%d+)')
vim.b.git_diff = {
added = tonumber(added) or 0,
removed = tonumber(removed) or 0,
}
end
)
end
vim.api.nvim_create_autocmd({ 'BufEnter', 'FocusGained', 'BufWritePost' }, {
callback = update_git_diff,
})
function _G.__statusline()
local m = vim.fn.mode()
local mode_hl = mode_hl_map[m] or 'StatusModeNormal'
local git = vim.b.git_branch or ''
local cur_buf = vim.api.nvim_get_current_buf()
local parts = {
'%#' .. mode_hl .. '#' .. (mode_map[m] or ' ?? ') .. '%*',
git ~= '' and ('%#StatusGit#  ' .. git .. ' %*') or '',
}
local diff = vim.b.git_diff
if diff and (diff.added > 0 or diff.removed > 0) then
if diff.added > 0 then
table.insert(parts, '%#StatusGitAdded# +' .. diff.added .. ' %*')
end
if diff.removed > 0 then
table.insert(
parts,
'%#StatusGitRemoved# -' .. diff.removed .. ' %*'
)
end
end
table.insert(parts, lsp_section())
table.insert(parts, '%=')
local recording = vim.fn.reg_recording()
if recording ~= '' then
table.insert(
parts,
'%#StatusRecording# ● Rec @' .. recording .. ' %*'
)
end
table.insert(
parts,
diag_cache[cur_buf] or build_diag_string(vim.diagnostic.count(cur_buf))
)
table.insert(parts, '%#StatusCursor# %l:%-2c %*')
table.insert(parts, '%#' .. mode_hl .. '# %p%% %*')
return table.concat(parts)
end
vim.o.statusline = '%!v:lua.__statusline()'
require('incline').setup({
window = { margin = { vertical = 0, horizontal = 1 } },
hide = { cursorline = true },
render = function(props)
local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t")
if vim.bo[props.buf].modified then
filename = "[+] " .. filename
end
local icon, color = require("nvim-web-devicons").get_icon_color(filename)
return { { icon, guifg = color }, { " " }, { filename } }
end,
})
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
},
})
require('notify').setup({
background_colour = '#000000',
})
+22 -63
View File
@@ -9,99 +9,58 @@
"rev": "016802de402556da54c36bd7359b441266b01cdd",
"src": "https://github.com/stevearc/conform.nvim"
},
"dropbar.nvim": {
"rev": "808ba31cde89aec8833e9789f5e04557cd31c9e1",
"src": "https://github.com/Bekaboo/dropbar.nvim"
},
"hardtime.nvim": {
"rev": "5165840fe680eab46de1fc6dbff48f148fdcf018",
"src": "https://github.com/m4xshen/hardtime.nvim"
},
"incline.nvim": {
"rev": "debd628e9395f7a9da57bdc31ce75ca6b40a880b",
"src": "https://github.com/b0o/incline.nvim"
},
"kanso.nvim": {
"rev": "1afbbb449aa0254823dbe1932e3cbb51886ff9fe",
"src": "https://github.com/webhooked/kanso.nvim"
"lazydev.nvim": {
"rev": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d",
"src": "https://github.com/folke/lazydev.nvim"
},
"live-preview.nvim": {
"rev": "a6307fa340ed7c0d96f5c567afc8c991aad94ce0",
"rev": "dad92ae9599f9b19a7dffe7d597d3376c110b818",
"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": {
"rev": "b5576cd62899a1a478d0e67ef3d378ee55dba82d",
"rev": "a338f44149f5673882c32629697d67b0c0547aec",
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
},
"mason.nvim": {
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
"src": "https://github.com/mason-org/mason.nvim"
},
"mini.hipatterns": {
"rev": "607d604e650cdf21d71f863d040c496a1d0cb320",
"src": "https://github.com/nvim-mini/mini.hipatterns",
"mini.nvim": {
"rev": "1345d191bb3da9c7b0e977f4387c5761f9bff68d",
"src": "https://github.com/nvim-mini/mini.nvim.git",
"version": ">=0.0.0"
},
"mini.pairs": {
"rev": "4a014143fcb4e9df26198ccb3ecff3b9e77a048c",
"src": "https://github.com/nvim-mini/mini.pairs",
"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": {
"rev": "84b6b6c3f13cb34a6c8a0354b0da4c67d8ccf867",
"rev": "77b7432d4770d23b277d37923e5a08a442d8bb07",
"src": "https://github.com/neovim/nvim-lspconfig"
},
"nvim-notify": {
"rev": "8701bece920b38ea289b457f902e2ad184131a5d",
"src": "https://github.com/rcarriga/nvim-notify"
},
"nvim-tmux-navigation": {
"rev": "4898c98702954439233fdaf764c39636681e2861",
"src": "https://github.com/alexghergh/nvim-tmux-navigation"
},
"nvim-treesitter": {
"rev": "5cb0114e6242625db56dd6440e945ed1ece10bc7",
"rev": "a2f694478be07f89c2d03cc17858a8745a400c4b",
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
},
"nvim-ts-autotag": {
"rev": "88c1453db4ba7dd24131086fe51fdf74e587d275",
"rev": "d7220b55e16ed3c04e88086256def5d282429493",
"src": "https://github.com/windwp/nvim-ts-autotag"
},
"nvim-web-devicons": {
"rev": "5f032a85be210cd1c6ac98861eb3b187ff3bd5eb",
"rev": "ec309a0eaff6ea967e58c275996155ab5c16938d",
"src": "https://github.com/nvim-tree/nvim-web-devicons"
},
"plenary.nvim": {
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
"src": "https://github.com/nvim-lua/plenary.nvim"
"snacks.nvim": {
"rev": "882c996cf28183f4d63640de0b4c02ec886d01f2",
"src": "https://github.com/folke/snacks.nvim"
},
"polydev": {
"rev": "2b30e36fade3272081f7166bc0ec614b0b7da1c9",
"src": "https://git.moomancer.xyz/DarthMooMancer/polydev.git"
},
"telescope.nvim": {
"rev": "40aedd8a68c78a656a10a8d62d80c54af59420fb",
"src": "https://github.com/nvim-telescope/telescope.nvim"
},
"trouble.nvim": {
"rev": "bd67efe408d4816e25e8491cc5ad4088e708a69a",
"src": "https://github.com/folke/trouble.nvim"
},
"undotree": {
"rev": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d",
"src": "https://github.com/mbbill/undotree"
},
"zen-mode.nvim": {
"rev": "8564ce6d29ec7554eb9df578efa882d33b3c23a7",
"src": "https://github.com/folke/zen-mode.nvim"
"tiny-inline-diagnostic.nvim": {
"rev": "46ae9b3c8f3039e96ff4497d190ad0aee091f30d",
"src": "https://github.com/rachartier/tiny-inline-diagnostic.nvim"
}
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
column_width = 80
column_width = 100
line_endings = "Unix"
indent_type = "Tabs"
indent_width = 4
indent_width = 2
quote_style = "AutoPreferSingle"
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
+21 -45
View File
@@ -2,63 +2,39 @@ unbind M-,
set -g prefix C-Space
bind C-Space send-prefix
set -g default-shell $SHELL
set -s escape-time 0
set -g focus-events on
set -g set-clipboard on
set -g detach-on-destroy off
set -ga terminal-features ',xterm-ghostty:RGB'
set -as terminal-overrides ',xterm-ghostty:Tc'
set-option -g default-shell $SHELL
set -g status-position top
set -g status-justify left
set -g status-style 'bg=default' # Completely transparent container
set -g status-left-length 100
set -g status-left "#[fg=#090E13,bg=colour6,bold] #S "
# palette = 0=#090E13
# palette = 1=#c4746e
# palette = 2=#8a9a7b
# palette = 3=#c4b28a
# palette = 4=#8ba4b0
# palette = 5=#a292a3
# palette = 6=#8ea4a2
# palette = 7=#a4a7a4
# palette = 8=#5C6066
# palette = 9=#e46876
# palette = 10=#87a987
# palette = 11=#e6c384
# palette = 12=#7fb4ca
# palette = 13=#938aa9
# palette = 14=#7aa89f
# palette = 15=#c5c9c7
#
# background = #090E13
# foreground = #c5c9c7
# cursor-color = #c5c9c7
# selection-background = #22262D
# selection-foreground = #c5c9c7
set -g status-right ""
set -g window-status-current-format "#[fg=colour1,bg=default] #F#I:#W "
set -g window-status-format "#[fg=colour7,bg=default] #I:#W "
set -g message-style 'fg=colour3 bg=default bold'
set -g base-index 1
set -g pane-base-index 1
set -g detach-on-destroy off
set -g renumber-windows on
set -g set-clipboard on
set -s escape-time 0
set -g status off
set -g status-position top
set -g status-justify centre
set -g status-style bg=default
set -g status-left-length 40
set -g status-left "#{?client_prefix,#[fg=colour234]#[bg=colour6]#[bold] #S #[bg=default]#[nobold],#[fg=color242]#[bg=default]#S }"
set -g status-right ""
set -g window-status-separator " "
set -g window-status-format "#[fg=color242]#I:#W"
set -g window-status-current-format "#[fg=colour3 bold]#I:#W"
set -g message-style 'fg=colour3 bg=default bold'
bind-key h previous-window
bind-key l next-window
bind -r v run-shell "tmux neww ~/.local/bin/tmux-sessionizer"
bind-key z resize-pane -Z
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
bind-key b set-option -g status
bind -r v run-shell "tmux neww ~/.local/bin/tmux-sessionizer"
bind -n C-S-h resize-pane -L 5
bind -n C-S-j resize-pane -D 5
bind -n C-S-k resize-pane -U 5
+149 -29
View File
@@ -1,62 +1,182 @@
#!/usr/bin/env bash
# 1. Get active tmux sessions
sessions=$(tmux list-sessions -F "#S" 2>/dev/null)
# Ensure Homebrew and standard paths are accessible inside fzf's preview subshell
export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
# 2. Get directories from key work paths
dirs=$(find ~ ~/.config ~/Projects ~/dotfiles ~/personal \
-mindepth 1 -maxdepth 4 \
\( -name ".git" -o -name "node_modules" -o -name ".cache" -o -name "Library" \) -prune \
-o -type d -print 2>/dev/null)
# Tabs definition
TABS=("All" "Projects" "Dotfiles" "Blank Session")
TOTAL=${#TABS[@]}
ACTIVE_TAB=0
# 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='
if [ -d {} ]; then
if command -v eza &>/dev/null; then
eza --tree --level=2 --icons --color=always {}
elif command -v tree &>/dev/null; then
tree -C -L 2 {}
if [ "{}" = "[Create Blank Session in ~]" ]; then
echo "Will spawn an empty session in ~/"
elif [ -d {} ]; then
if command -v eza >/dev/null 2>&1; then
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
ls -la --color=always {}
fi
else
tmux list-windows -t {} 2>/dev/null
tmux list-windows -t {} 2>/dev/null || echo "Session or path: {}"
fi'
# 4. Kanagawa Wave Themed FZF Selector
selected=$(printf "%s\n%s" "$sessions" "$dirs" | grep -v '^$' | fzf \
get_projects() {
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 \
--border=rounded \
--margin=1 \
--padding=1 \
--margin=15 \
--padding=0 \
--height=100% \
--prompt="󱇗 " \
--color="bg:#1F1F28,bg+:#223249,fg:#DCD7BA,fg+:#DCD7BA" \
--color="hl:#2D4F67,hl+:#7E9CD8,prompt:#957FB8,pointer:#7E9CD8" \
--color="info:#98BB6C,spinner:#957FB8,header:#7AA89F,border:#54546D" \
--color="marker:#98BB6C" \
--color="bg:#090E13,bg+:#22262D,fg:#c5c9c7,fg+:#ffffff" \
--color="hl:#7fb4ca,hl+:#7fb4ca,prompt:#7fb4ca,pointer:#22262D" \
--color="info:#5C6066,spinner:#5C6066,header:#5C6066,border:#2d3139" \
--color="label:#7fb4ca" \
--preview="$preview_cmd" \
--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
# 5. Handle Session Creation / Switching
if [[ -d "$selected" ]]; then
# Selection is a DIRECTORY -> Create session named after folder
session_name=$(basename "$selected" | tr '.: ' '_')
# Strip trailing slash if present
selected="${selected%/}"
# ---------------------------------------------------------
# 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
tmux new-session -d -s "$session_name" -c "$selected"
fi
else
# Selection is an EXISTING SESSION -> Connect directly
session_name="$selected"
fi
# 6. Attach or Switch
if [[ -z "$TMUX" ]]; then
exec tmux attach-session -t "$session_name"
else
tmux switch-client -t "$session_name"
fi
+7 -34
View File
@@ -1,14 +1,3 @@
if [[ $(uname) != "Darwin" ]]; then
if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
XDG_CURRENT_DESKTOP=sway dbus-run-session sway
fi
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey "^[[3~" delete-char
bindkey "^[[5~" up-line
bindkey "^[[6~" down-line
fi
HISTFILE=~/.zsh_history
HISTSIZE=100
SAVEHIST=200
@@ -17,9 +6,7 @@ source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
zinit light zsh-users/zsh-autosuggestions
zinit light zdharma-continuum/fast-syntax-highlighting
if [[ $(uname) == "Darwin" ]]; then
zinit light junegunn/fzf
fi
zinit light junegunn/fzf
eval "$(starship init zsh)"
eval "$(zoxide init --cmd cd zsh)"
@@ -30,32 +17,18 @@ autoload -Uz _zinit
export PATH="$HOME/.local/bin:$PATH"
alias cat="bat"
alias rebuild="sudo darwin-rebuild switch --flake /etc/nix-darwin/#Andrews-MacBook-Air";
alias enix="nvim /etc/nix-darwin/flake.nix"
alias v="nvim"
alias ls="eza -a"
alias brew-update="brew update && brew upgrade && brew bundle --cleanup --zap --file=~/.Brewfile"
alias cmake-update="sudo rm -rd build && cmake -S . -B build && cmake --build build"
alias oasis="ssh oasis"
# alias grep="rg"
#
if [[ $(uname) != "Darwin" ]]; then
alias update_world='doas emerge --ask --update --newuse --deep @world'
alias env="sh /home/andrew/personal/dotfiles/env_linux.sh"
else
alias env='sh ~/personal/dotfiles/env_mac.sh'
export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -l man'"
# export PATH="$HOME/.flutter/bin/:$PATH"
export GOOGLE_CLOUD_PROJECT="development-477121"
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_DISPLAY_INSTALL_TIMES=0
export HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS=1
export HOMEBREW_NO_EMOJI=1
fi
### End of Zinit's installer chunk
export MANPAGER="sh -c 'sed -u -e \"s/\\x1B\\[[0-9;]*m//g; s/.\\x08//g\" | bat -p -l man'"
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_DISPLAY_INSTALL_TIMES=0
export HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS=1
export HOMEBREW_NO_EMOJI=1
# bun completions
[ -s "/Users/andrew/.bun/_bun" ] && source "/Users/andrew/.bun/_bun"