Compare commits

...

17 commits

Author SHA1 Message Date
mitchell b2510c45b9 m-cloud changes 2025-08-10 17:48:32 -04:00
mitchell 44780e9a9e chore: One binding for nvim and update deps 2025-08-10 17:15:23 -04:00
mitchell 0df65efe7c chore: Update adr alias and codecompanion configuration 2025-05-29 17:27:39 -04:00
mitchell (aider) 256a64d8cf feat: remove redundant name field from adapter configs 2025-05-21 21:05:15 -04:00
mitchell bac32bec19 refactor: improve adapter creation function readability 2025-05-21 20:55:55 -04:00
mitchell (aider) ef8b5dc97f refactor: Use helper function to create adapters 2025-05-21 20:43:06 -04:00
mitchell f8d58198c0 feat: add ollama and gemini_pro adapters 2025-05-21 19:38:17 -04:00
mitchell 184dad82e0 Improve AI configuration and key management
- Remove unnecessary model options from `adr` function.
- Update Anthropics key path in `aikeys` function.
- Refactor CodeCompanion adapters to use specific Gemini models with different reasoning efforts.
- Add gitignore for .aider* files.
2025-05-19 19:48:40 -04:00
mitchell 73c5b0b7d7 Add AI helper functions, update plugins, and codecompanion updates 2025-05-19 16:01:39 -04:00
mitchell 1517f56c86 Breakup Neovim config into Lua modules 2025-05-11 18:49:32 -04:00
mitchell 3179a5b48d Cleanup init.nvim and tweak ai models, aa alias to .gitconfig 2025-05-11 04:29:28 -04:00
mitchell e511802ea3 Update fish aliases & keybinds, update git config, update Neovim config
Neovim:
- Replace typescript-tools with ts_ls
- Add Markview
- Modify Neo-tree keybinds
- Modify CodeCompanion models
- Add Svelte linting/fixing
2025-05-08 15:12:45 -04:00
mitchell 33da7ca122 Add kp alias, improve Neovim keybinds, modify aisearch function 2025-04-18 03:33:32 -04:00
mitchell 38d5c4a29c AI model changes 2025-04-14 08:25:32 -04:00
mitchell 44697ec5bf Refactor vimscript into lua 2025-04-14 06:58:16 -04:00
mitchell b55aab8a89 Migrate Neovim to lazy.nvim and update dotfiles
- Neovim:
    - Migrate from vim-plug to lazy.nvim.
    - Refactor config (`init.lua`, `config.vim`).
    - Replace Coq with blink.cmp, add CodeCompanion.
- Fish:
    - Add aliases (`cl`, `ai`), env vars (`ANDROID_HOME`, `PYENV`).
    - Update keybindings and conditional tool initialization (starship, zoxide, fzf, pyenv).
    - Refine ASDF/Homebrew setup.
- Git: Add aliases (`rs`, `rss`, `ap`).
- Other: Update SKHD bindings and WezTerm path/settings.
2025-04-14 01:30:04 -04:00
mitchell 4d4e715cb1 Switch from leap to flash.nvim and add biome to ALE config 2024-07-27 13:55:08 -04:00
28 changed files with 801 additions and 3236 deletions

View file

@ -2,18 +2,11 @@ function configure_fish
# Determine OS
set uname (uname)
# Set umask
umask 077
# Begin profile init
# (These functions are defined in the functions/ directory.)
define_global_variables
import_sources $uname
define_aliases $uname
ssh_agent_startup
starship init fish | source
zoxide init fish | source
fzf --fish | source
end
configure_fish

View file

@ -0,0 +1,12 @@
function aikeys -d 'Set AI API keys' -a service
switch $service
case gemini
echo "set -lx GEMINI_API_KEY (kp Keys/google-aistudio-key -a Password)"
case openai
echo "set -lx OPENAI_API_KEY (kp Keys/openai-general -a Password)"
case anthro
echo "set -lx ANTHROPIC_API_KEY (kp Keys/anthropic-bespin-nvim -a Password)"
case work
echo "set -lx OPENAI_API_KEY (kp Keys/openai-mystro -a Password)"
end
end

View file

@ -0,0 +1,4 @@
function aisearch --wraps aichat
set -lx AICHAT_PATCH_GEMINI_CHAT_COMPLETIONS '{".*":{"body":{"tools":[{"google_search":{}}]}}}'
aichat -r search -s $argv
end

View file

@ -1,5 +1,7 @@
function define_aliases -a uname -d 'Defines aliases for commonly used commands'
alias q exit
alias cl clear
alias ls lsd
alias rcp 'rsync -aP'
alias vg vagrant
alias tf terraform
@ -11,9 +13,14 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
alias age-d 'age --decrypt --identity ~/.secrets/id_ed25519'
alias age-e 'age --armor --recipient (cat ~/.secrets/id_ed25519.pub)'
alias age-k 'age --decrypt --identity ~/.secrets/id_ed25519 ~/.secrets/age_keys.age'
alias kp 'keepassxc-cli show -k ~/.secrets/mjfs_keepass_key_file ~/.passwords/mjfs.kdbx'
alias bb 'bun --bun'
alias pn pnpm
alias nv 'neovide --fork; and clear'
alias hx helix
alias ai aichat
alias ais aisearch
alias adr aider
switch "$uname"
case Linux

