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