Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f58fc6411 | ||
|
|
d750bb2da1 | ||
|
|
50dbf88e19 | ||
|
|
65be670447 | ||
|
|
64f10cea52 | ||
|
|
16e44a8f42 | ||
|
|
37197ed4ae | ||
|
|
4275967e0a | ||
|
|
ca015f90f9 | ||
|
|
10ef727e6f | ||
|
|
1356ec1860 | ||
|
|
5e8d29a82b | ||
|
|
75e4e77dba | ||
|
|
f74d475dfb | ||
|
|
bf1b2d5042 | ||
|
|
9ea6881d0e | ||
|
|
f242ace8a6 | ||
|
|
f8578e46c8 | ||
|
|
11f21ffaab | ||
|
|
ecb6f9329a | ||
|
|
2215365e05 | ||
|
|
6bfddba4e1 | ||
|
|
bc3f6d4a06 | ||
|
|
2dc0392bf9 | ||
|
|
295aa41395 | ||
|
|
86d6e13813 | ||
|
|
9fefc102c9 | ||
|
|
602aa05e5c |
@@ -0,0 +1,2 @@
|
|||||||
|
tmux/.config/tmux/plugins
|
||||||
|
.DS_Store
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
Zenful Dotfiles
|
Zenful Dotfiles
|
||||||
|
|
||||||
Daily Driving:
|
Daily Driving:
|
||||||
Ghostty (With Neovim and Tmux) and Zen Browser for development
|
Ghostty (With Neovim and Tmux)
|
||||||
+9
-20
@@ -1,16 +1,9 @@
|
|||||||
cask "ghostty"
|
cask "ghostty"
|
||||||
# cask "localsend"
|
|
||||||
cask "tailscale-app"
|
|
||||||
# cask "zen"
|
|
||||||
cask "autodesk-fusion"
|
|
||||||
cask "logi-options+"
|
|
||||||
cask "font-jetbrains-mono-nerd-font"
|
cask "font-jetbrains-mono-nerd-font"
|
||||||
# cask "utm"
|
cask "google-chrome"
|
||||||
cask "bitwarden"
|
cask "tailscale-app"
|
||||||
# cask "modrinth"
|
|
||||||
# cask "vlc"
|
|
||||||
cask "prismlauncher"
|
|
||||||
|
|
||||||
|
brew "mole"
|
||||||
brew "ripgrep"
|
brew "ripgrep"
|
||||||
brew "neovim"
|
brew "neovim"
|
||||||
brew "tree-sitter" # dep to neovim
|
brew "tree-sitter" # dep to neovim
|
||||||
@@ -19,22 +12,18 @@ brew "eza"
|
|||||||
brew "starship"
|
brew "starship"
|
||||||
brew "tmux"
|
brew "tmux"
|
||||||
brew "bat"
|
brew "bat"
|
||||||
|
brew "python"
|
||||||
brew "cmake"
|
brew "cmake"
|
||||||
brew "fd"
|
brew "fd"
|
||||||
brew "fzf"
|
brew "fzf"
|
||||||
brew "git"
|
brew "git"
|
||||||
brew "zoxide"
|
brew "zoxide"
|
||||||
brew "stow"
|
brew "stow"
|
||||||
brew "mosh"
|
brew "jpeg-turbo"
|
||||||
brew "go"
|
brew "pkgconfig"
|
||||||
# brew "jpeg-turbo"
|
|
||||||
brew "npm"
|
brew "npm"
|
||||||
|
brew "go"
|
||||||
brew "wget"
|
brew "wget"
|
||||||
brew "opencode"
|
|
||||||
brew "xcp"
|
|
||||||
brew "xcbeautify"
|
|
||||||
brew "pipx"
|
|
||||||
brew "jq"
|
brew "jq"
|
||||||
brew "coreutils"
|
brew "ruby"
|
||||||
brew "xcode-build-server"
|
brew "opencode"
|
||||||
# brew "podman"
|
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
@@ -1,19 +1,19 @@
|
|||||||
font-size = 14
|
theme = "/Users/andrew/.config/ghostty/themes/kanso-zen"
|
||||||
theme = "rose-pine-default"
|
|
||||||
macos-titlebar-style = tabs
|
|
||||||
font-family = "JetBrainsMono Nerd Font Medium"
|
font-family = "JetBrainsMono Nerd Font Medium"
|
||||||
font-thicken = true
|
font-thicken = true
|
||||||
font-thicken-strength = 10
|
font-size = 14
|
||||||
|
|
||||||
background = 000000
|
scrollback-limit = 10000
|
||||||
# background-opacity = 0.85
|
macos-titlebar-style = transparent
|
||||||
# background-blur = true
|
macos-titlebar-proxy-icon = hidden
|
||||||
|
macos-option-as-alt = true
|
||||||
|
title = " "
|
||||||
|
background-opacity = 0.90
|
||||||
|
background-blur = 64
|
||||||
confirm-close-surface = false
|
confirm-close-surface = false
|
||||||
window-padding-x = 6
|
window-padding-x = 15
|
||||||
window-padding-y = 6
|
|
||||||
mouse-hide-while-typing = true
|
mouse-hide-while-typing = true
|
||||||
adjust-cell-height = 5%
|
adjust-cell-height = 5%
|
||||||
adjust-cell-width = -5%
|
adjust-cell-width = -5%
|
||||||
alpha-blending = linear-corrected
|
alpha-blending = linear-corrected
|
||||||
bold-is-bright = true
|
copy-on-select = true
|
||||||
mouse-hide-while-typing = true
|
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
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
|
||||||
+9
-5
@@ -13,10 +13,10 @@ if ! command -v brew &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v cargo &> /dev/null; then
|
# if ! command -v cargo &> /dev/null; then
|
||||||
echo "Installing Cargo"
|
# echo "Installing Cargo"
|
||||||
curl https://sh.rustup.rs -sSf | sh
|
# curl https://sh.rustup.rs -sSf | sh
|
||||||
fi
|
# fi
|
||||||
if ! command -v zinit &> /dev/null; then
|
if ! command -v zinit &> /dev/null; then
|
||||||
echo "Installing zinit"
|
echo "Installing zinit"
|
||||||
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)"
|
bash -c "$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)"
|
||||||
@@ -26,7 +26,6 @@ DOTFILES_DIR="$HOME/dotfiles"
|
|||||||
if [ ! -d "$DOTFILES_DIR" ]; then
|
if [ ! -d "$DOTFILES_DIR" ]; then
|
||||||
echo "Cloning dotfiles..."
|
echo "Cloning dotfiles..."
|
||||||
git clone https://git@moo:dmm/dotfiles.git
|
git clone https://git@moo:dmm/dotfiles.git
|
||||||
cd dotfiles
|
|
||||||
fi
|
fi
|
||||||
cd "$DOTFILES_DIR"
|
cd "$DOTFILES_DIR"
|
||||||
brew bundle --file=.Brewfile
|
brew bundle --file=.Brewfile
|
||||||
@@ -34,6 +33,11 @@ brew bundle --file=.Brewfile
|
|||||||
stow .
|
stow .
|
||||||
|
|
||||||
cd ~/
|
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
|
# Enable Touch ID for sudo
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -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 },
|
||||||
|
})
|
||||||
+7
-375
@@ -1,376 +1,8 @@
|
|||||||
--- Options
|
vim.loader.enable()
|
||||||
|
require('DarthMooMancer.opts')
|
||||||
|
vim.cmd.colorscheme('min-kanso')
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
require('DarthMooMancer.plugins')
|
||||||
vim.g.mapleader = " "
|
require('DarthMooMancer.keymaps')
|
||||||
vim.opt.number = true
|
require('DarthMooMancer.statusline')
|
||||||
vim.opt.relativenumber = true
|
require('DarthMooMancer.lsp')
|
||||||
vim.opt.tabstop = 8 -- Number of spaces a <Tab> counts for
|
|
||||||
vim.opt.shiftwidth = 8 -- Number of spaces for autoindent (>>, <<, etc.)
|
|
||||||
vim.opt.expandtab = true -- Use spaces instead of tabs
|
|
||||||
vim.opt.autoindent = true -- Copy indent from current line when starting a new line
|
|
||||||
vim.opt.softtabstop = 8 -- Number of spaces for <Tab> in insert mode (backspace deletes 4 spaces)
|
|
||||||
vim.opt.wrap = false
|
|
||||||
vim.opt.swapfile = false
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
vim.opt.undofile = true -- Keeps undo history even after we close a file
|
|
||||||
vim.opt.scrolloff = 4
|
|
||||||
vim.opt.sidescrolloff = 8
|
|
||||||
vim.opt.hlsearch = false
|
|
||||||
vim.opt.completeopt = { "menuone", "noselect", "popup" }
|
|
||||||
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 = true -- 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.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.pack.add({
|
|
||||||
{ src = "https://github.com/rose-pine/neovim", name = "rose-pine" },
|
|
||||||
{ src = "https://github.com/brenoprata10/nvim-highlight-colors" },
|
|
||||||
{ src = "https://github.com/mbbill/undotree" },
|
|
||||||
{ src = "https://github.com/nvim-mini/mini.pairs", version = vim.version.range('*') },
|
|
||||||
{ src = "https://github.com/nvim-tree/nvim-web-devicons" },
|
|
||||||
{ src = "https://github.com/ibhagwan/fzf-lua" },
|
|
||||||
{ src = "https://github.com/saghen/blink.cmp", version = vim.version.range('*'), },
|
|
||||||
{ src = "git@moo:dmm/polydev.git" },
|
|
||||||
{ src = "https://github.com/nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
|
||||||
{ src = "https://github.com/alexghergh/nvim-tmux-navigation" },
|
|
||||||
{ 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/folke/which-key.nvim" },
|
|
||||||
|
|
||||||
--- XCode Plugins
|
|
||||||
{ src = "https://github.com/MunifTanjim/nui.nvim" },
|
|
||||||
{ src = "https://github.com/mfussenegger/nvim-dap" },
|
|
||||||
{ src = "https://github.com/rcarriga/nvim-dap-ui" },
|
|
||||||
{ src = "https://github.com/nvim-lualine/lualine.nvim" },
|
|
||||||
{ src = "https://github.com/nvim-neo-tree/neo-tree.nvim" },
|
|
||||||
{ src = "https://github.com/wojciech-kulik/xcodebuild.nvim" },
|
|
||||||
{ src = "https://github.com/nvim-lua/plenary.nvim" },
|
|
||||||
{ src = "https://github.com/folke/noice.nvim" },
|
|
||||||
{ src = "https://github.com/folke/snacks.nvim" },
|
|
||||||
})
|
|
||||||
|
|
||||||
--- COLORS
|
|
||||||
|
|
||||||
vim.cmd.colorscheme("rose-pine")
|
|
||||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { link = 'Normal' })
|
|
||||||
vim.api.nvim_set_hl(0, "StatusLine", { link = 'Normal' })
|
|
||||||
vim.api.nvim_set_hl(0, "StatusLineTerm", { link = 'Normal' })
|
|
||||||
vim.api.nvim_set_hl(0, "StatusLineNC", { link = 'Normal' })
|
|
||||||
vim.api.nvim_set_hl(0, "SignColumn", { link = 'Normal' })
|
|
||||||
vim.api.nvim_set_hl(0, 'LineNrAbove', { link = 'NonText', bold = true })
|
|
||||||
vim.api.nvim_set_hl(0, 'LineNrBelow', { link = 'NonText', bold = true })
|
|
||||||
vim.api.nvim_set_hl(0, "LineNr", { link = 'Normal' })
|
|
||||||
vim.api.nvim_set_hl(0, "FoldColumn", { link = 'Normal' })
|
|
||||||
vim.api.nvim_set_hl(0, "CursorLineNr", { bg = "none", link = 'MatchParen', bold = true })
|
|
||||||
|
|
||||||
|
|
||||||
local function xcodebuild_device()
|
|
||||||
if not vim.g.xcodebuild_platform then return " macOS" end
|
|
||||||
|
|
||||||
if vim.g.xcodebuild_platform == "macOS" then
|
|
||||||
return " macOS"
|
|
||||||
end
|
|
||||||
|
|
||||||
local deviceIcon = ""
|
|
||||||
if vim.g.xcodebuild_platform:match("watch") then
|
|
||||||
deviceIcon = ""
|
|
||||||
elseif vim.g.xcodebuild_platform:match("tv") then
|
|
||||||
deviceIcon = " "
|
|
||||||
elseif vim.g.xcodebuild_platform:match("vision") then
|
|
||||||
deviceIcon = " "
|
|
||||||
end
|
|
||||||
|
|
||||||
if vim.g.xcodebuild_os then
|
|
||||||
return deviceIcon .. " " .. vim.g.xcodebuild_device_name .. " (" .. vim.g.xcodebuild_os .. ")"
|
|
||||||
end
|
|
||||||
|
|
||||||
return deviceIcon .. " " .. (vim.g.xcodebuild_device_name or "Unknown")
|
|
||||||
end
|
|
||||||
|
|
||||||
require('lualine').setup({
|
|
||||||
options = {
|
|
||||||
theme = 'auto', -- Or try 'catppuccin' if you use it
|
|
||||||
component_separators = '|',
|
|
||||||
section_separators = { left = '', right = '' },
|
|
||||||
globalstatus = true, -- Crucial for clean look with cmdheight=0
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = { { 'mode', separator = { left = '' }, right_padding = 2 } },
|
|
||||||
lualine_b = { 'filename', 'branch' },
|
|
||||||
lualine_c = { 'diff', 'diagnostics' },
|
|
||||||
lualine_x = {
|
|
||||||
{
|
|
||||||
function() return ' ' .. (vim.g.xcodebuild_last_status or "Idle") end,
|
|
||||||
color = { fg = "Gray" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
function() return ' ' .. (vim.g.xcodebuild_test_plan or "No Plan") end,
|
|
||||||
color = { fg = "#a6e3a1" }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
xcodebuild_device,
|
|
||||||
color = { fg = "#f9e2af" }
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_y = { 'filetype', 'progress' },
|
|
||||||
lualine_z = { { 'location', separator = { right = '' }, left_padding = 2 } },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require("snacks").setup({
|
|
||||||
image = { enabled = true },
|
|
||||||
})
|
|
||||||
require('which-key').setup({
|
|
||||||
preset = "helix"
|
|
||||||
})
|
|
||||||
vim.schedule(function()
|
|
||||||
-- Mason & LSP
|
|
||||||
require("mason").setup()
|
|
||||||
require("mason-lspconfig").setup({
|
|
||||||
ensure_installed = { "vtsls", "lua_ls", "pylsp", "gopls", "html", "tailwindcss", "bashls", },
|
|
||||||
automatic_enable = true,
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Noice & Xcodebuild
|
|
||||||
require("xcodebuild").setup()
|
|
||||||
require("noice").setup({
|
|
||||||
lsp = {
|
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
|
||||||
override = {
|
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
|
||||||
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
|
||||||
},
|
|
||||||
},
|
|
||||||
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
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Blink & Fzf
|
|
||||||
require("blink.cmp").setup({
|
|
||||||
completion = {
|
|
||||||
menu = {
|
|
||||||
draw = {
|
|
||||||
columns = { { "label", gap = 1 }, { "kind_icon", gap = 1, "kind" } },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
require("fzf-lua").setup({
|
|
||||||
winopts = {
|
|
||||||
height = 0.50,
|
|
||||||
width = 0.45,
|
|
||||||
-- row = 0.35,
|
|
||||||
-- col = 0.50,
|
|
||||||
border = "rounded",
|
|
||||||
-- backdrop = 100,
|
|
||||||
-- fullscreen = false,
|
|
||||||
preview = {
|
|
||||||
hidden = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
grep = {
|
|
||||||
rg_glob = true,
|
|
||||||
rg_glob_fn = function(query)
|
|
||||||
local regex, flags = query:match("^(.-)%s%-%-(.*)$")
|
|
||||||
return (regex or query), flags
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
defaults = {
|
|
||||||
formatter = "path.filename_first",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Treesitter
|
|
||||||
require('nvim-treesitter').install { 'swift', 'rust', 'c', 'cpp', 'lua', 'javascript', 'go', 'typescript', 'css', 'html', 'python' }
|
|
||||||
vim.api.nvim_create_autocmd('FileType', {
|
|
||||||
pattern = { 'c', 'cpp', 'rust', 'lua', 'typescript', 'javascript', 'css', 'html', 'python', 'go', 'swift' },
|
|
||||||
callback = function()
|
|
||||||
vim.treesitter.start()
|
|
||||||
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end)
|
|
||||||
|
|
||||||
--- Configurations
|
|
||||||
local helpers = require 'incline.helpers'
|
|
||||||
local devicons = require 'nvim-web-devicons'
|
|
||||||
require('incline').setup {
|
|
||||||
window = {
|
|
||||||
padding = 0,
|
|
||||||
margin = { horizontal = 0 },
|
|
||||||
},
|
|
||||||
render = function(props)
|
|
||||||
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
|
|
||||||
return {
|
|
||||||
ft_icon and { ' ', ft_icon, ' ', guibg = ft_color, guifg = helpers.contrast_color(ft_color) } or
|
|
||||||
'',
|
|
||||||
' ',
|
|
||||||
{ filename, gui = modified and 'bold,italic' or 'bold' },
|
|
||||||
' ',
|
|
||||||
guibg = '#44406e',
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
require 'nvim-tmux-navigation'.setup {
|
|
||||||
disable_when_zoomed = true -- defaults to false
|
|
||||||
}
|
|
||||||
require("conform").setup({
|
|
||||||
formatters_by_ft = {
|
|
||||||
rust = { "rustfmt", lsp_format = "fallback" },
|
|
||||||
lua = { "emmylua-codeformat", lsp_format = "fallback" },
|
|
||||||
javascript = { "prettier", stop_after_first = true },
|
|
||||||
typescript = { "prettier", stop_after_first = true },
|
|
||||||
json = { "prettier" },
|
|
||||||
html = { "prettier" },
|
|
||||||
go = { "goimports" },
|
|
||||||
c = { "lsp" },
|
|
||||||
cpp = { "lsp" },
|
|
||||||
["_"] = { "trim_whitespace" },
|
|
||||||
},
|
|
||||||
format_on_save = {
|
|
||||||
timeout_ms = 500,
|
|
||||||
lsp_format = "fallback",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
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('nvim-highlight-colors').turnOn()
|
|
||||||
require("Polydev").setup()
|
|
||||||
require('mini.pairs').setup()
|
|
||||||
|
|
||||||
--- LSP
|
|
||||||
|
|
||||||
local capabilities = require('blink.cmp').get_lsp_capabilities()
|
|
||||||
vim.lsp.config("lua_ls", {
|
|
||||||
capabilities = capabilities,
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
diagnostics = { globals = { "vim" } },
|
|
||||||
workspace = {
|
|
||||||
library = vim.api.nvim_get_runtime_file("", true),
|
|
||||||
checkThirdParty = false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.lsp.config("vtsls", {
|
|
||||||
settings = {
|
|
||||||
typescript = {
|
|
||||||
updateImportsOnFileMove = { enabled = "always" },
|
|
||||||
inlayHints = {
|
|
||||||
parameterNames = { enabled = "all" },
|
|
||||||
variableTypes = { enabled = true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.lsp.enable({ "lua_ls", "clangd", "rust-analyzer", "vtsls", "tailwindcss-language-server",
|
|
||||||
"vscode-html-language-server", "gopls", "xcode-build-server", "sourcekit" })
|
|
||||||
|
|
||||||
--- KEYMAPS
|
|
||||||
|
|
||||||
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", vim.lsp.buf.format)
|
|
||||||
-- vim.keymap.set("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]])
|
|
||||||
vim.keymap.set('n', '<leader><leader>', ":FzfLua files<CR>")
|
|
||||||
vim.keymap.set('n', '<leader>fh', ":FzfLua helptags<CR>")
|
|
||||||
vim.keymap.set('n', '<leader>fg', ":FzfLua live_grep<CR>")
|
|
||||||
vim.keymap.set('n', '<leader>fm', ":FzfLua manpages<CR>")
|
|
||||||
vim.keymap.set('n', '<leader>xx', ":FzfLua diagnostics_workspace<CR>")
|
|
||||||
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", "<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>nn", ":Neotree toggle<CR>")
|
|
||||||
vim.keymap.set("n", "<leader>X", "<cmd>XcodebuildPicker<cr>", { desc = "Show Xcodebuild Actions" })
|
|
||||||
vim.keymap.set("n", "<leader>xf", "<cmd>XcodebuildProjectManager<cr>", { desc = "Show Project Manager Actions" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>xb", "<cmd>XcodebuildBuild<cr>", { desc = "Build Project" })
|
|
||||||
vim.keymap.set("n", "<leader>xB", "<cmd>XcodebuildBuildForTesting<cr>", { desc = "Build For Testing" })
|
|
||||||
vim.keymap.set("n", "<leader>xr", "<cmd>XcodebuildBuildRun<cr>", { desc = "Build & Run Project" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>xt", "<cmd>XcodebuildTest<cr>", { desc = "Run Tests" })
|
|
||||||
vim.keymap.set("v", "<leader>xt", "<cmd>XcodebuildTestSelected<cr>", { desc = "Run Selected Tests" })
|
|
||||||
vim.keymap.set("n", "<leader>xT", "<cmd>XcodebuildTestClass<cr>", { desc = "Run Current Test Class" })
|
|
||||||
vim.keymap.set("n", "<leader>x.", "<cmd>XcodebuildTestRepeat<cr>", { desc = "Repeat Last Test Run" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>xl", "<cmd>XcodebuildToggleLogs<cr>", { desc = "Toggle Xcodebuild Logs" })
|
|
||||||
vim.keymap.set("n", "<leader>xc", "<cmd>XcodebuildToggleCodeCoverage<cr>", { desc = "Toggle Code Coverage" })
|
|
||||||
vim.keymap.set("n", "<leader>xC", "<cmd>XcodebuildShowCodeCoverageReport<cr>", { desc = "Show Code Coverage Report" })
|
|
||||||
vim.keymap.set("n", "<leader>xe", "<cmd>XcodebuildTestExplorerToggle<cr>", { desc = "Toggle Test Explorer" })
|
|
||||||
vim.keymap.set("n", "<leader>xs", "<cmd>XcodebuildFailingSnapshots<cr>", { desc = "Show Failing Snapshots" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>xp", "<cmd>XcodebuildPreviewGenerateAndShow<cr>", { desc = "Generate Preview" })
|
|
||||||
vim.keymap.set("n", "<leader>x<cr>", "<cmd>XcodebuildPreviewToggle<cr>", { desc = "Toggle Preview" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>xd", "<cmd>XcodebuildSelectDevice<cr>", { desc = "Select Device" })
|
|
||||||
vim.keymap.set("n", "<leader>xq", "<cmd>Telescope quickfix<cr>", { desc = "Show QuickFix List" })
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>xx", "<cmd>XcodebuildQuickfixLine<cr>", { desc = "Quickfix Line" })
|
|
||||||
vim.keymap.set("n", "<leader>xa", "<cmd>XcodebuildCodeActions<cr>", { desc = "Show Code Actions" })
|
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
vim.g.mapleader = " "
|
|
||||||
vim.g.termguicolors = true
|
|
||||||
|
|
||||||
vim.o.nu = true
|
|
||||||
vim.o.relativenumber = true
|
|
||||||
vim.o.cursorline = true
|
|
||||||
vim.o.expandtab = true
|
|
||||||
vim.o.tabstop = 4
|
|
||||||
vim.o.shiftwidth = 4
|
|
||||||
vim.o.hlsearch = false
|
|
||||||
vim.o.incsearch = true
|
|
||||||
vim.o.swapfile = false
|
|
||||||
vim.o.backup = false
|
|
||||||
vim.o.wrap = false
|
|
||||||
vim.o.undofile = true
|
|
||||||
vim.o.undodir = os.getenv("HOME") .. "/.cache/nvim/undodir"
|
|
||||||
vim.o.list = true
|
|
||||||
--vim.o.listchars = "tabs:> "
|
|
||||||
vim.o.path = "**"
|
|
||||||
|
|
||||||
vim.cmd(":colorscheme retrobox")
|
|
||||||
vim.cmd(":command! -nargs=+ Grep execute 'silent grep! <args>' | copen")
|
|
||||||
|
|
||||||
vim.treesitter.language.register("cpp", "c")
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
|
||||||
pattern = {
|
|
||||||
"c", "h", "cpp",
|
|
||||||
"lua"
|
|
||||||
},
|
|
||||||
callback = function() vim.treesitter.start() end,
|
|
||||||
})
|
|
||||||
|
|
||||||
local map = vim.keymap.set
|
|
||||||
map("n", "<C-h>", "<C-w><C-h>")
|
|
||||||
map("n", "<C-j>", "<C-w><C-j>")
|
|
||||||
map("n", "<C-k>", "<C-w><C-k>")
|
|
||||||
map("n", "<C-l>", "<C-w><C-l>")
|
|
||||||
|
|
||||||
map("n", "<C-d>", "<C-d>zz")
|
|
||||||
map("n", "<C-u>", "<C-u>zz")
|
|
||||||
|
|
||||||
map({ "i", "n" }, "<C-n>", "<C-x><C-]>")
|
|
||||||
map({ "i", "n" }, "<C- >", "<C-x><C-o>")
|
|
||||||
|
|
||||||
map("n", "n", "nzzzv")
|
|
||||||
map("n", "N", "Nzzzv")
|
|
||||||
map("v", "J", ":m '>+1<CR>gv=gv")
|
|
||||||
map("v", "K", ":m '<-2<CR>gv=gv")
|
|
||||||
map("n", ";", "q:")
|
|
||||||
map("t", "<ESC>", "<C-\\><C-n>")
|
|
||||||
map("n", "<A-h>", ":below term<CR>i")
|
|
||||||
|
|
||||||
map("n", "<leader>w", ":write<CR>")
|
|
||||||
map("n", "<leader>q", ":quit<CR>")
|
|
||||||
map("n", "<leader>Q", ":quit!<CR>")
|
|
||||||
map("n", "<leader>y", "\"+y")
|
|
||||||
map("n", "<leader>e", ":Ex<CR>")
|
|
||||||
map("n", "<leader>v", ":edit $MYVIMRC<CR>")
|
|
||||||
map("n", "<leader>ff", ":find ")
|
|
||||||
map("n", "<leader>fg", ":Grep ")
|
|
||||||
map("n", "<leader>r", ":make!<CR>")
|
|
||||||
map("n", "<leader>R", ":set makeprg=")
|
|
||||||
map("n", "<leader>x", ":copen<CR>")
|
|
||||||
map("n", "<leader>c", ":!ctags -R .<CR>")
|
|
||||||
|
|
||||||
@@ -1,79 +0,0 @@
|
|||||||
local function switch_source_header(bufnr)
|
|
||||||
local method_name = 'textDocument/switchSourceHeader'
|
|
||||||
local client = vim.lsp.get_clients({ bufnr = bufnr, name = 'clangd' })[1]
|
|
||||||
if not client then
|
|
||||||
return vim.notify(('method %s is not supported by any servers active on the current buffer'):format(method_name))
|
|
||||||
end
|
|
||||||
local params = vim.lsp.util.make_text_document_params(bufnr)
|
|
||||||
client.request(method_name, params, function(err, result)
|
|
||||||
if err then
|
|
||||||
error(tostring(err))
|
|
||||||
end
|
|
||||||
if not result then
|
|
||||||
vim.notify('corresponding file cannot be determined')
|
|
||||||
return
|
|
||||||
end
|
|
||||||
vim.cmd.edit(vim.uri_to_fname(result))
|
|
||||||
end, bufnr)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function symbol_info()
|
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
|
||||||
local clangd_client = vim.lsp.get_clients({ bufnr = bufnr, name = 'clangd' })[1]
|
|
||||||
if not clangd_client or not clangd_client.supports_method 'textDocument/symbolInfo' then
|
|
||||||
return vim.notify('Clangd client not found', vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
local win = vim.api.nvim_get_current_win()
|
|
||||||
local params = vim.lsp.util.make_position_params(win, clangd_client.offset_encoding)
|
|
||||||
clangd_client.request('textDocument/symbolInfo', params, function(err, res)
|
|
||||||
if err or #res == 0 then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
local container = string.format('container: %s', res[1].containerName) ---@type string
|
|
||||||
local name = string.format('name: %s', res[1].name) ---@type string
|
|
||||||
vim.lsp.util.open_floating_preview({ name, container }, '', {
|
|
||||||
height = 2,
|
|
||||||
width = math.max(string.len(name), string.len(container)),
|
|
||||||
focusable = false,
|
|
||||||
focus = false,
|
|
||||||
border = 'single',
|
|
||||||
title = 'Symbol Info',
|
|
||||||
})
|
|
||||||
end, bufnr)
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
cmd = { 'clangd' },
|
|
||||||
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' },
|
|
||||||
root_markers = {
|
|
||||||
'.clangd',
|
|
||||||
'.clang-tidy',
|
|
||||||
'.clang-format',
|
|
||||||
'compile_commands.json',
|
|
||||||
'compile_flags.txt',
|
|
||||||
'configure.ac', -- AutoTools
|
|
||||||
'.git',
|
|
||||||
},
|
|
||||||
capabilities = {
|
|
||||||
textDocument = {
|
|
||||||
completion = {
|
|
||||||
editsNearCursor = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
offsetEncoding = { 'utf-8', 'utf-16' },
|
|
||||||
},
|
|
||||||
on_init = function(client, init_result)
|
|
||||||
if init_result.offsetEncoding then
|
|
||||||
client.offset_encoding = init_result.offsetEncoding
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
on_attach = function(_, bufnr)
|
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, 'LspClangdSwitchSourceHeader', function()
|
|
||||||
switch_source_header(bufnr)
|
|
||||||
end, { desc = 'Switch between source/header' })
|
|
||||||
|
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, 'LspClangdShowSymbolInfo', function()
|
|
||||||
symbol_info()
|
|
||||||
end, { desc = 'Show symbol info' })
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,162 +0,0 @@
|
|||||||
---@brief
|
|
||||||
---
|
|
||||||
--- https://github.com/denoland/deno
|
|
||||||
---
|
|
||||||
--- Deno's built-in language server
|
|
||||||
---
|
|
||||||
--- To appropriately highlight codefences returned from denols, you will need to augment vim.g.markdown_fenced languages
|
|
||||||
--- in your init.lua. Example:
|
|
||||||
---
|
|
||||||
--- ```lua
|
|
||||||
--- vim.g.markdown_fenced_languages = {
|
|
||||||
--- "ts=typescript"
|
|
||||||
--- }
|
|
||||||
--- ```
|
|
||||||
---
|
|
||||||
--- Some care must be taken here to correctly infer whether a file is part of a Deno program, or a TS program that
|
|
||||||
--- expects to run in Node or Web Browsers. This supports having a Deno module that is a part of a mostly-not-Deno
|
|
||||||
--- monorepo. We do this by finding the nearest package manager lock file, and the nearest deno.json or deno.jsonc.
|
|
||||||
--- Note that this means that without a deno.json, deno.jsonc, or deno.lock file, this LSP client will not attach.
|
|
||||||
---
|
|
||||||
--- Example:
|
|
||||||
---
|
|
||||||
--- ```
|
|
||||||
--- project-root
|
|
||||||
--- +-- node_modules/...
|
|
||||||
--- +-- package-lock.json
|
|
||||||
--- +-- package.json
|
|
||||||
--- +-- packages
|
|
||||||
--- +-- deno-module
|
|
||||||
--- | +-- deno.json
|
|
||||||
--- | +-- package.json <-- It's normal for Deno projects to have package.json files!
|
|
||||||
--- | +-- src
|
|
||||||
--- | +-- index.ts <-- this is a Deno file
|
|
||||||
--- +-- node-module
|
|
||||||
--- +-- package.json
|
|
||||||
--- +-- src
|
|
||||||
--- +-- index.ts <-- a non-Deno file (ie, should use ts_ls or tsgo)
|
|
||||||
--- ```
|
|
||||||
---
|
|
||||||
--- From the file being edited, we walk up to find the nearest package manager lockfile. This is PROJECT ROOT.
|
|
||||||
--- From the file being edited, find the nearest deno.json or deno.jsonc. This is DENO ROOT.
|
|
||||||
--- From the file being edited, find the nearest deno.lock. This is DENO LOCK ROOT
|
|
||||||
--- If DENO LOCK ROOT is found, and PROJECT ROOT is missing or shorter, then this is a deno file, and we attach.
|
|
||||||
--- If DENO ROOT is found, and it's longer than or equal to PROJECT ROOT, then this is a Deno file, and we attach.
|
|
||||||
--- Otherwise, we abort, because this is a non-Deno TS file.
|
|
||||||
|
|
||||||
local lsp = vim.lsp
|
|
||||||
|
|
||||||
local function virtual_text_document_handler(uri, res, client)
|
|
||||||
if not res then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local lines = vim.split(res.result, '\n')
|
|
||||||
local bufnr = vim.uri_to_bufnr(uri)
|
|
||||||
|
|
||||||
local current_buf = vim.api.nvim_buf_get_lines(bufnr, 0, -1, false)
|
|
||||||
if #current_buf ~= 0 then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, lines)
|
|
||||||
vim.api.nvim_set_option_value('readonly', true, { buf = bufnr })
|
|
||||||
vim.api.nvim_set_option_value('modified', false, { buf = bufnr })
|
|
||||||
vim.api.nvim_set_option_value('modifiable', false, { buf = bufnr })
|
|
||||||
lsp.buf_attach_client(bufnr, client.id)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function virtual_text_document(uri, client)
|
|
||||||
local params = {
|
|
||||||
textDocument = {
|
|
||||||
uri = uri,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
local result = client:request_sync('deno/virtualTextDocument', params)
|
|
||||||
virtual_text_document_handler(uri, result, client)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function denols_handler(err, result, ctx, config)
|
|
||||||
if not result or vim.tbl_isempty(result) then
|
|
||||||
return nil
|
|
||||||
end
|
|
||||||
|
|
||||||
local client = vim.lsp.get_client_by_id(ctx.client_id)
|
|
||||||
for _, res in pairs(result) do
|
|
||||||
local uri = res.uri or res.targetUri
|
|
||||||
if uri:match '^deno:' then
|
|
||||||
virtual_text_document(uri, client)
|
|
||||||
res['uri'] = uri
|
|
||||||
res['targetUri'] = uri
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
lsp.handlers[ctx.method](err, result, ctx, config)
|
|
||||||
end
|
|
||||||
|
|
||||||
---@type vim.lsp.Config
|
|
||||||
return {
|
|
||||||
cmd = { 'deno', 'lsp' },
|
|
||||||
cmd_env = { NO_COLOR = true },
|
|
||||||
filetypes = {
|
|
||||||
'javascript',
|
|
||||||
'javascriptreact',
|
|
||||||
'typescript',
|
|
||||||
'typescriptreact',
|
|
||||||
},
|
|
||||||
root_dir = function(bufnr, on_dir)
|
|
||||||
-- The project root is where the LSP can be started from
|
|
||||||
local root_markers = { 'deno.lock', 'deno.json', 'deno.jsonc' }
|
|
||||||
-- Give the root markers equal priority by wrapping them in a table
|
|
||||||
root_markers = vim.fn.has('nvim-0.11.3') == 1 and { root_markers, { '.git' } }
|
|
||||||
or vim.list_extend(root_markers, { '.git' })
|
|
||||||
-- only include deno projects
|
|
||||||
local deno_root = vim.fs.root(bufnr, { 'deno.json', 'deno.jsonc' })
|
|
||||||
local deno_lock_root = vim.fs.root(bufnr, { 'deno.lock' })
|
|
||||||
local project_root = vim.fs.root(bufnr, root_markers)
|
|
||||||
if
|
|
||||||
(deno_lock_root and (not project_root or #deno_lock_root > #project_root))
|
|
||||||
or (deno_root and (not project_root or #deno_root >= #project_root))
|
|
||||||
then
|
|
||||||
-- deno config is closer than or equal to package manager lock,
|
|
||||||
-- or deno lock is closer than package manager lock. Attach at the project root,
|
|
||||||
-- or deno lock or deno config path. At least one of these is always set at this point.
|
|
||||||
on_dir(project_root or deno_lock_root or deno_root)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
---@type lspconfig.settings.denols
|
|
||||||
settings = {
|
|
||||||
deno = {
|
|
||||||
enable = true,
|
|
||||||
suggest = {
|
|
||||||
imports = {
|
|
||||||
hosts = {
|
|
||||||
['https://deno.land'] = true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
handlers = {
|
|
||||||
['textDocument/definition'] = denols_handler,
|
|
||||||
['textDocument/typeDefinition'] = denols_handler,
|
|
||||||
['textDocument/references'] = denols_handler,
|
|
||||||
},
|
|
||||||
on_attach = function(client, bufnr)
|
|
||||||
vim.api.nvim_buf_create_user_command(bufnr, 'LspDenolsCache', function()
|
|
||||||
client:exec_cmd({
|
|
||||||
title = 'DenolsCache',
|
|
||||||
command = 'deno.cache',
|
|
||||||
arguments = { {}, vim.uri_from_bufnr(bufnr) },
|
|
||||||
}, { bufnr = bufnr }, function(err, _, ctx)
|
|
||||||
if err then
|
|
||||||
local uri = ctx.params.arguments[2]
|
|
||||||
vim.notify('cache command failed for' .. vim.uri_to_fname(uri),
|
|
||||||
vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end, {
|
|
||||||
desc = 'Cache a module and all of its dependencies.',
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { 'lua-language-server' },
|
|
||||||
filetypes = { 'lua' },
|
|
||||||
settings = {
|
|
||||||
Lua = {
|
|
||||||
diagnostics = {
|
|
||||||
globals = { "vim" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
root_markers = {
|
|
||||||
'.luarc.json',
|
|
||||||
'.luarc.jsonc',
|
|
||||||
'.luacheckrc',
|
|
||||||
'.stylua.toml',
|
|
||||||
'stylua.toml',
|
|
||||||
'selene.toml',
|
|
||||||
'selene.yml',
|
|
||||||
'.git',
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
-- ~/.config/nvim/lsp/rust-analyzer.lua
|
|
||||||
return {
|
|
||||||
cmd = { "rust-analyzer" },
|
|
||||||
filetypes = { "rust" },
|
|
||||||
root_markers = { "Cargo.toml", ".git" },
|
|
||||||
settings = {
|
|
||||||
["rust-analyzer"] = {
|
|
||||||
diagnostics = {
|
|
||||||
enable = false, -- As you requested
|
|
||||||
},
|
|
||||||
checkOnSave = {
|
|
||||||
enable = true,
|
|
||||||
command = "clippy",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
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)
|
||||||
|
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)
|
||||||
|
|
||||||
|
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)
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
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', {
|
||||||
|
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 = {
|
||||||
|
checkThirdParty = false,
|
||||||
|
},
|
||||||
|
didChangeWatchedFiles = {
|
||||||
|
dynamicRegistration = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.config('vtsls', {
|
||||||
|
settings = {
|
||||||
|
typescript = {
|
||||||
|
updateImportsOnFileMove = { enabled = 'always' },
|
||||||
|
inlayHints = {
|
||||||
|
parameterNames = { enabled = 'all' },
|
||||||
|
variableTypes = { enabled = true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
vim.lsp.enable({
|
||||||
|
'lua_ls',
|
||||||
|
'clangd',
|
||||||
|
'pylsp',
|
||||||
|
-- 'rust-analyzer',
|
||||||
|
-- 'vtsls',
|
||||||
|
-- 'tailwindcss-language-server',
|
||||||
|
-- 'cssls',
|
||||||
|
-- 'html',
|
||||||
|
})
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
vim.opt.termguicolors = true
|
||||||
|
vim.g.mapleader = ' '
|
||||||
|
vim.opt.number = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
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 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.wrap = false
|
||||||
|
vim.opt.swapfile = false
|
||||||
|
vim.opt.signcolumn = 'number'
|
||||||
|
vim.opt.undofile = true -- Keeps undo history even after we close a file
|
||||||
|
vim.opt.scrolloff = 15
|
||||||
|
vim.opt.sidescrolloff = 15
|
||||||
|
vim.opt.hlsearch = false
|
||||||
|
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.showmode = false
|
||||||
|
vim.opt.smoothscroll = true
|
||||||
|
vim.diagnostic.config({ severity_sort = true })
|
||||||
|
vim.o.winborder = 'rounded'
|
||||||
|
vim.opt.updatetime = 250
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
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.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,
|
||||||
|
}
|
||||||
|
)
|
||||||
@@ -5,81 +5,37 @@
|
|||||||
"src": "https://github.com/saghen/blink.cmp",
|
"src": "https://github.com/saghen/blink.cmp",
|
||||||
"version": ">=0.0.0"
|
"version": ">=0.0.0"
|
||||||
},
|
},
|
||||||
"colorizer": {
|
|
||||||
"rev": "a065833f35a3a7cc3ef137ac88b5381da2ba302e",
|
|
||||||
"src": "https://github.com/norcalli/nvim-colorizer.lua"
|
|
||||||
},
|
|
||||||
"conform.nvim": {
|
"conform.nvim": {
|
||||||
"rev": "dca1a190aa85f9065979ef35802fb77131911106",
|
"rev": "016802de402556da54c36bd7359b441266b01cdd",
|
||||||
"src": "https://github.com/stevearc/conform.nvim"
|
"src": "https://github.com/stevearc/conform.nvim"
|
||||||
},
|
},
|
||||||
"fzf-lua": {
|
"lazydev.nvim": {
|
||||||
"rev": "17e3507b788699776ba6d2f8dd101ec177f37a96",
|
"rev": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d",
|
||||||
"src": "https://github.com/ibhagwan/fzf-lua"
|
"src": "https://github.com/folke/lazydev.nvim"
|
||||||
},
|
},
|
||||||
"incline.nvim": {
|
"live-preview.nvim": {
|
||||||
"rev": "8b54c59bcb23366645ae10edca6edfb9d3a0853e",
|
"rev": "dad92ae9599f9b19a7dffe7d597d3376c110b818",
|
||||||
"src": "https://github.com/b0o/incline.nvim"
|
"src": "https://github.com/brianhuster/live-preview.nvim"
|
||||||
},
|
},
|
||||||
"lackluster.nvim": {
|
"mason-conform.nvim": {
|
||||||
"rev": "70dd682e564784893b984deb51dd5ddd263c8cc7",
|
"rev": "132a3d0630de4bdb80e96ccd62b740fcf5754bdc",
|
||||||
"src": "https://github.com/slugbyte/lackluster.nvim"
|
"src": "https://git.moomancer.xyz/DarthMooMancer/mason-conform.nvim.git"
|
||||||
},
|
|
||||||
"lualine.nvim": {
|
|
||||||
"rev": "131a558e13f9f28b15cd235557150ccb23f89286",
|
|
||||||
"src": "https://github.com/nvim-lualine/lualine.nvim"
|
|
||||||
},
|
},
|
||||||
"mason-lspconfig.nvim": {
|
"mason-lspconfig.nvim": {
|
||||||
"rev": "0c2823e0418f3d9230ff8b201c976e84de1cb401",
|
"rev": "a338f44149f5673882c32629697d67b0c0547aec",
|
||||||
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
"src": "https://github.com/mason-org/mason-lspconfig.nvim"
|
||||||
},
|
},
|
||||||
"mason.nvim": {
|
"mason.nvim": {
|
||||||
"rev": "cb8445f8ce85d957416c106b780efd51c6298f89",
|
"rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d",
|
||||||
"src": "https://github.com/mason-org/mason.nvim"
|
"src": "https://github.com/mason-org/mason.nvim"
|
||||||
},
|
},
|
||||||
"mini.pairs": {
|
"mini.nvim": {
|
||||||
"rev": "d5a29b6254dad07757832db505ea5aeab9aad43a",
|
"rev": "1345d191bb3da9c7b0e977f4387c5761f9bff68d",
|
||||||
"src": "https://github.com/nvim-mini/mini.pairs",
|
"src": "https://github.com/nvim-mini/mini.nvim.git",
|
||||||
"version": ">=0.0.0"
|
"version": ">=0.0.0"
|
||||||
},
|
},
|
||||||
"muted.nvim": {
|
|
||||||
"rev": "6967424df29fecf248f58a5a597b9ec94cc8b36a",
|
|
||||||
"src": "https://github.com/pisgahk/muted.nvim"
|
|
||||||
},
|
|
||||||
"neo-tree.nvim": {
|
|
||||||
"rev": "ff84e6e1608b24773f1b73cd4182e0bcf2b3d637",
|
|
||||||
"src": "https://github.com/nvim-neo-tree/neo-tree.nvim"
|
|
||||||
},
|
|
||||||
"neogen": {
|
|
||||||
"rev": "23e7e9f883d01289ebd90e98025acc860ea26366",
|
|
||||||
"src": "https://github.com/danymat/neogen"
|
|
||||||
},
|
|
||||||
"noice.nvim": {
|
|
||||||
"rev": "7bfd942445fb63089b59f97ca487d605e715f155",
|
|
||||||
"src": "https://github.com/folke/noice.nvim"
|
|
||||||
},
|
|
||||||
"nui.nvim": {
|
|
||||||
"rev": "de740991c12411b663994b2860f1a4fd0937c130",
|
|
||||||
"src": "https://github.com/MunifTanjim/nui.nvim"
|
|
||||||
},
|
|
||||||
"nvim-colorizer.lua": {
|
|
||||||
"rev": "a065833f35a3a7cc3ef137ac88b5381da2ba302e",
|
|
||||||
"src": "https://github.com/norcalli/nvim-colorizer.lua"
|
|
||||||
},
|
|
||||||
"nvim-dap": {
|
|
||||||
"rev": "45a69eba683a2c448dd9ecfc4de89511f0646b5f",
|
|
||||||
"src": "https://github.com/mfussenegger/nvim-dap"
|
|
||||||
},
|
|
||||||
"nvim-dap-ui": {
|
|
||||||
"rev": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49",
|
|
||||||
"src": "https://github.com/rcarriga/nvim-dap-ui"
|
|
||||||
},
|
|
||||||
"nvim-highlight-colors": {
|
|
||||||
"rev": "e4c7af0211866162d999ce0bdd6a029302e19139",
|
|
||||||
"src": "https://github.com/brenoprata10/nvim-highlight-colors"
|
|
||||||
},
|
|
||||||
"nvim-lspconfig": {
|
"nvim-lspconfig": {
|
||||||
"rev": "31026a13eefb20681124706a79fc1df6bf11ab27",
|
"rev": "77b7432d4770d23b277d37923e5a08a442d8bb07",
|
||||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||||
},
|
},
|
||||||
"nvim-tmux-navigation": {
|
"nvim-tmux-navigation": {
|
||||||
@@ -87,44 +43,24 @@
|
|||||||
"src": "https://github.com/alexghergh/nvim-tmux-navigation"
|
"src": "https://github.com/alexghergh/nvim-tmux-navigation"
|
||||||
},
|
},
|
||||||
"nvim-treesitter": {
|
"nvim-treesitter": {
|
||||||
"rev": "4916d6592ede8c07973490d9322f187e07dfefac",
|
"rev": "a2f694478be07f89c2d03cc17858a8745a400c4b",
|
||||||
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
"src": "https://github.com/nvim-treesitter/nvim-treesitter"
|
||||||
},
|
},
|
||||||
"nvim-ts-autotag": {
|
"nvim-ts-autotag": {
|
||||||
"rev": "88c1453db4ba7dd24131086fe51fdf74e587d275",
|
"rev": "d7220b55e16ed3c04e88086256def5d282429493",
|
||||||
"src": "https://github.com/windwp/nvim-ts-autotag"
|
"src": "https://github.com/windwp/nvim-ts-autotag"
|
||||||
},
|
},
|
||||||
"nvim-web-devicons": {
|
"nvim-web-devicons": {
|
||||||
"rev": "4fc505ac7bd7692824a142e96e5f529c133862f8",
|
"rev": "ec309a0eaff6ea967e58c275996155ab5c16938d",
|
||||||
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||||
},
|
},
|
||||||
"plenary.nvim": {
|
|
||||||
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
|
|
||||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
|
||||||
},
|
|
||||||
"polydev": {
|
|
||||||
"rev": "8d41141e9ab68c271bb8bb2db5528bb0a61c78eb",
|
|
||||||
"src": "git@moo:dmm/polydev.git"
|
|
||||||
},
|
|
||||||
"rose-pine": {
|
|
||||||
"rev": "6a961effd67f6130d36df6d1c05c48c739796dd2",
|
|
||||||
"src": "https://github.com/rose-pine/neovim"
|
|
||||||
},
|
|
||||||
"snacks.nvim": {
|
"snacks.nvim": {
|
||||||
"rev": "ad9ede6a9cddf16cedbd31b8932d6dcdee9b716e",
|
"rev": "882c996cf28183f4d63640de0b4c02ec886d01f2",
|
||||||
"src": "https://github.com/folke/snacks.nvim"
|
"src": "https://github.com/folke/snacks.nvim"
|
||||||
},
|
},
|
||||||
"undotree": {
|
"tiny-inline-diagnostic.nvim": {
|
||||||
"rev": "6fa6b57cda8459e1e4b2ca34df702f55242f4e4d",
|
"rev": "46ae9b3c8f3039e96ff4497d190ad0aee091f30d",
|
||||||
"src": "https://github.com/mbbill/undotree"
|
"src": "https://github.com/rachartier/tiny-inline-diagnostic.nvim"
|
||||||
},
|
|
||||||
"which-key.nvim": {
|
|
||||||
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
|
|
||||||
"src": "https://github.com/folke/which-key.nvim"
|
|
||||||
},
|
|
||||||
"xcodebuild.nvim": {
|
|
||||||
"rev": "59ee76b947cfd680b0354f3318aec2cab71a18db",
|
|
||||||
"src": "https://github.com/wojciech-kulik/xcodebuild.nvim"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
column_width = 80
|
column_width = 100
|
||||||
line_endings = "Unix"
|
line_endings = "Unix"
|
||||||
indent_type = "Tabs"
|
indent_type = "Tabs"
|
||||||
indent_width = 4
|
indent_width = 2
|
||||||
quote_style = "AutoPreferSingle"
|
quote_style = "AutoPreferSingle"
|
||||||
|
|||||||
+9
-4
@@ -4,13 +4,18 @@ Host *
|
|||||||
IdentityFile ~/.ssh/id_ed25519
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
|
||||||
Host moo
|
Host moo
|
||||||
HostName git.local.moomancer.xyz
|
# HostName 192.168.5.16
|
||||||
|
HostName 100.78.144.113
|
||||||
User git
|
User git
|
||||||
IdentityFile ~/.ssh/id_ed25519 # Path to your private key
|
IdentityFile ~/.ssh/id_ed25519 # Path to your private key
|
||||||
|
|
||||||
Host oasis
|
Host oasis
|
||||||
HostName 100.111.101.97
|
HostName 100.78.144.113
|
||||||
User oasis
|
User andrew
|
||||||
Port 2222
|
Port 2222
|
||||||
IdentityFile ~/.ssh/id_ed25519
|
IdentityFile ~/.ssh/id_ed25519
|
||||||
|
Ciphers aes128-gcm@openssh.com
|
||||||
|
Compression no
|
||||||
|
IPQoS throughput
|
||||||
|
ServerAliveInterval 15
|
||||||
|
ServerAliveCountMax 3
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Submodule tmux/.config/tmux/plugins/tpm updated: 99469c4a9b...e261deb1b4
+21
-38
@@ -2,56 +2,39 @@ unbind M-,
|
|||||||
set -g prefix C-Space
|
set -g prefix C-Space
|
||||||
bind C-Space send-prefix
|
bind C-Space send-prefix
|
||||||
|
|
||||||
|
set -g default-shell $SHELL
|
||||||
|
set -s escape-time 0
|
||||||
set -g focus-events on
|
set -g focus-events on
|
||||||
|
set -g set-clipboard on
|
||||||
|
set -g detach-on-destroy off
|
||||||
|
|
||||||
set -ga terminal-features ',xterm-ghostty:RGB'
|
set -ga terminal-features ',xterm-ghostty:RGB'
|
||||||
set -as terminal-overrides ',xterm-ghostty:Tc'
|
set -as terminal-overrides ',xterm-ghostty:Tc'
|
||||||
set-option -g default-shell $SHELL
|
|
||||||
# --- Visual Flair Enhancements ---
|
|
||||||
set -g status-position top
|
|
||||||
set -g status-justify left
|
|
||||||
set -g status-style 'bg=default' # Makes the bar transparent/seamless
|
|
||||||
|
|
||||||
# Left Side: Minimal Session Name with a pill-style look
|
|
||||||
set -g status-left-length 100
|
|
||||||
set -g status-left "#[fg=#31748f,bg=default,bold] #S #[fg=#444444,nobold]│ "
|
|
||||||
|
|
||||||
# Right Side: Clean icons with no unnecessary labels
|
|
||||||
set -g status-right-length 150
|
|
||||||
set -g status-right "#[fg=#c4a7e7] %m-%d #[fg=#444444]│ #[fg=#eb6f92] %H:%M "
|
|
||||||
|
|
||||||
# Window Status: The "Flare"
|
|
||||||
# Using a dot or a subtle block to indicate the active window
|
|
||||||
# set -g window-status-current-format "#[fg=#9ccfd8,bg=default,bold] ● #W"
|
|
||||||
# set -g window-status-format "#[fg=#6e6a86,bg=default] ○ #W"
|
|
||||||
set -g window-status-current-format "#[fg=#9ccfd8,bg=default,bold] #F#I:#W"
|
|
||||||
set -g window-status-format "#[fg=#6e6a86,bg=default] #I:#W"
|
|
||||||
|
|
||||||
# Message styling (Command mode)
|
|
||||||
set -g message-style 'fg=#ebbcba bg=default bold'
|
|
||||||
# ---------------------------------
|
|
||||||
# set -g status-style 'fg=#9ccfd8 bg=#000000'
|
|
||||||
# set -g status-left-length 100
|
|
||||||
# set -g status-right-length 30
|
|
||||||
# set -g status-left "#[fg=#31748f, bold][#S]#[fg=#908caa,nobold] | "
|
|
||||||
# set -g status-right "#[fg=#c4a7e7] %m-%d-%Y #[fg=#eb6f92] %H:%M"
|
|
||||||
|
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
set -g pane-base-index 1
|
set -g pane-base-index 1
|
||||||
set -g detach-on-destroy off
|
|
||||||
set -g renumber-windows on
|
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-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 h previous-window
|
||||||
bind-key l next-window
|
bind-key l next-window
|
||||||
bind -r f run-shell "tmux neww ~/.local/bin/tmux-windowizer"
|
|
||||||
bind -r v run-shell "tmux neww ~/.local/bin/tmux-sessionizer"
|
|
||||||
bind-key z resize-pane -Z
|
bind-key z resize-pane -Z
|
||||||
bind -n C-h select-pane -L
|
bind-key b set-option -g status
|
||||||
bind -n C-j select-pane -D
|
bind -r v run-shell "tmux neww ~/.local/bin/tmux-sessionizer"
|
||||||
bind -n C-k select-pane -U
|
|
||||||
bind -n C-l select-pane -R
|
|
||||||
bind -n C-S-h resize-pane -L 5
|
bind -n C-S-h resize-pane -L 5
|
||||||
bind -n C-S-j resize-pane -D 5
|
bind -n C-S-j resize-pane -D 5
|
||||||
bind -n C-S-k resize-pane -U 5
|
bind -n C-S-k resize-pane -U 5
|
||||||
|
|||||||
Executable
+182
@@ -0,0 +1,182 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Ensure Homebrew and standard paths are accessible inside fzf's preview subshell
|
||||||
|
export PATH="/opt/homebrew/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
|
# Tabs definition
|
||||||
|
TABS=("All" "Projects" "Dotfiles" "Blank Session")
|
||||||
|
TOTAL=${#TABS[@]}
|
||||||
|
ACTIVE_TAB=0
|
||||||
|
|
||||||
|
# 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 [ "{}" = "[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 || echo "Session or path: {}"
|
||||||
|
fi'
|
||||||
|
|
||||||
|
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=15 \
|
||||||
|
--padding=0 \
|
||||||
|
--height=100% \
|
||||||
|
--prompt=" " \
|
||||||
|
--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")
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# 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
|
||||||
|
session_name="$selected"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$TMUX" ]]; then
|
||||||
|
exec tmux attach-session -t "$session_name"
|
||||||
|
else
|
||||||
|
tmux switch-client -t "$session_name"
|
||||||
|
fi
|
||||||
|
|
||||||
+13
-35
@@ -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
|
HISTFILE=~/.zsh_history
|
||||||
HISTSIZE=100
|
HISTSIZE=100
|
||||||
SAVEHIST=200
|
SAVEHIST=200
|
||||||
@@ -17,9 +6,7 @@ source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
|
|||||||
|
|
||||||
zinit light zsh-users/zsh-autosuggestions
|
zinit light zsh-users/zsh-autosuggestions
|
||||||
zinit light zdharma-continuum/fast-syntax-highlighting
|
zinit light zdharma-continuum/fast-syntax-highlighting
|
||||||
if [[ $(uname) == "Darwin" ]]; then
|
zinit light junegunn/fzf
|
||||||
zinit light junegunn/fzf
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
eval "$(zoxide init --cmd cd zsh)"
|
eval "$(zoxide init --cmd cd zsh)"
|
||||||
@@ -30,31 +17,18 @@ autoload -Uz _zinit
|
|||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
|
||||||
alias cat="bat"
|
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 v="nvim"
|
||||||
alias ls="eza -a"
|
alias ls="eza -a"
|
||||||
alias brew-update="brew update && brew upgrade && brew bundle --cleanup --zap --file=~/.Brewfile"
|
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"
|
||||||
|
|
||||||
|
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
|
||||||
# alias grep="rg"
|
export HOMEBREW_NO_ENV_HINTS=1
|
||||||
#
|
export HOMEBREW_DISPLAY_INSTALL_TIMES=0
|
||||||
if [[ $(uname) != "Darwin" ]]; then
|
export HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS=1
|
||||||
alias update_world='doas emerge --ask --update --newuse --deep @world'
|
export HOMEBREW_NO_EMOJI=1
|
||||||
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 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
|
|
||||||
|
|
||||||
# bun completions
|
# bun completions
|
||||||
[ -s "/Users/andrew/.bun/_bun" ] && source "/Users/andrew/.bun/_bun"
|
[ -s "/Users/andrew/.bun/_bun" ] && source "/Users/andrew/.bun/_bun"
|
||||||
@@ -62,3 +36,7 @@ fi
|
|||||||
# bun
|
# bun
|
||||||
export BUN_INSTALL="$HOME/.bun"
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
export PATH="$BUN_INSTALL/bin:$PATH"
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
|
||||||
|
export LDFLAGS="-L/opt/homebrew/opt/ruby/lib"
|
||||||
|
export CPPFLAGS="-I/opt/homebrew/opt/ruby/include"
|
||||||
|
export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
|
||||||
|
|||||||
Reference in New Issue
Block a user