View file

@ -21,7 +21,13 @@ function define_global_variables -d 'Defines all and exclusively globally export
set -gx LIBVIRT_DEFAULT_URI 'qemu:///system'
set -gx ANDROID_HOME $HOME/Android/Sdk
if test (uname) = "Darwin"
set -gx ANDROID_HOME $HOME/Library/Android/Sdk
else
set -gx ANDROID_HOME $HOME/Android/Sdk
end
set -gx PYENV_ROOT $HOME/.pyenv
fish_add_path $GOBIN \
$HOME/.local/bin \
@ -31,6 +37,7 @@ function define_global_variables -d 'Defines all and exclusively globally export
$HOME/.cargo/bin \
$HOME/.dotnet/tools \
$BUN_INSTALL/bin \
$PYENV_ROOT/bin \
$ANDROID_HOME/emulator \
$ANDROID_HOME/platform-tools
end

View file

@ -1,12 +1,10 @@
function fish_user_key_bindings
bind --mode insert jj "if commandline -P; commandline -f cancel; else; set fish_bind_mode default; commandline -f backward-char repaint-mode; end"
bind --mode insert ,a 'ssh_add; commandline -f repaint'
bind --mode insert ,p 'nvim +"Telescope git_files"; commandline -f repaint'
bind --mode insert ,f 'nvim +"Telescope find_files"; commandline -f repaint'
bind --mode insert ,n 'nvim .; commandline -f repaint'
bind --mode insert ,s 'sysz; commandline -f repaint'
bind --mode insert ,z 'zi; commandline -f repaint'
bind --mode insert ,t 'fzf-file-widget'
bind --mode insert ,r 'fzf-history-widget'
bind --mode insert ,c 'fzf-cd-widget'
bind --mode insert comma,a 'ssh_add; commandline -f repaint'
bind --mode insert .,comma 'nvim; commandline -f repaint'
bind --mode insert comma,s 'sysz; commandline -f repaint'
bind --mode insert comma,z 'zi; commandline -f repaint'
bind --mode insert comma,t 'fzf-file-widget'
bind --mode insert comma,r 'fzf-history-widget'
bind --mode insert comma,c 'fzf-cd-widget'
bind --mode insert comma,l 'clear; commandline -f repaint'
end

View file

@ -6,6 +6,14 @@ function import_sources -a uname -d 'Loads any additional fish files needed at i
and mkdir -p ~/.config/fish/completions
and ln -sf ~/.asdf/completions/asdf.fish ~/.config/fish/completions
test -e /opt/homebrew/bin/brew
and /opt/homebrew/bin/brew shellenv | source -
command -q starship; and starship init fish | source
command -q zoxide; and zoxide init fish | source
command -q fzf; and fzf --fish | source
command -q pyenv; and pyenv init - | source
# The next line updates PATH for the Google Cloud SDK.
# if test -f '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; source '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; end
end

View file

@ -1,5 +1,5 @@
function ssh_agent_startup -d 'Start ssh agent and set env vars'
if test -z "$SSH_AUTH_SOCK"; and test -z "$SSH_AGENT_PID"
if test -z "$SSH_AUTH_SOCK"; and test -z "$SSH_AGENT_PID"; and test -z "$SSH_CLIENT"
eval (ssh-agent -c) >/dev/null 2>&1
end
end

File diff suppressed because it is too large Load diff

View file

