From 44697ec5bfaf48f4131b0da5e7dd0f6009b9d987 Mon Sep 17 00:00:00 2001 From: mitchell Date: Mon, 14 Apr 2025 06:58:16 -0400 Subject: [PATCH 1/4] Refactor vimscript into lua --- .config/fish/functions/aisearch.fish | 4 + .config/nvim/config.vim | 161 --------------------- .config/nvim/init.lua | 202 +++++++++++++++++++++++---- 3 files changed, 179 insertions(+), 188 deletions(-) create mode 100644 .config/fish/functions/aisearch.fish delete mode 100644 .config/nvim/config.vim diff --git a/.config/fish/functions/aisearch.fish b/.config/fish/functions/aisearch.fish new file mode 100644 index 0000000..9b47022 --- /dev/null +++ b/.config/fish/functions/aisearch.fish @@ -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 diff --git a/.config/nvim/config.vim b/.config/nvim/config.vim deleted file mode 100644 index aa2f903..0000000 --- a/.config/nvim/config.vim +++ /dev/null @@ -1,161 +0,0 @@ -" ============================================================================= -" Neovim Configuration File -" ============================================================================= - -" ----------------------------------------------------------------------------- -" UI Settings -" ----------------------------------------------------------------------------- -set colorcolumn=100 -set cursorline -set showmatch -set number -set noshowmode -set background=dark -set nowrap -set cmdheight=2 -set shortmess+=c -set termguicolors - -" Folding settings -set foldmethod=expr -set foldexpr=nvim_treesitter#foldexpr() -set nofoldenable " Disable folding at startup. - -" ----------------------------------------------------------------------------- -" Editor Behavior -" ----------------------------------------------------------------------------- -set mouse=a -set mousemodel=extend -set tabstop=2 -set shiftwidth=0 -set expandtab -set textwidth=100 - -" ----------------------------------------------------------------------------- -" Search Settings -" ----------------------------------------------------------------------------- -set hlsearch -set ignorecase -set smartcase - -" ----------------------------------------------------------------------------- -" Key Mappings -" ----------------------------------------------------------------------------- -" Quick escape from insert mode -inoremap jj - -" Terminal escape -tnoremap - -" Search for visually selected text -vnoremap // y/\V=escape(@",'/\') - -" ALE (Linting/Fixing) -nnoremap f ALEFix -nnoremap a ALEToggle - -" File Navigation -nnoremap nn Neotree toggle show git_status -nnoremap np Neotree float reveal_force_cwd -nnoremap t Telescope -nnoremap p Telescope git_files -nnoremap Telescope find_files -nnoremap s Telescope treesitter -nnoremap ga Telescope grep_string - -" LSP Integration -nnoremap gg Telescope lsp_definitions -nnoremap gr Telescope lsp_references -nnoremap gi Telescope lsp_implementations -nnoremap gd Telescope lsp_type_definitions - -" UI Toggles -nnoremap o SymbolsOutline -nnoremap z ZenMode -nnoremap l Twilight - -" Buffer Management -nnoremap j BufferLinePick -nnoremap J BufferLinePickClose - -" Code Companion -nnoremap c CodeCompanionChat - -" ----------------------------------------------------------------------------- -" Neovide GUI Settings -" ----------------------------------------------------------------------------- -let g:neovide_scale_factor = 0.75 -let g:neovide_transparency = 0.7 -let g:neovide_cursor_vfx_mode = 'sonicboom' - -" ----------------------------------------------------------------------------- -" Plugin Configurations -" ----------------------------------------------------------------------------- -" ALE (Linting) -let g:ale_linters_explicit = 1 -let g:ale_completion_enabled = 0 - -" Pencil -let g:pencil#map#suspend_af = 'K' - -" ALE Linters Configuration -let g:ale_linters = { - \ 'javascript': ['eslint', 'stylelint', 'biome'], - \ 'typescript': ['eslint', 'stylelint', 'biome'], - \ 'javascriptreact': ['eslint', 'stylelint', 'biome'], - \ 'typescriptreact': ['eslint', 'stylelint', 'biome'], - \ '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'], - \ } - -" ALE Fixers Configuration -let g:ale_fixers = { - \ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'], - \ 'graphql': ['prettier'], - \ 'javascript': ['prettier', 'biome'], - \ 'typescript': ['prettier', 'biome'], - \ 'javascriptreact': ['prettier', 'biome'], - \ 'typescriptreact': ['prettier', 'biome'], - \ 'vue': ['prettier'], - \ 'css': ['prettier'], - \ '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'], - \ } - -" ----------------------------------------------------------------------------- -" Autocommands -" ----------------------------------------------------------------------------- -" Fish filetype settings -augroup ft_fish - au! - autocmd FileType fish set tabstop=4 -augroup END - -" Terminal settings -augroup term - au! - autocmd TermOpen * set nonumber -augroup END - diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 6d191dc..cf81c9c 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -36,6 +36,7 @@ require("lazy").setup({ }, { "akinsho/bufferline.nvim", + event = "VeryLazy", version = "*", dependencies = { "nvim-tree/nvim-web-devicons" }, opts = { @@ -51,6 +52,10 @@ require("lazy").setup({ }, }, }, + keys = { + { "j", "BufferLinePick", desc = "BufferLinePick", silent = true }, + { "J", "BufferLinePickClose", desc = "BufferLinePickClose", silent = true }, + }, }, { "nvim-lualine/lualine.nvim", @@ -96,7 +101,62 @@ require("lazy").setup({ "edkolev/tmuxline.vim", -- Editor enhancements - "w0rp/ale", + { + "w0rp/ale", + event = "VeryLazy", + keys = { + { "f", "ALEFix", desc = "ALE Fix", silent = true }, + { "a", "ALEToggle", 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" }, + 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" }, + } + + 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" }, + vue = { "prettier" }, + css = { "prettier" }, + 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, + }, "tpope/vim-eunuch", "tpope/vim-surround", -- { "airblade/vim-gitgutter", lazy = false }, @@ -104,6 +164,9 @@ require("lazy").setup({ { "reedes/vim-pencil", cmd = { "HardPencil", "SoftPencil" }, + config = function() + vim.g["pencil#map#suspend_af"] = "K" -- Use bracket notation for '#' + end, }, { "tpope/vim-fugitive", @@ -120,8 +183,17 @@ require("lazy").setup({ twilight = { enabled = false }, }, }, + keys = { + { "z", "ZenMode", desc = "Zen Mode", silent = true }, + }, + }, + { + "folke/twilight.nvim", + opts = {}, + keys = { + { "l", "Twilight", desc = "Twilight", silent = true }, + }, }, - { "folke/twilight.nvim", opts = {} }, -- Completion and LSP { @@ -155,6 +227,20 @@ require("lazy").setup({ ---@module "neo-tree" ---@type neotree.Config? opts = {}, + keys = { + { + "nn", + "Neotree toggle git_status", + desc = "Neo-tree Toggle Git Status", + silent = true, + }, + { + "np", + "Neotree float reveal_force_cwd", + desc = "Neo-tree Float Reveal CWD", + silent = true, + }, + }, }, { "nvim-telescope/telescope.nvim", @@ -163,6 +249,24 @@ require("lazy").setup({ "nvim-tree/nvim-web-devicons", }, opts = {}, + keys = { + { "t", "Telescope", desc = "Telescope", silent = true }, + { "p", "Telescope git_files", desc = "Telescope Git Files", silent = true }, + { "", "Telescope find_files", desc = "Telescope Find Files", silent = true }, + -- Note: 's' is used by flash.nvim, this mapping shadows the default 's' jump. + -- You might want to change this leader mapping if you use flash jump often. + { "s", "Telescope treesitter", desc = "Telescope Treesitter", silent = true }, + { "ga", "Telescope grep_string", desc = "Telescope Grep String", silent = true }, + { "gg", "Telescope lsp_definitions", desc = "LSP Definitions", silent = true }, + { "gr", "Telescope lsp_references", desc = "LSP References", silent = true }, + { "gi", "Telescope lsp_implementations", desc = "LSP Implementations", silent = true }, + { + "gd", + "Telescope lsp_type_definitions", + desc = "LSP Type Definitions", + silent = true, + }, + }, }, { "nvim-telescope/telescope-fzf-native.nvim", @@ -281,18 +385,10 @@ require("lazy").setup({ display = { diff = { provider = "mini_diff" }, chat = { show_settings = true } }, strategies = { chat = { adapter = "gemini_deep" }, - inline = { adapter = "gemini" }, - cmd = { adapter = "gemini" }, + inline = { adapter = "gemini_deep" }, + cmd = { adapter = "gemini_deep" }, }, adapters = { - anthropic = function() - return require("codecompanion.adapters").extend("anthropic", { - schema = { - model = { default = "claude-3-7-sonnet-20250219" }, - extended_thinking = { default = false }, - }, - }) - end, gemini_deep = function() return require("codecompanion.adapters").extend("gemini", { schema = { @@ -313,12 +409,77 @@ require("lazy").setup({ end, }, }, + keys = { + { "c", "CodeCompanionChat", desc = "CodeCompanion Chat", silent = true }, + }, }, }, }) -- General settings 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.o.background = "dark" +vim.opt.wrap = false +vim.opt.cmdheight = 1 +vim.opt.shortmess:append("c") +vim.o.termguicolors = true +vim.opt.foldenable = false +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 + +-- Key Mappings +local map = vim.keymap.set +local map_opts_silent = { noremap = true, silent = true } + +-- General Mappings +map("i", "jj", "", { noremap = true, silent = true, desc = "Escape Insert Mode" }) +map("t", "", "", { noremap = true, silent = true, desc = "Escape Terminal Mode" }) +map("v", "//", function() + local sel = vim.fn.getreg('"') + local pattern = vim.fn.escape(sel, "/\\") + vim.fn.setreg("/", "\\V" .. pattern) + vim.cmd("normal! gN") + vim.opt.hlsearch = true +end, { noremap = true, silent = true, desc = "Search for Visual Selection" }) + +-- Neovide GUI Settings +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 + +-- Autocommands +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", +}) -- LSP Mappings local opts = { silent = true } @@ -330,11 +491,8 @@ vim.keymap.set("n", "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 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 = { silent = true, buffer = bufnr } vim.keymap.set("n", "h", vim.lsp.buf.hover, bufopts) vim.keymap.set("n", "", vim.lsp.buf.signature_help, bufopts) @@ -354,10 +512,7 @@ end local lspconfig = require("lspconfig") local capabilities = require("blink.cmp").get_lsp_capabilities() -local lsp_flags = { - -- This is the default in Nvim 0.7+ - debounce_text_changes = 150, -} +local lsp_flags = { debounce_text_changes = 150 } -- Unused for now local vue_plugin_location = vim.fn.expand("$HOME/.bun/install/global/node_modules/@vue/language-server") @@ -373,11 +528,7 @@ require("typescript-tools").setup({ "typescriptreact", "vue", }, - settings = { - tsserver_plugins = { - "@vue/typescript-plugin", - }, - }, + settings = { tsserver_plugins = { "@vue/typescript-plugin" } }, }) local servers = { "volar", "elixirls", "gopls", "pylsp" } @@ -388,6 +539,3 @@ for _, lsp in ipairs(servers) do capabilities = capabilities, }) end - --- Source config.vim -vim.cmd("source ~/.config/nvim/config.vim") From 38d5c4a29c9ecd2b8b3f3e4faf8f49b59eab9c9d Mon Sep 17 00:00:00 2001 From: mitchell Date: Mon, 14 Apr 2025 08:25:32 -0400 Subject: [PATCH 2/4] AI model changes --- .config/fish/functions/aisearch.fish | 2 +- .config/fish/functions/define_aliases.fish | 1 + .config/nvim/init.lua | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.config/fish/functions/aisearch.fish b/.config/fish/functions/aisearch.fish index 9b47022..8feb966 100644 --- a/.config/fish/functions/aisearch.fish +++ b/.config/fish/functions/aisearch.fish @@ -1,4 +1,4 @@ function aisearch --wraps aichat set -lx AICHAT_PATCH_GEMINI_CHAT_COMPLETIONS '{".*":{"body":{"tools":[{"google_search":{}}]}}}' - aichat -r search -s $argv + aichat -r search $argv end diff --git a/.config/fish/functions/define_aliases.fish b/.config/fish/functions/define_aliases.fish index 3478f70..fad917a 100644 --- a/.config/fish/functions/define_aliases.fish +++ b/.config/fish/functions/define_aliases.fish @@ -17,6 +17,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands' alias nv 'neovide --fork; and clear' alias hx helix alias ai aichat + alias ais aisearch switch "$uname" case Linux diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index cf81c9c..74b3785 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -389,6 +389,20 @@ require("lazy").setup({ cmd = { adapter = "gemini_deep" }, }, adapters = { + anthro = function() + return require("codecompanion.adapters").extend("anthropic", { + schema = { + model = { default = "claude-3-5-haiku-20241022" }, + }, + }) + end, + anthro_deep = function() + return require("codecompanion.adapters").extend("anthropic", { + schema = { + model = { default = "claude-3-7-sonnet-20250219" }, + }, + }) + end, gemini_deep = function() return require("codecompanion.adapters").extend("gemini", { schema = { From 33da7ca122889c83c4c5fda12cb1f2537bebe025 Mon Sep 17 00:00:00 2001 From: mitchell Date: Fri, 18 Apr 2025 03:33:32 -0400 Subject: [PATCH 3/4] Add kp alias, improve Neovim keybinds, modify aisearch function --- .config/fish/functions/aisearch.fish | 2 +- .config/fish/functions/define_aliases.fish | 1 + .config/nvim/init.lua | 39 +++++++++++++++++----- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/.config/fish/functions/aisearch.fish b/.config/fish/functions/aisearch.fish index 8feb966..9b47022 100644 --- a/.config/fish/functions/aisearch.fish +++ b/.config/fish/functions/aisearch.fish @@ -1,4 +1,4 @@ function aisearch --wraps aichat set -lx AICHAT_PATCH_GEMINI_CHAT_COMPLETIONS '{".*":{"body":{"tools":[{"google_search":{}}]}}}' - aichat -r search $argv + aichat -r search -s $argv end diff --git a/.config/fish/functions/define_aliases.fish b/.config/fish/functions/define_aliases.fish index fad917a..09d30c0 100644 --- a/.config/fish/functions/define_aliases.fish +++ b/.config/fish/functions/define_aliases.fish @@ -12,6 +12,7 @@ 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' diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 74b3785..2bf13f2 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -160,7 +160,22 @@ require("lazy").setup({ "tpope/vim-eunuch", "tpope/vim-surround", -- { "airblade/vim-gitgutter", lazy = false }, - { "echasnovski/mini.diff", version = false, opts = {} }, + { + "echasnovski/mini.diff", + version = false, + lazy = false, + opts = {}, + keys = { + { + "i", + function() + require("mini.diff").toggle_overlay() + end, + desc = "Mini.diff overlay", + silent = true, + }, + }, + }, { "reedes/vim-pencil", cmd = { "HardPencil", "SoftPencil" }, @@ -256,7 +271,8 @@ require("lazy").setup({ -- Note: 's' is used by flash.nvim, this mapping shadows the default 's' jump. -- You might want to change this leader mapping if you use flash jump often. { "s", "Telescope treesitter", desc = "Telescope Treesitter", silent = true }, - { "ga", "Telescope grep_string", desc = "Telescope Grep String", silent = true }, + { "gs", "Telescope grep_string", desc = "Telescope Grep String", silent = true }, + { "gl", "Telescope live_grep", desc = "Telescope Grep String", silent = true }, { "gg", "Telescope lsp_definitions", desc = "LSP Definitions", silent = true }, { "gr", "Telescope lsp_references", desc = "LSP References", silent = true }, { "gi", "Telescope lsp_implementations", desc = "LSP Implementations", silent = true }, @@ -372,6 +388,11 @@ require("lazy").setup({ 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, @@ -384,9 +405,9 @@ require("lazy").setup({ opts = { display = { diff = { provider = "mini_diff" }, chat = { show_settings = true } }, strategies = { - chat = { adapter = "gemini_deep" }, - inline = { adapter = "gemini_deep" }, - cmd = { adapter = "gemini_deep" }, + chat = { adapter = "anthro_deep" }, + inline = { adapter = "anthro" }, + cmd = { adapter = "anthro" }, }, adapters = { anthro = function() @@ -437,11 +458,11 @@ vim.opt.cursorline = true vim.opt.showmatch = true vim.opt.number = true vim.opt.showmode = false -vim.o.background = "dark" +vim.opt.background = "dark" vim.opt.wrap = false vim.opt.cmdheight = 1 vim.opt.shortmess:append("c") -vim.o.termguicolors = true +vim.opt.termguicolors = true vim.opt.foldenable = false vim.opt.mouse = "a" vim.opt.mousemodel = "extend" @@ -461,11 +482,11 @@ local map_opts_silent = { noremap = true, silent = true } map("i", "jj", "", { noremap = true, silent = true, desc = "Escape Insert Mode" }) map("t", "", "", { 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! gN") - vim.opt.hlsearch = true + vim.cmd("normal! n") end, { noremap = true, silent = true, desc = "Search for Visual Selection" }) -- Neovide GUI Settings From e511802ea3020fae31bd01dd7f9eb06afa78cf9b Mon Sep 17 00:00:00 2001 From: mitchell Date: Thu, 8 May 2025 15:12:45 -0400 Subject: [PATCH 4/4] 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 --- .config/fish/functions/define_aliases.fish | 1 + .../functions/fish_user_key_bindings.fish | 2 +- .config/nvim/init.lua | 74 ++++++++++++++----- .gitconfig | 3 +- README.md | 1 - 5 files changed, 58 insertions(+), 23 deletions(-) diff --git a/.config/fish/functions/define_aliases.fish b/.config/fish/functions/define_aliases.fish index 09d30c0..5a453c3 100644 --- a/.config/fish/functions/define_aliases.fish +++ b/.config/fish/functions/define_aliases.fish @@ -1,6 +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 diff --git a/.config/fish/functions/fish_user_key_bindings.fish b/.config/fish/functions/fish_user_key_bindings.fish index 7dbc2b7..b53f369 100644 --- a/.config/fish/functions/fish_user_key_bindings.fish +++ b/.config/fish/functions/fish_user_key_bindings.fish @@ -1,5 +1,4 @@ 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 comma,a 'ssh_add; commandline -f repaint' bind --mode insert comma,p 'nvim +"Telescope git_files"; commandline -f repaint' bind --mode insert comma,f 'nvim +"Telescope find_files"; commandline -f repaint' @@ -9,4 +8,5 @@ function fish_user_key_bindings 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 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 2bf13f2..01a3a47 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -23,6 +23,7 @@ require("lazy").setup({ install = { colorscheme = { "kanagawa" } }, spec = { -- UI and appearance + "edkolev/tmuxline.vim", { "rebelot/kanagawa.nvim", lazy = false, @@ -98,7 +99,18 @@ require("lazy").setup({ }, }, }, - "edkolev/tmuxline.vim", + { + "OXY2DEV/markview.nvim", + lazy = false, + dependencies = { "saghen/blink.cmp" }, + opts = { + preview = { + icon_provider = "devicons", + filetypes = { "markdown", "codecompanion" }, + ignore_buftypes = {}, + }, + }, + }, -- Editor enhancements { @@ -117,8 +129,9 @@ require("lazy").setup({ typescript = { "eslint", "stylelint", "biome" }, javascriptreact = { "eslint", "stylelint", "biome" }, typescriptreact = { "eslint", "stylelint", "biome" }, + svelte = { "eslint" }, go = { "golint", "go vet" }, - vue = { "eslint", "stylelint" }, + vue = { "eslint", "stylelint", "biome" }, make = { "checkmake" }, proto = { "protoc-gen-lint" }, dockerfile = { "hadolint" }, @@ -129,7 +142,7 @@ require("lazy").setup({ cs = { "OmniSharp" }, terraform = { "tflint" }, ruby = { "rubocop" }, - css = { "stylelint" }, + css = { "stylelint", "biome" }, sh = { "shellcheck" }, python = { "pylint" }, } @@ -141,8 +154,9 @@ require("lazy").setup({ typescript = { "prettier", "biome" }, javascriptreact = { "prettier", "biome" }, typescriptreact = { "prettier", "biome" }, - vue = { "prettier" }, - css = { "prettier" }, + svelte = { "prettier" }, + vue = { "prettier", "biome" }, + css = { "prettier", "biome" }, yaml = { "prettier", "biome" }, json = { "prettier", "biome" }, dart = { "dartfmt" }, @@ -245,14 +259,14 @@ require("lazy").setup({ keys = { { "nn", - "Neotree toggle git_status", - desc = "Neo-tree Toggle Git Status", + "Neotree toggle reveal_force_cwd", + desc = "Neo-tree Toggle Sidebar", silent = true, }, { - "np", + "nf", "Neotree float reveal_force_cwd", - desc = "Neo-tree Float Reveal CWD", + desc = "Neo-tree Float", silent = true, }, }, @@ -369,6 +383,8 @@ require("lazy").setup({ "terraform", "yaml", "json", + "markdown", + "markdown_inline", }, auto_install = false, highlight = { @@ -405,9 +421,9 @@ require("lazy").setup({ opts = { display = { diff = { provider = "mini_diff" }, chat = { show_settings = true } }, strategies = { - chat = { adapter = "anthro_deep" }, - inline = { adapter = "anthro" }, - cmd = { adapter = "anthro" }, + chat = { adapter = "gemini_deep" }, + inline = { adapter = "gemini" }, + cmd = { adapter = "gemini" }, }, adapters = { anthro = function() @@ -424,10 +440,17 @@ require("lazy").setup({ }, }) end, + gemini = function() + return require("codecompanion.adapters").extend("gemini", { + schema = { + model = { default = "gemini-2.5-flash-preview-04-17" }, + }, + }) + end, gemini_deep = function() return require("codecompanion.adapters").extend("gemini", { schema = { - model = { default = "gemini-2.5-pro-preview-03-25" }, + model = { default = "gemini-2.5-pro-preview-05-06" }, }, }) end, @@ -550,27 +573,40 @@ local capabilities = require("blink.cmp").get_lsp_capabilities() local lsp_flags = { debounce_text_changes = 150 } -- Unused for now -local vue_plugin_location = vim.fn.expand("$HOME/.bun/install/global/node_modules/@vue/language-server") +local vue_plugin_location = vim.fn.expand("$HOME/.bun/install/global/node_modules/@vue/typescript-plugin") -require("typescript-tools").setup({ +vim.lsp.config("ts_ls", { on_attach = on_attach, flags = lsp_flags, capabilities = capabilities, filetypes = { - "typescript", "javascript", + "typescript", "javascriptreact", "typescriptreact", "vue", }, - settings = { tsserver_plugins = { "@vue/typescript-plugin" } }, + init_options = { + plugins = { + { + name = "@vue/typescript-plugin", + location = vue_plugin_location, + languages = { "javascript", "typescript", "vue" }, + }, + }, + }, }) -local servers = { "volar", "elixirls", "gopls", "pylsp" } +vim.lsp.enable("ts_ls") + +require("lspconfig").volar.setup({}) + +local servers = { "elixirls", "gopls", "pylsp", "svelte" } for _, lsp in ipairs(servers) do - lspconfig[lsp].setup({ + vim.lsp.config(lsp, { on_attach = on_attach, flags = lsp_flags, capabilities = capabilities, }) + vim.lsp.enable(lsp) end diff --git a/.gitconfig b/.gitconfig index 828ede0..7cc587f 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,5 +1,5 @@ [alias] - co = checkout + sw = switch rs = restore rss = restore --staged br = branch @@ -21,7 +21,6 @@ puff = pull --ff-only merff = merge --ff-only fa = fetch --all - pa = push --all ap = add --patch [core] diff --git a/README.md b/README.md index 9072eae..e7413f5 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,6 @@ This repo contains my preferred configurations for: - tmux - git - Wez's terminal -- Jetbrains vim plugin - keepassxc - bspwm (Linux) - sxhkd (Linux)