Compare commits

...
9 Commits
14 changed files with 453 additions and 31 deletions
+4 -1
View File
@@ -1,4 +1,7 @@
theme = dark:monodark,light:monolight keybind = global:ctrl+a=toggle_quick_terminal
quick-terminal-size = 100%
theme = dark:default-dark,light:default-light
# enforce legible text on washed-out colors (esp. light theme) # enforce legible text on washed-out colors (esp. light theme)
minimum-contrast = 1.15 minimum-contrast = 1.15
+2 -2
View File
@@ -1,10 +1,10 @@
# Scheme: Default Dark # Scheme: Default Dark
# Generated by Ghostty Base16 Converter # Generated by Ghostty Base16 Converter
background = 181818 background = 111111
foreground = d8d8d8 foreground = d8d8d8
selection-background = 383838 selection-background = 383838
selection-foreground = 181818 selection-foreground = 111111
palette = 0=#181818 palette = 0=#181818
palette = 1=#ab4642 palette = 1=#ab4642
+2 -2
View File
@@ -4,8 +4,8 @@
# regardless of terminal theme handling. # regardless of terminal theme handling.
foreground: &foreground "#d8d8d8" foreground: &foreground "#d8d8d8"
background: &background "#181818" background: &background "#111111"
black: &black "#181818" black: &black "#111111"
blue: &blue "#7cafc2" blue: &blue "#7cafc2"
green: &green "#a1b56c" green: &green "#a1b56c"
grey: &grey "#585858" grey: &grey "#585858"
+41 -2
View File
@@ -8,8 +8,46 @@ vim.api.nvim_create_autocmd('LspAttach', {
end, end,
}) })
vim.filetype.add({
pattern = {
["compose.*%.ya?ml"] = "yaml.docker-compose",
["docker%-compose.*%.ya?ml"] = "yaml.docker-compose",
[".*/templates/.*%.tpl"] = "helm",
[".*/templates/.*%.ya?ml"] = "helm",
["values.*%.ya?ml"] = "yaml.helm-values",
},
})
-- Language server install commands:
-- lua_ls: brew install lua-language-server
-- pyright: npm install --global pyright
-- gopls: go install golang.org/x/tools/gopls@latest
-- clangd: brew install llvm
-- helm_ls: brew install helm helm-ls
-- bashls: npm install --global bash-language-server
-- angularls: npm install --global @angular/language-server
-- djls: brew install joshuadavidthomas/homebrew/django-language-server
-- docker_language_server: go install github.com/docker/docker-language-server/cmd/docker-language-server@latest
-- html: npm install --global vscode-langservers-extracted
-- cssls: npm install --global vscode-langservers-extracted
-- ts_ls: npm install --prefix "$HOME/.local/share/typescript-lsp" typescript typescript-language-server
-- jsonls: npm install --global vscode-langservers-extracted
-- emmet_ls: npm install --global emmet-ls
-- yamlls: npm install --global yaml-language-server
-- Kubernetes: provided by the yamlls schema configuration below
-- Enable language servers -- Enable language servers
local servers = { 'lua_ls', 'pyright', 'gopls', 'clangd', 'helm_ls', 'bashls', 'angularls', 'djls' } local servers = {
'lua_ls',
'pyright',
'gopls',
'clangd',
'helm_ls',
'bashls',
'angularls',
'djls',
'docker_language_server',
}
for _, lsp in ipairs(servers) do for _, lsp in ipairs(servers) do
vim.lsp.enable(lsp) vim.lsp.enable(lsp)
end end
@@ -70,11 +108,12 @@ vim.lsp.enable('emmet_ls')
-- YAML LSP -- YAML LSP
vim.lsp.config('yamlls', { vim.lsp.config('yamlls', {
filetypes = { "yaml", "yaml.gitlab", "yaml.helm-values" },
capabilities = capabilities, capabilities = capabilities,
settings = { settings = {
yaml = { yaml = {
schemas = { schemas = {
kubernetes = "*.yaml", ["https://json.schemastore.org/chart.json"] = "Chart.yaml",
}, },
}, },
} }
+64 -23
View File
@@ -18,7 +18,52 @@ require('lazy').setup({
'mfussenegger/nvim-dap', 'mfussenegger/nvim-dap',
'rcarriga/nvim-dap-ui', 'rcarriga/nvim-dap-ui',
'leoluz/nvim-dap-go', 'leoluz/nvim-dap-go',
'nvim-treesitter/nvim-treesitter', {
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate',
config = function()
local treesitter = require('nvim-treesitter')
-- Parsers for the languages enabled in lsp.lua. LESS, Objective-C++,
-- and the generic "template" filetype have no matching parser.
local parsers = {
'angular', 'bash', 'c', 'cpp', 'css', 'cuda', 'dockerfile',
'go', 'gomod', 'gotmpl', 'gowork', 'helm', 'html', 'htmldjango',
'javascript', 'json', 'lua', 'objc', 'python', 'scss',
'templ', 'tsx', 'typescript', 'yaml',
}
local ready = false
local function start_highlighting(buf)
if not ready or not vim.api.nvim_buf_is_loaded(buf) then
return
end
local lang = vim.treesitter.language.get_lang(vim.bo[buf].filetype)
if vim.list_contains(parsers, lang)
and vim.list_contains(treesitter.get_installed('parsers'), lang) then
vim.treesitter.start(buf, lang)
end
end
vim.api.nvim_create_autocmd('FileType', {
group = vim.api.nvim_create_augroup('UserTreesitter', { clear = true }),
callback = function(ev)
start_highlighting(ev.buf)
end,
})
treesitter.install(parsers):await(vim.schedule_wrap(function(err)
if err then
vim.notify('Tree-sitter installation failed: ' .. tostring(err), vim.log.levels.ERROR)
end
ready = true
-- Enable buffers opened while the first installation was running.
for _, buf in ipairs(vim.api.nvim_list_bufs()) do
start_highlighting(buf)
end
end))
end,
},
'luukvbaal/nnn.nvim', 'luukvbaal/nnn.nvim',
'nvim-tree/nvim-tree.lua', 'nvim-tree/nvim-tree.lua',
'lewis6991/gitsigns.nvim', 'lewis6991/gitsigns.nvim',
@@ -54,6 +99,11 @@ require('lazy').setup({
org_default_notes_file = '~/doc/org/scratch.org', org_default_notes_file = '~/doc/org/scratch.org',
org_startup_indented = true, org_startup_indented = true,
org_deadline_warning_days = 0, org_deadline_warning_days = 0,
ui = {
folds = {
colored = false,
},
},
org_agenda_custom_commands = { org_agenda_custom_commands = {
i = { i = {
description = "Independent", description = "Independent",
@@ -64,6 +114,15 @@ require('lazy').setup({
} }
} }
}, },
e = {
description = "Employment",
types = {
{
type = 'agenda',
org_agenda_tag_filter_preset = 'employment'
}
}
},
p = { p = {
description = "Personal", description = "Personal",
types = { types = {
@@ -73,33 +132,15 @@ require('lazy').setup({
} }
} }
}, },
w = { h = {
description = "Work", description = "Habits",
types = { types = {
{ {
type = 'agenda', type = 'agenda',
org_agenda_tag_filter_preset = 'work' org_agenda_tag_filter_preset = 'habits'
} }
} }
}, }
m = {
description = "Milestones",
types = {
{
type = 'agenda',
org_agenda_tag_filter_preset = 'milestone'
}
}
},
s = {
description = "Social",
types = {
{
type = 'agenda',
org_agenda_tag_filter_preset = 'social'
}
}
},
} }
}) })
end, end,
+19
View File
@@ -3,6 +3,12 @@ vim.o.shiftwidth = 4
vim.o.tabstop = 4 vim.o.tabstop = 4
vim.o.expandtab = true vim.o.expandtab = true
vim.o.autoindent = true vim.o.autoindent = true
vim.g.python_indent = {
open_paren = "shiftwidth()",
nested_paren = "shiftwidth()",
continue = "shiftwidth()",
closed_paren_align_last_line = false,
}
vim.o.foldmethod = "indent" vim.o.foldmethod = "indent"
vim.o.foldlevel = 99 vim.o.foldlevel = 99
vim.o.wrap = false vim.o.wrap = false
@@ -13,6 +19,19 @@ vim.o.splitright = true
vim.o.maxmempattern = 100000 vim.o.maxmempattern = 100000
vim.g.clipboard = "osc52" vim.g.clipboard = "osc52"
function _G.org_foldexpr()
local stars = vim.fn.getline(vim.v.lnum):match("^(%*+)%s")
return stars and (">" .. #stars) or "="
end
vim.api.nvim_create_autocmd("FileType", {
pattern = "org",
callback = function()
vim.opt_local.foldmethod = "expr"
vim.opt_local.foldexpr = "v:lua.org_foldexpr()"
end,
})
vim.cmd([[ vim.cmd([[
autocmd ColorScheme * highlight Statement cterm=NONE ctermfg=5 autocmd ColorScheme * highlight Statement cterm=NONE ctermfg=5
autocmd ColorScheme * highlight Keyword ctermfg=5 autocmd ColorScheme * highlight Keyword ctermfg=5
+10
View File
@@ -7,5 +7,15 @@
"command": ["npx", "@playwright/mcp@latest"], "command": ["npx", "@playwright/mcp@latest"],
"enabled": true "enabled": true
} }
},
"permission": {
"bash": {
"*": "ask",
"kubectl *": "deny",
"kubectl get *": "allow",
"kubectl describe *": "allow",
"kubectl logs *": "allow",
"kubectl top *": "allow"
}
} }
} }
+3
View File
@@ -0,0 +1,3 @@
{
"password": "4QhoSb7noaFQU7oUWUB-HabVwNkYBtLjdwQsjJDEjHc"
}
@@ -1,7 +1,7 @@
{ {
"$schema": "https://opencode.ai/theme.json", "$schema": "https://opencode.ai/theme.json",
"defs": { "defs": {
"base00": "#181818", "base00": "#111111",
"base01": "#282828", "base01": "#282828",
"base02": "#383838", "base02": "#383838",
"base03": "#585858", "base03": "#585858",
@@ -0,0 +1,93 @@
{
"$schema": "https://opencode.ai/theme.json",
"defs": {
"_dark_bg": "#111111",
"_dark_bg_panel": "#1a1a1a",
"_dark_bg_element": "#242424",
"_dark_border": "#333333",
"_dark_border_active": "#5a5a5a",
"_dark_border_subtle": "#242424",
"_dark_fg": "#d8d8d8",
"_dark_fg_accent": "#c8c8c8",
"_dark_fg_secondary": "#a8a8a8",
"_dark_fg_dim": "#888888",
"_dark_fg_muted": "#787878",
"_dark_fg_faint": "#585858",
"_dark_diff_added_bg": "#1f1f1f",
"_dark_diff_removed_bg": "#171717",
"_light_bg": "#f8f8f8",
"_light_bg_panel": "#eeeeee",
"_light_bg_element": "#e4e4e4",
"_light_border": "#d4d4d4",
"_light_border_active": "#a0a0a0",
"_light_border_subtle": "#e4e4e4",
"_light_fg": "#383838",
"_light_fg_accent": "#282828",
"_light_fg_strong": "#181818",
"_light_fg_secondary": "#585858",
"_light_fg_dim": "#686868",
"_light_fg_muted": "#808080",
"_light_fg_faint": "#a0a0a0",
"_light_diff_added_bg": "#e4e4e4",
"_light_diff_removed_bg": "#ececec"
},
"theme": {
"primary": { "dark": "_dark_fg", "light": "_light_fg" },
"secondary": { "dark": "_dark_fg_secondary", "light": "_light_fg_dim" },
"accent": { "dark": "_dark_fg_accent", "light": "_light_fg_accent" },
"error": { "dark": "_dark_fg", "light": "_light_fg_strong" },
"warning": { "dark": "_dark_fg_secondary", "light": "_light_fg_secondary" },
"success": { "dark": "_dark_fg_dim", "light": "_light_fg_dim" },
"info": { "dark": "_dark_fg_muted", "light": "_light_fg_muted" },
"text": { "dark": "_dark_fg", "light": "_light_fg" },
"textMuted": { "dark": "_dark_fg_muted", "light": "_light_fg_muted" },
"background": { "dark": "_dark_bg", "light": "_light_bg" },
"backgroundPanel": { "dark": "_dark_bg_panel", "light": "_light_bg_panel" },
"backgroundElement": { "dark": "_dark_bg_element", "light": "_light_bg_element" },
"border": { "dark": "_dark_border", "light": "_light_border" },
"borderActive": { "dark": "_dark_border_active", "light": "_light_border_active" },
"borderSubtle": { "dark": "_dark_border_subtle", "light": "_light_border_subtle" },
"diffAdded": { "dark": "_dark_fg", "light": "_light_fg_strong" },
"diffRemoved": { "dark": "_dark_fg_muted", "light": "_light_fg_faint" },
"diffContext": { "dark": "_dark_fg_muted", "light": "_light_fg_muted" },
"diffHunkHeader": { "dark": "_dark_fg_secondary", "light": "_light_fg_dim" },
"diffHighlightAdded": { "dark": "_dark_fg", "light": "_light_fg_strong" },
"diffHighlightRemoved": { "dark": "_dark_fg_secondary", "light": "_light_fg_muted" },
"diffAddedBg": { "dark": "_dark_diff_added_bg", "light": "_light_diff_added_bg" },
"diffRemovedBg": { "dark": "_dark_diff_removed_bg", "light": "_light_diff_removed_bg" },
"diffContextBg": { "dark": "_dark_bg", "light": "_light_bg" },
"diffLineNumber": { "dark": "_dark_fg_faint", "light": "_light_fg_faint" },
"diffAddedLineNumberBg": { "dark": "_dark_diff_added_bg", "light": "_light_diff_added_bg" },
"diffRemovedLineNumberBg": { "dark": "_dark_diff_removed_bg", "light": "_light_diff_removed_bg" },
"markdownText": { "dark": "_dark_fg", "light": "_light_fg" },
"markdownHeading": { "dark": "_dark_fg", "light": "_light_fg_strong" },
"markdownLink": { "dark": "_dark_fg_accent", "light": "_light_fg_secondary" },
"markdownLinkText": { "dark": "_dark_fg_secondary", "light": "_light_fg_dim" },
"markdownCode": { "dark": "_dark_fg_accent", "light": "_light_fg_secondary" },
"markdownBlockQuote": { "dark": "_dark_fg_muted", "light": "_light_fg_muted" },
"markdownEmph": { "dark": "_dark_fg_secondary", "light": "_light_fg_dim" },
"markdownStrong": { "dark": "_dark_fg", "light": "_light_fg_strong" },
"markdownHorizontalRule": { "dark": "_dark_border", "light": "_light_border" },
"markdownListItem": { "dark": "_dark_fg_accent", "light": "_light_fg_secondary" },
"markdownListEnumeration": { "dark": "_dark_fg_secondary", "light": "_light_fg_dim" },
"markdownImage": { "dark": "_dark_fg_secondary", "light": "_light_fg_dim" },
"markdownImageText": { "dark": "_dark_fg_muted", "light": "_light_fg_muted" },
"markdownCodeBlock": { "dark": "_dark_fg", "light": "_light_fg" },
"syntaxComment": { "dark": "_dark_fg_muted", "light": "_light_fg_muted" },
"syntaxKeyword": { "dark": "_dark_fg", "light": "_light_fg_strong" },
"syntaxFunction": { "dark": "_dark_fg_accent", "light": "_light_fg" },
"syntaxVariable": { "dark": "_dark_fg", "light": "_light_fg" },
"syntaxString": { "dark": "_dark_fg_dim", "light": "_light_fg_dim" },
"syntaxNumber": { "dark": "_dark_fg_secondary", "light": "_light_fg_secondary" },
"syntaxType": { "dark": "_dark_fg_accent", "light": "_light_fg_secondary" },
"syntaxOperator": { "dark": "_dark_fg_dim", "light": "_light_fg_dim" },
"syntaxPunctuation": { "dark": "_dark_fg_muted", "light": "_light_fg_muted" }
}
}
@@ -0,0 +1,68 @@
{
"$schema": "https://opencode.ai/theme.json",
"defs": {
"monoBackground": "#111111",
"monoSurface": "#1c1c1c",
"monoDiffAdded": "#191919",
"monoDiffRemoved": "#262626",
"monoForeground": "#d8d8d8"
},
"theme": {
"primary": "monoForeground",
"secondary": "monoForeground",
"accent": "monoForeground",
"error": "monoForeground",
"warning": "monoForeground",
"success": "monoForeground",
"info": "monoForeground",
"text": "monoForeground",
"textMuted": "monoForeground",
"background": "monoBackground",
"backgroundPanel": "monoSurface",
"backgroundElement": "monoSurface",
"border": "monoForeground",
"borderActive": "monoForeground",
"borderSubtle": "monoForeground",
"diffAdded": "monoForeground",
"diffRemoved": "monoForeground",
"diffContext": "monoForeground",
"diffHunkHeader": "monoForeground",
"diffHighlightAdded": "monoForeground",
"diffHighlightRemoved": "monoForeground",
"diffAddedBg": "monoDiffAdded",
"diffRemovedBg": "monoDiffRemoved",
"diffContextBg": "monoBackground",
"diffLineNumber": "monoForeground",
"diffAddedLineNumberBg": "monoDiffAdded",
"diffRemovedLineNumberBg": "monoDiffRemoved",
"markdownText": "monoForeground",
"markdownHeading": "monoForeground",
"markdownLink": "monoForeground",
"markdownLinkText": "monoForeground",
"markdownCode": "monoForeground",
"markdownBlockQuote": "monoForeground",
"markdownEmph": "monoForeground",
"markdownStrong": "monoForeground",
"markdownHorizontalRule": "monoForeground",
"markdownListItem": "monoForeground",
"markdownListEnumeration": "monoForeground",
"markdownImage": "monoForeground",
"markdownImageText": "monoForeground",
"markdownCodeBlock": "monoForeground",
"syntaxComment": "monoForeground",
"syntaxKeyword": "monoForeground",
"syntaxFunction": "monoForeground",
"syntaxVariable": "monoForeground",
"syntaxString": "monoForeground",
"syntaxNumber": "monoForeground",
"syntaxType": "monoForeground",
"syntaxOperator": "monoForeground",
"syntaxPunctuation": "monoForeground"
}
}
@@ -0,0 +1,68 @@
{
"$schema": "https://opencode.ai/theme.json",
"defs": {
"monoBackground": "#eeeeee",
"monoSurface": "#e3e3e3",
"monoDiffAdded": "#e7e7e7",
"monoDiffRemoved": "#d8d8d8",
"monoForeground": "#383838"
},
"theme": {
"primary": "monoForeground",
"secondary": "monoForeground",
"accent": "monoForeground",
"error": "monoForeground",
"warning": "monoForeground",
"success": "monoForeground",
"info": "monoForeground",
"text": "monoForeground",
"textMuted": "monoForeground",
"background": "monoBackground",
"backgroundPanel": "monoSurface",
"backgroundElement": "monoSurface",
"border": "monoForeground",
"borderActive": "monoForeground",
"borderSubtle": "monoForeground",
"diffAdded": "monoForeground",
"diffRemoved": "monoForeground",
"diffContext": "monoForeground",
"diffHunkHeader": "monoForeground",
"diffHighlightAdded": "monoForeground",
"diffHighlightRemoved": "monoForeground",
"diffAddedBg": "monoDiffAdded",
"diffRemovedBg": "monoDiffRemoved",
"diffContextBg": "monoBackground",
"diffLineNumber": "monoForeground",
"diffAddedLineNumberBg": "monoDiffAdded",
"diffRemovedLineNumberBg": "monoDiffRemoved",
"markdownText": "monoForeground",
"markdownHeading": "monoForeground",
"markdownLink": "monoForeground",
"markdownLinkText": "monoForeground",
"markdownCode": "monoForeground",
"markdownBlockQuote": "monoForeground",
"markdownEmph": "monoForeground",
"markdownStrong": "monoForeground",
"markdownHorizontalRule": "monoForeground",
"markdownListItem": "monoForeground",
"markdownListEnumeration": "monoForeground",
"markdownImage": "monoForeground",
"markdownImageText": "monoForeground",
"markdownCodeBlock": "monoForeground",
"syntaxComment": "monoForeground",
"syntaxKeyword": "monoForeground",
"syntaxFunction": "monoForeground",
"syntaxVariable": "monoForeground",
"syntaxString": "monoForeground",
"syntaxNumber": "monoForeground",
"syntaxType": "monoForeground",
"syntaxOperator": "monoForeground",
"syntaxPunctuation": "monoForeground"
}
}
+71
View File
@@ -0,0 +1,71 @@
#!/bin/bash
# Tmux Zen Mode - Center your terminal
# Usage: tmux-zen.sh [width]
CENTER_WIDTH="${1:-120}"
CURRENT_PANE=$(tmux display-message -p '#{pane_id}')
PANE_COUNT=$(tmux display-message -p '#{window_panes}')
WINDOW_WIDTH=$(tmux display-message -p '#{window_width}')
# Check if we're already in zen mode
is_zen_mode() {
[ "$PANE_COUNT" -eq 3 ]
}
create_zen() {
if is_zen_mode; then
return
fi
if [ "$PANE_COUNT" -ne 1 ]; then
tmux display-message "Zen mode: single pane only"
return
fi
TOTAL_MARGIN=$((WINDOW_WIDTH - CENTER_WIDTH - 2))
if [ "$TOTAL_MARGIN" -lt 10 ]; then
tmux display-message "Zen mode: window too narrow"
return
fi
SIDE_WIDTH=$((TOTAL_MARGIN / 2))
tmux split-window -hdt "$CURRENT_PANE" "cat"
tmux split-window -hbdt "$CURRENT_PANE" "cat"
tmux select-layout even-horizontal
tmux resize-pane -t "$CURRENT_PANE" -x "$CENTER_WIDTH"
for pane in $(tmux list-panes -F '#{pane_id}'); do
if [ "$pane" != "$CURRENT_PANE" ]; then
pane_command=$(tmux display-message -p -t "$pane" '#{pane_current_command}')
if [ "$pane_command" = "cat" ]; then
tmux resize-pane -t "$pane" -x "$SIDE_WIDTH"
fi
fi
done
}
destroy_zen() {
if ! is_zen_mode; then
return
fi
for pane in $(tmux list-panes -F '#{pane_id}'); do
pane_command=$(tmux display-message -p -t "$pane" '#{pane_current_command}')
if [ "$pane_command" = "cat" ]; then
tmux kill-pane -t "$pane"
fi
done
}
toggle_zen() {
if is_zen_mode; then
destroy_zen
else
create_zen
fi
}
toggle_zen
+7
View File
@@ -1,5 +1,7 @@
# set-option -g default-command "exec /usr/local/bin/bash --login" # set-option -g default-command "exec /usr/local/bin/bash --login"
set-option -g status-style bg=default set-option -g status-style bg=default
bind s choose-tree -Zs -O name
set-option -g status-position top
# Enable mouse # Enable mouse
set -g mouse on set -g mouse on
@@ -9,6 +11,9 @@ set -g prefix C-space
unbind-key C-b unbind-key C-b
bind-key C-space send-prefix bind-key C-space send-prefix
# Sort the session picker by name
bind s choose-tree -Zs -O name
# Set new panes to open in current directory # Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}" bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}" bind '"' split-window -c "#{pane_current_path}"
@@ -77,3 +82,5 @@ bind -T off-prefix O \
bind -T off-prefix Any \ bind -T off-prefix Any \
send-keys C-Space \;\ send-keys C-Space \;\
send-keys send-keys
bind z run-shell "~/.config/tmux/scripts/tmux-zen.sh 120"