@ -1,116 +0,0 @@
set colorcolumn=100
set cursorline
set showmatch
set hlsearch
set mouse=a
set mousemodel=extend
set number
set noshowmode
set background=dark
set nowrap
set tabstop=2
set shiftwidth=0
set expandtab
set textwidth=100
set cmdheight=2
set ignorecase
set smartcase
set shortmess+=c
set foldmethod=expr
set foldexpr=nvim_treesitter#foldexpr()
set nofoldenable " Disable folding at startup.
set termguicolors
inoremap jj <Esc>
let mapleader = ','
nnoremap <leader>f <cmd>ALEFix<cr>
nnoremap <leader>a <cmd>ALEToggle<cr>
nnoremap <leader>nn <cmd>Neotree toggle show git_status<cr>
nnoremap <leader>np <cmd>Neotree float reveal_force_cwd<cr>
nnoremap <leader>t <cmd>Telescope<cr>
nnoremap <leader>p <cmd>Telescope git_files<cr>
nnoremap <C-p> <cmd>Telescope find_files<cr>
nnoremap <leader>s <cmd>Telescope treesitter<cr>
nnoremap <leader>ga <cmd>Telescope grep_string<cr>
nnoremap <leader>gg <cmd>Telescope lsp_definitions<cr>
nnoremap <leader>gr <cmd>Telescope lsp_references<cr>
nnoremap <leader>gi <cmd>Telescope lsp_implementations<cr>
nnoremap <leader>gd <cmd>Telescope lsp_type_definitions<cr>
nnoremap <leader>o <cmd>SymbolsOutline<cr>
nnoremap <leader>z <cmd>ZenMode<cr>
nnoremap <leader>l <cmd>Twilight<cr>
nnoremap <leader>c <cmd>COQnow<cr>
nnoremap <silent><leader>j <cmd>BufferLinePick<cr>
nnoremap <silent><leader>J <cmd>BufferLinePickClose<cr>
tnoremap <Esc> <C-\><C-n>
" Allows you to use // in order to search for the visually selected text
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
colorscheme kanagawa
let g:neovide_scale_factor = 0.75
let g:neovide_transparency = 0.7
let g:neovide_cursor_vfx_mode = 'sonicboom'
let g:ale_linters_explicit = 1
let g:ale_completion_enabled = 0
let g:pencil#map#suspend_af = 'K'
let g:ale_linters = {
\ 'javascript': ['eslint', 'stylelint'],
\ 'typescript': ['eslint', 'stylelint'],
\ 'javascriptreact': ['eslint', 'stylelint'],
\ 'typescriptreact': ['eslint', 'stylelint'],
\ 'go': ['golint', 'go vet'],
\ 'vue': ['eslint', 'stylelint'],
\ 'make': ['checkmake'],
\ 'proto': ['protoc-gen-lint'],
\ 'dockerfile': ['hadolint'],
\ 'dart': ['dartanalyzer'],
\ 'fish': ['fish'],
\ 'vim': ['vint'],
\ 'elixir': ['credo'],
\ 'cs': ['OmniSharp'],
\ 'terraform': ['tflint'],
\ 'ruby': ['rubocop'],
\ 'css': ['stylelint'],
\ 'sh': ['shellcheck'],
\ 'python': ['pylint'],
\ }
let g:ale_fixers = {
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
\ 'graphql': ['prettier'],
\ 'javascript': ['prettier'],
\ 'typescript': ['prettier'],
\ 'javascriptreact': ['prettier'],
\ 'typescriptreact': ['prettier'],
\ 'vue': ['prettier'],
\ 'css': ['prettier'],
\ 'yaml': ['prettier'],
\ 'json': ['prettier'],
\ 'dart': ['dartfmt'],
\ 'html': ['prettier'],
\ 'markdown': ['prettier'],
\ 'make': ['remove_trailing_lines', 'trim_whitespace'],
\ 'elixir': ['mix_format'],
\ 'terraform': ['terraform'],
\ 'ruby': ['rubocop'],
\ 'python': ['black'],
\ 'lua': ['stylua'],
\ }
augroup ft_fish
au!
autocmd FileType fish set tabstop=4
augroup END
augroup term
au!
autocmd TermOpen * set nonumber
augroup END

View file

@ -1,219 +1,37 @@
local plug = vim.fn["plug#"]
vim.call("plug#begin")
plug("w0rp/ale")
plug("tpope/vim-eunuch")
plug("tpope/vim-surround")
plug("edkolev/tmuxline.vim")
plug("airblade/vim-gitgutter")
plug("reedes/vim-pencil", { ["on"] = { "HardPencil", "SoftPencil" } })
plug("tpope/vim-fugitive", { ["on"] = { "G", "Git" }, ["for"] = "gitcommit" })
plug("MunifTanjim/nui.nvim")
plug("rcarriga/nvim-notify")
plug("nvim-lua/plenary.nvim")
plug("nvim-tree/nvim-web-devicons")
plug("ms-jpq/coq_nvim", { ["branch"] = "coq" })
plug("ms-jpq/coq.artifacts", { ["branch"] = "artifacts" })
plug("folke/noice.nvim")
plug("ggandor/leap.nvim")
plug("folke/zen-mode.nvim")
plug("folke/twilight.nvim")
plug("neovim/nvim-lspconfig")
plug("rebelot/kanagawa.nvim")
plug("akinsho/bufferline.nvim")
plug("nvim-lualine/lualine.nvim")
plug("nvim-neo-tree/neo-tree.nvim")
plug("pmizio/typescript-tools.nvim")
plug("simrat39/symbols-outline.nvim")
plug("nvim-telescope/telescope.nvim")
plug("nvim-telescope/telescope-fzf-native.nvim", { ["do"] = "make" })
plug("nvim-treesitter/nvim-treesitter", { ["do"] = ":TSUpdate" })
plug("nvim-treesitter/nvim-treesitter-context")
vim.call("plug#end")
vim.opt.guifont = "JetBrainsMono Nerd Font:h13"
vim.g.coq_settings = { auto_start = true }
require("neo-tree").setup()
require("kanagawa").setup({
transparent = not vim.g.neovide,
})
require("bufferline").setup({
options = {
separator_style = "slope",
offsets = {
{
filetype = "neo-tree",
text = "explorer",
highlight = "Directory",
separator = true, -- use a "true" to enable the default, or set your own character
},
},
},
})
require("lualine").setup({
extensions = {
"neo-tree",
"symbols-outline",
},
})
require("zen-mode").setup({
window = {
backdrop = 1,
},
})
require("symbols-outline").setup({
autofold_depth = 2,
})
require("leap").create_default_mappings()
require("notify").setup({
background_colour = "#000000",
})
require("telescope").setup()
require("telescope").load_extension("fzf")
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,
},
},
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
},
views = {
notify = {
replace = true,
merge = true,
},
},
})
require("nvim-treesitter.configs").setup({
-- A list of parser names, or "all" (the four listed parsers should always be installed)
ensure_installed = {
"c",
"lua",
"vim",
"regex",
"fish",
"typescript",
"javascript",
"tsx",
"go",
"elixir",
"vue",
"groovy",
},
-- Automatically install missing parsers when entering buffer
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
auto_install = false,
highlight = {
enable = true,
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
-- Using this option may slow down your editor, and you may see some duplicate highlights.
-- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn", -- set to `false` to disable one of the mappings
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
indent = {
enable = true,
},
})
-- LSP Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = true }
vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
local bufopts = { noremap = true, silent = true, buffer = bufnr }
vim.keymap.set("n", "<leader>h", vim.lsp.buf.hover, bufopts)
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts)
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set("n", "<leader>m", vim.lsp.buf.code_action, bufopts)
vim.keymap.set("n", "<leader>r", vim.lsp.buf.rename, bufopts)
vim.keymap.set("n", "<leader>F", function()
vim.lsp.buf.format({ async = true })
end, bufopts)
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
local lspconfig = require("lspconfig")
local coq = require("coq")
-- Set leader key before lazy setup
vim.g.mapleader = ","
local lsp_flags = {
-- This is the default in Nvim 0.7+
debounce_text_changes = 150,
}
-- Unused for now
local vue_plugin_location = vim.fn.expand("$HOME/.bun/install/global/node_modules/@vue/language-server")
require("typescript-tools").setup(coq.lsp_ensure_capabilities({
on_attach = on_attach,
flags = lsp_flags,
filetypes = {
"typescript",
"javascript",
"javascriptreact",
"typescriptreact",
"vue",
-- Plugin specifications
require("lazy").setup({
install = { colorscheme = { "kanagawa" } },
spec = {
{ import = "plugins.ui" },
{ import = "plugins.editor" },
{ import = "plugins.lsp_completion" },
{ import = "plugins.navigation" },
{ import = "plugins.treesitter" },
{ import = "plugins.tools" },
},
settings = {
tsserver_plugins = {
"@vue/typescript-plugin",
},
},
}))
})
local servers = { "volar", "elixirls", "gopls", "pylsp" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup(coq.lsp_ensure_capabilities({
on_attach = on_attach,
flags = lsp_flags,
}))
end
vim.cmd("source ~/.config/nvim/config.vim")
-- Load core configurations
require("core.options")
require("core.keymaps")
require("core.autocmds")

View file

@ -0,0 +1,30 @@
{
"ale": { "branch": "master", "commit": "80ff84db84ba172bfcdee5e2748924bb2249134b" },
"blink.cmp": { "branch": "main", "commit": "729d023bb9870a55e1b309a12d5c503fb800a7e8" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"codecompanion.nvim": { "branch": "main", "commit": "fa31ecd06ffae66b19ecb143ea39f62bc5ba6679" },
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"kanagawa.nvim": { "branch": "master", "commit": "debe91547d7fb1eef34ce26a5106f277fbfdd109" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"markview.nvim": { "branch": "main", "commit": "02810964cc288065c2919ea7a8d41e72f17ccd8a" },
"mini.diff": { "branch": "main", "commit": "9bccf260cdb9308223f47a29fb4cb91c817a9349" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f481de16a0eb59c985abac8985e3f2e2f75b4875" },
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-lspconfig": { "branch": "master", "commit": "99d3a0f26bfe402f45257c1398287aef252cbe2d" },
"nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"tmuxline.vim": { "branch": "master", "commit": "4119c553923212cc67f4e135e6f946dc3ec0a4d6" },
"twilight.nvim": { "branch": "main", "commit": "1584c0b0a979b71fd86b18d302ba84e9aba85b1b" },
"vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" },
"vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" },
"vim-pencil": { "branch": "master", "commit": "6d70438a8886eaf933c38a7a43a61adb0a7815ed" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"zen-mode.nvim": { "branch": "main", "commit": "863f150ca321b3dd8aa1a2b69b5f411a220e144f" }
}

View file

@ -0,0 +1,20 @@
-- lua/core/autocmds.lua
local augroup = vim.api.nvim_create_augroup
local autocmd = vim.api.nvim_create_autocmd
-- Fish filetype settings
augroup("FishSettings", { clear = true })
autocmd("FileType", {
pattern = "fish",
command = "setlocal tabstop=4",
group = "FishSettings",
})
-- Terminal settings
augroup("TerminalSettings", { clear = true })
autocmd("TermOpen", {
pattern = "*",
command = "setlocal nonumber norelativenumber",
group = "TerminalSettings",
})

View file

@ -0,0 +1,22 @@
-- lua/core/keymaps.lua
local map = vim.keymap.set
local map_opts_silent = { noremap = true, silent = true }
-- General Mappings
map("i", "jj", "<Esc>", { noremap = true, silent = true, desc = "Escape Insert Mode" })
map("t", "<Esc>", "<C-\\><C-n>", { noremap = true, silent = true, desc = "Escape Terminal Mode" })
map("v", "//", function()
vim.cmd("normal! y")
local sel = vim.fn.getreg('"')
local pattern = vim.fn.escape(sel, "/\\")
vim.fn.setreg("/", "\\V" .. pattern)
vim.cmd("normal! n")
end, { noremap = true, silent = true, desc = "Search for Visual Selection" })
-- LSP Diagnostic Mappings
local diag_opts = { silent = true }
map("n", "<leader>d", vim.diagnostic.open_float, diag_opts)
map("n", "[d", vim.diagnostic.goto_prev, diag_opts)
map("n", "]d", vim.diagnostic.goto_next, diag_opts)
map("n", "<space>q", vim.diagnostic.setloclist, diag_opts)

View file

@ -0,0 +1,28 @@
-- lua/core/options.lua
vim.opt.guifont = "JetBrainsMono Nerd Font:h13"
vim.opt.colorcolumn = "100"
vim.opt.cursorline = true
vim.opt.showmatch = true
vim.opt.number = true
vim.opt.showmode = false
vim.opt.background = "dark"
vim.opt.wrap = false
vim.opt.cmdheight = 1
vim.opt.shortmess:append("c")
vim.opt.termguicolors = true
vim.opt.mouse = "a"
vim.opt.mousemodel = "extend"
vim.opt.tabstop = 2
vim.opt.shiftwidth = 0
vim.opt.expandtab = true
vim.opt.textwidth = 100
vim.opt.hlsearch = true
vim.opt.ignorecase = true
vim.opt.smartcase = true
if vim.g.neovide then
vim.g.neovide_scale_factor = 0.75
vim.g.neovide_transparency = 0.7
vim.g.neovide_cursor_vfx_mode = "sonicboom"
end

View file

@ -0,0 +1,105 @@
-- lua/plugins/editor.lua
return {
"tpope/vim-fugitive",
"tpope/vim-eunuch",
"tpope/vim-surround",
{
"w0rp/ale",
event = "VeryLazy",
keys = {
{ "<leader>f", "<cmd>ALEFix<cr>", desc = "ALE Fix", silent = true },
{ "<leader>a", "<cmd>ALEToggle<cr>", desc = "ALE Toggle", silent = true },
},
config = function()
vim.g.ale_linters_explicit = 1
vim.g.ale_completion_enabled = 0 -- Using blink.cmp for completion
vim.g.ale_linters = {
javascript = { "eslint", "stylelint", "biome" },
typescript = { "eslint", "stylelint", "biome" },
javascriptreact = { "eslint", "stylelint", "biome" },
typescriptreact = { "eslint", "stylelint", "biome" },
svelte = { "eslint" },
go = { "golint", "go vet" },
vue = { "eslint", "stylelint", "biome" },
make = { "checkmake" },
proto = { "protoc-gen-lint" },
dockerfile = { "hadolint" },
dart = { "dartanalyzer" },
fish = { "fish" },
vim = { "vint" },
elixir = { "credo" },
cs = { "OmniSharp" },
terraform = { "tflint" },
ruby = { "rubocop" },
css = { "stylelint", "biome" },
sh = { "shellcheck" },
python = { "pylint" },
}
vim.g.ale_fixers = {
go = { "goimports", "remove_trailing_lines", "trim_whitespace" },
graphql = { "prettier" },
javascript = { "prettier", "biome" },
typescript = { "prettier", "biome" },
javascriptreact = { "prettier", "biome" },
typescriptreact = { "prettier", "biome" },
svelte = { "prettier" },
vue = { "prettier", "biome" },
css = { "prettier", "biome" },
yaml = { "prettier", "biome" },
json = { "prettier", "biome" },
dart = { "dartfmt" },
html = { "prettier", "biome" },
markdown = { "prettier", "biome" },
make = { "remove_trailing_lines", "trim_whitespace" },
elixir = { "mix_format" },
terraform = { "terraform" },
ruby = { "rubocop" },
python = { "black" },
lua = { "stylua" },
}
end,
},
{
"echasnovski/mini.diff",
version = false,
lazy = false,
opts = {},
keys = {
{
"<leader>i",
function()
require("mini.diff").toggle_overlay()
end,
desc = "Mini.diff overlay",
silent = true,
},
},
},
{
"reedes/vim-pencil",
cmd = { "HardPencil", "SoftPencil" },
config = function()
vim.g["pencil#map#suspend_af"] = "K"
end,
},
{
"folke/zen-mode.nvim",
opts = {
window = { backdrop = 0.95, options = { number = false } },
plugins = { twilight = { enabled = false } },
},
keys = {
{ "<leader>z", "<cmd>ZenMode<cr>", desc = "Zen Mode", silent = true },
},
},
{
"folke/twilight.nvim",
opts = {},
keys = {
{ "<leader>l", "<cmd>Twilight<cr>", desc = "Twilight", silent = true },
},
},
}

View file

@ -0,0 +1,70 @@
-- lua/plugins/lsp_completion.lua
return {
{
"saghen/blink.cmp",
dependencies = { "rafamadriz/friendly-snippets" },
version = "1.*",
opts = {},
opts_extend = { "sources.default" },
},
{
"neovim/nvim-lspconfig",
dependencies = { "saghen/blink.cmp" },
config = function()
local on_attach = function(client, bufnr)
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
local bufopts = { silent = true, buffer = bufnr }
vim.keymap.set("n", "<leader>h", vim.lsp.buf.hover, bufopts)
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts)
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, bufopts)
vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, bufopts)
vim.keymap.set("n", "<leader>wl", function()
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
end, bufopts)
vim.keymap.set("n", "<leader>m", vim.lsp.buf.code_action, bufopts)
vim.keymap.set("n", "<leader>r", vim.lsp.buf.rename, bufopts)
vim.keymap.set("n", "<leader>F", function()
vim.lsp.buf.format({ async = true })
end, bufopts)
end
local capabilities = require("blink.cmp").get_lsp_capabilities()
local lsp_flags = { debounce_text_changes = 150 }
local vue_plugin_location = vim.fn.expand("$HOME/.bun/install/global/node_modules/@vue/typescript-plugin")
vim.lsp.config("ts_ls", {
on_attach = on_attach,
capabilities = capabilities,
flags = lsp_flags,
filetypes = { "javascript", "typescript", "javascriptreact", "typescriptreact", "vue" },
init_options = {
plugins = {
{
name = "@vue/typescript-plugin",
location = vue_plugin_location,
languages = { "javascript", "typescript", "vue" },
},
},
},
})
vim.lsp.enable("ts_ls")
require("lspconfig").volar.setup({
on_attach = on_attach,
capabilities = capabilities,
})
local servers = { "elixirls", "gopls", "pylsp", "svelte" }
for _, server_name in ipairs(servers) do
vim.lsp.config(server_name, {
on_attach = on_attach,
capabilities = capabilities,
flags = lsp_flags,
})
vim.lsp.enable(server_name)
end
end,
},
}

View file

@ -0,0 +1,111 @@
-- lua/plugins/navigation.lua
return {
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
"MunifTanjim/nui.nvim",
},
lazy = false,
opts = {},
keys = {
{
"<leader>nn",
"<cmd>Neotree left reveal_force_cwd<cr>",
desc = "Neo-tree Toggle Sidebar",
silent = true,
},
{
"<leader>nf",
"<cmd>Neotree float reveal_force_cwd<cr>",
desc = "Neo-tree Float",
silent = true,
},
},
},
{
"nvim-telescope/telescope.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons",
},
opts = {},
keys = {
{ "<leader>t", "<cmd>Telescope<cr>", desc = "Telescope", silent = true },
{ "<leader>p", "<cmd>Telescope git_files<cr>", desc = "Telescope Git Files", silent = true },
{ "<C-p>", "<cmd>Telescope find_files<cr>", desc = "Telescope Find Files", silent = true },
{ "<leader>s", "<cmd>Telescope treesitter<cr>", desc = "Telescope Treesitter", silent = true },
{ "<leader>gs", "<cmd>Telescope grep_string<cr>", desc = "Telescope Grep String", silent = true },
{ "<leader>gl", "<cmd>Telescope live_grep<cr>", desc = "Telescope Grep String", silent = true },
{ "<leader>gg", "<cmd>Telescope lsp_definitions<cr>", desc = "LSP Definitions", silent = true },
{ "<leader>gr", "<cmd>Telescope lsp_references<cr>", desc = "LSP References", silent = true },
{ "<leader>gi", "<cmd>Telescope lsp_implementations<cr>", desc = "LSP Implementations", silent = true },
{
"<leader>gd",
"<cmd>Telescope lsp_type_definitions<cr>",
desc = "LSP Type Definitions",
silent = true,
},
},
},
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
dependencies = {
"nvim-telescope/telescope.nvim",
},
config = function()
require("telescope").load_extension("fzf")
end,
},
{
"folke/flash.nvim",
event = "VeryLazy",
opts = {},
keys = {
{
"s",
mode = { "n", "x", "o" },
function()
require("flash").jump()
end,
desc = "Flash",
},
{
"S",
mode = { "n", "x", "o" },
function()
require("flash").treesitter()
end,
desc = "Flash Treesitter",
},
{
"r",
mode = "o",
function()
require("flash").remote()
end,
desc = "Remote Flash",
},
{
"R",
mode = { "o", "x" },
function()
require("flash").treesitter_search()
end,
desc = "Treesitter Search",
},
{
"<c-s>",
mode = { "c" },
function()
require("flash").toggle()
end,
desc = "Toggle Flash Search",
},
},
},
}

View file

@ -0,0 +1,90 @@
-- lua/plugins/tools.lua
local function create_adapter(adapter_type, name, opts)
return require("codecompanion.adapters").extend(adapter_type, {
name = name,
schema = opts.schema or {},
env = opts.env or {},
parameters = opts.parameters or {},
})
end
local adapter_configs = {
ollama = {
type = "ollama",
env = { url = "http://192.168.1.165:11434" },
parameters = { sync = true },
schema = { num_ctx = { default = 40960 } },
},
gemini_pro = {
type = "gemini",
schema = { model = { default = "gemini-2.5-pro-preview-05-06" } },
},
gemini_none = {
type = "gemini",
schema = {
model = { default = "gemini-2.5-flash-preview-05-20" },
reasoning_effort = { default = "none" },
temperature = { default = 0 },
},
},
gemini_high = {
type = "gemini",
schema = {
model = { default = "gemini-2.5-flash-preview-05-20" },
reasoning_effort = { default = "high" },
},
},
openai_high = {
type = "openai",
schema = {
model = { default = "o4-mini-2025-04-16" },
reasoning_effort = { default = "high" },
},
},
}
-- Dynamically generate adapter functions
local adapters = {}
for name, config in pairs(adapter_configs) do
adapters[name] = function()
return create_adapter(config.type, name, config)
end
end
return {
{
"olimorris/codecompanion.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"echasnovski/mini.diff",
},
opts = {
display = {
diff = { provider = "mini_diff" },
chat = {
show_settings = false,
window = { position = "right", opts = { number = false } },
},
},
strategies = {
chat = { adapter = "gemini_high" },
inline = { adapter = "gemini_none" },
cmd = { adapter = "gemini_none" },
},
adapters = adapters,
},
keys = {
{ "<leader>cc", "<cmd>CodeCompanionChat<cr>", desc = "CodeCompanion Chat", silent = true },
{
"<leader>cf",
"<cmd>CodeCompanionChat gemini_none<cr>",
desc = "CodeCompanion Chat (Fast)",
silent = true,
},
{ "<leader>ca", "<cmd>CodeCompanionActions<cr>", desc = "CodeCompanion Actions", silent = true },
{ "<leader>ci", ":CodeCompanion<space>", mode = { "n", "v" }, desc = "CodeCompanion Inline" },
},
},
}

View file

@ -0,0 +1,60 @@
-- lua/plugins/treesitter.lua
return {
{
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
opts = {
ensure_installed = {
"c",
"cpp",
"lua",
"vim",
"regex",
"bash",
"fish",
"typescript",
"javascript",
"tsx",
"svelte",
"go",
"elixir",
"vue",
"groovy",
"java",
"objc",
"hcl",
"terraform",
"yaml",
"json",
"markdown",
"markdown_inline",
},
auto_install = false,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
indent = {
enable = true,
},
},
init = function()
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
vim.opt.foldenable = false
end,
config = function(plugin, opts)
require("nvim-treesitter.configs").setup(opts)
end,
},
}

View file

@ -0,0 +1,90 @@
-- lua/plugins/ui.lua
return {
"edkolev/tmuxline.vim",
{
"rebelot/kanagawa.nvim",
lazy = false,
priority = 1000,
opts = { transparent = not vim.g.neovide },
init = function()
vim.cmd([[colorscheme kanagawa]])
end,
},
{
"akinsho/bufferline.nvim",
event = "VeryLazy",
version = "*",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
options = {
separator_style = "slope",
offsets = {
{
filetype = "neo-tree",
text = "explorer",
highlight = "Directory",
separator = true,
},
},
},
},
keys = {
{ "<leader>j", "<cmd>BufferLinePick<cr>", desc = "BufferLinePick", silent = true },
{ "<leader>J", "<cmd>BufferLinePickClose<cr>", desc = "BufferLinePickClose", silent = true },
},
},
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
extensions = {
"neo-tree",
"symbols-outline",
},
},
},
{
"rcarriga/nvim-notify",
opts = {
background_colour = "#000000",
},
},
{
"folke/noice.nvim",
event = "VeryLazy",
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
opts = {
lsp = {
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true,
},
},
presets = {
bottom_search = true,
command_palette = true,
long_message_to_split = true,
},
views = {
notify = {
replace = true,
merge = true,
},
},
},
},
{
"OXY2DEV/markview.nvim",
lazy = false,
dependencies = { "saghen/blink.cmp" },
opts = {
preview = {
icon_provider = "devicons",
filetypes = { "markdown", "codecompanion" },
ignore_buftypes = {},
},
},
},
}

View file

@ -1,6 +1,7 @@
[alias]
co = checkout
sco = restore --staged
sw = switch
rs = restore
rss = restore --staged
br = branch
cm = commit
st = status
@ -20,11 +21,11 @@
puff = pull --ff-only
merff = merge --ff-only
fa = fetch --all
pa = push --all
ap = add --patch
aa = add --all
[core]
editor = nvim
pager = delta
[color]
ui = auto
@ -37,15 +38,3 @@
[pull]
rebase = true
[interactive]
diffFilter = delta --color-only
[delta]
features = side-by-side line-numbers decorations
whitespace-error-style = 22 reverse
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.aider*

View file

@ -1,5 +1,5 @@
# open terminal
cmd - return : /usr/local/bin/wezterm-gui start
cmd - return : /Applications/WezTerm.app/Contents/MacOS/wezterm-gui
# open web browser
shift + cmd - return : /Applications/Firefox.app/Contents/MacOS/firefox
@ -50,8 +50,8 @@ cmd + alt - w : yabai -m space --destroy
# fast focus desktop
cmd + alt - x : yabai -m space --focus recent
cmd + alt - z : yabai -m space --focus prev
cmd + alt - c : yabai -m space --focus next
cmd - 0x21 : yabai -m space --focus prev
cmd - 0x1E : yabai -m space --focus next
cmd + alt - 1 : yabai -m space --focus 1
cmd + alt - 2 : yabai -m space --focus 2
cmd + alt - 3 : yabai -m space --focus 3

View file

@ -6,6 +6,12 @@ local is_darwin = function()
return wezterm.target_triple:find("darwin") ~= nil
end
if is_darwin() then
config.default_prog = { "/opt/homebrew/bin/fish", "-l" }
end
config.window_decorations = "RESIZE"
config.force_reverse_video_cursor = true
config.colors = {
foreground = "#dcd7ba",
@ -26,10 +32,9 @@ config.colors = {
indexed = { [16] = "#ffa066", [17] = "#ff5d62" },
}
config.window_background_opacity = 0.7
config.window_decorations = "RESIZE"
config.window_background_opacity = is_darwin() and 0.85 or 0.7
config.font_size = is_darwin() and 13 or 11
config.font_size = is_darwin() and 14 or 11
config.tab_bar_at_bottom = true
config.hide_tab_bar_if_only_one_tab = true

View file

@ -11,7 +11,6 @@ This repo contains my preferred configurations for:
- tmux
- git
- Wez's terminal
- Jetbrains vim plugin
- keepassxc
- bspwm (Linux)
- sxhkd (Linux)

77
install_utils Executable file
View file

@ -0,0 +1,77 @@
#!/usr/bin/env fish
test -e /etc/os-release; and source /etc/os-release
set -l uname (uname)
if test $uname = Darwin
set -l distro mac
else
set -l distro $ID
end
set -l base_pkgs \
fish \
git \
neovim \
tmux \
rsync \
curl \
fzf \
mosh \
lsd \
ripgrep \
bat
set -l mac_pkgs \
$base_pkgs \
fd \
yazi \
git-delta \
starship
set -l arch_pkgs \
$base_pkgs \
fd \
yazi \
git-delta \
starship
set -l debian_pkgs \
$base_pkgs \
fd-find
switch $distro
case mac
log 'Installing packages with Homebrew'
brew install $mac_pkgs
case arch
log 'Installing Pikaur'
install_pkgs --needed base-devel
or return $status
set -l cwd (pwd)
and set -l tmp_dir (mktemp --directory)
or return $status
git clone https://aur.archlinux.org/pikaur.git $tmp_dir
and cd $tmp_dir
and makepkg --clean --install --rmdeps --syncdeps --noconfirm
and cd $cwd
or return $status
log 'Installing packages with Pikaur '
pikaur --sync --refresh --sysupgrade --noconfirm
and pikaur --sync --noconfirm $arch_pkgs
case debian
log 'Installing packages with APT'
sudo apt-get --quiet --yes update
and sudo apt-get --quiet --yes upgrade
and sudo apt-get --quiet --yes install $debian_pkgs
end
function log -a message
echo \n"--- $message ---"\n
end

2
sync
View file

@ -92,7 +92,7 @@ end
function install_nvim_plugins
command -q nvim
and nvim +PlugUpgrade +PlugUpdate +UpdateRemotePlugins +qa
and nvim +COQdeps +q +bnext
and nvim +COQdeps +bnext +bdelete
end
function sync_git_config