mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-06-19 12:45:34 +00:00
Add kp alias, improve Neovim keybinds, modify aisearch function
This commit is contained in:
parent
38d5c4a29c
commit
33da7ca122
|
@ -1,4 +1,4 @@
|
||||||
function aisearch --wraps aichat
|
function aisearch --wraps aichat
|
||||||
set -lx AICHAT_PATCH_GEMINI_CHAT_COMPLETIONS '{".*":{"body":{"tools":[{"google_search":{}}]}}}'
|
set -lx AICHAT_PATCH_GEMINI_CHAT_COMPLETIONS '{".*":{"body":{"tools":[{"google_search":{}}]}}}'
|
||||||
aichat -r search $argv
|
aichat -r search -s $argv
|
||||||
end
|
end
|
||||||
|
|
|
@ -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-d 'age --decrypt --identity ~/.secrets/id_ed25519'
|
||||||
alias age-e 'age --armor --recipient (cat ~/.secrets/id_ed25519.pub)'
|
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 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 bb 'bun --bun'
|
||||||
alias pn pnpm
|
alias pn pnpm
|
||||||
alias nv 'neovide --fork; and clear'
|
alias nv 'neovide --fork; and clear'
|
||||||
|
|
|
@ -160,7 +160,22 @@ require("lazy").setup({
|
||||||
"tpope/vim-eunuch",
|
"tpope/vim-eunuch",
|
||||||
"tpope/vim-surround",
|
"tpope/vim-surround",
|
||||||
-- { "airblade/vim-gitgutter", lazy = false },
|
-- { "airblade/vim-gitgutter", lazy = false },
|
||||||
{ "echasnovski/mini.diff", version = false, opts = {} },
|
{
|
||||||
|
"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",
|
"reedes/vim-pencil",
|
||||||
cmd = { "HardPencil", "SoftPencil" },
|
cmd = { "HardPencil", "SoftPencil" },
|
||||||
|
@ -256,7 +271,8 @@ require("lazy").setup({
|
||||||
-- Note: 's' is used by flash.nvim, this mapping shadows the default 's' jump.
|
-- 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.
|
-- You might want to change this leader mapping if you use flash jump often.
|
||||||
{ "<leader>s", "<cmd>Telescope treesitter<cr>", desc = "Telescope Treesitter", silent = true },
|
{ "<leader>s", "<cmd>Telescope treesitter<cr>", desc = "Telescope Treesitter", silent = true },
|
||||||
{ "<leader>ga", "<cmd>Telescope grep_string<cr>", desc = "Telescope Grep String", 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>gg", "<cmd>Telescope lsp_definitions<cr>", desc = "LSP Definitions", silent = true },
|
||||||
{ "<leader>gr", "<cmd>Telescope lsp_references<cr>", desc = "LSP References", 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>gi", "<cmd>Telescope lsp_implementations<cr>", desc = "LSP Implementations", silent = true },
|
||||||
|
@ -372,6 +388,11 @@ require("lazy").setup({
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
init = function()
|
||||||
|
vim.opt.foldmethod = "expr"
|
||||||
|
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||||
|
vim.opt.foldenable = false
|
||||||
|
end,
|
||||||
config = function(plugin, opts)
|
config = function(plugin, opts)
|
||||||
require("nvim-treesitter.configs").setup(opts)
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
end,
|
end,
|
||||||
|
@ -384,9 +405,9 @@ require("lazy").setup({
|
||||||
opts = {
|
opts = {
|
||||||
display = { diff = { provider = "mini_diff" }, chat = { show_settings = true } },
|
display = { diff = { provider = "mini_diff" }, chat = { show_settings = true } },
|
||||||
strategies = {
|
strategies = {
|
||||||
chat = { adapter = "gemini_deep" },
|
chat = { adapter = "anthro_deep" },
|
||||||
inline = { adapter = "gemini_deep" },
|
inline = { adapter = "anthro" },
|
||||||
cmd = { adapter = "gemini_deep" },
|
cmd = { adapter = "anthro" },
|
||||||
},
|
},
|
||||||
adapters = {
|
adapters = {
|
||||||
anthro = function()
|
anthro = function()
|
||||||
|
@ -437,11 +458,11 @@ vim.opt.cursorline = true
|
||||||
vim.opt.showmatch = true
|
vim.opt.showmatch = true
|
||||||
vim.opt.number = true
|
vim.opt.number = true
|
||||||
vim.opt.showmode = false
|
vim.opt.showmode = false
|
||||||
vim.o.background = "dark"
|
vim.opt.background = "dark"
|
||||||
vim.opt.wrap = false
|
vim.opt.wrap = false
|
||||||
vim.opt.cmdheight = 1
|
vim.opt.cmdheight = 1
|
||||||
vim.opt.shortmess:append("c")
|
vim.opt.shortmess:append("c")
|
||||||
vim.o.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
vim.opt.foldenable = false
|
vim.opt.foldenable = false
|
||||||
vim.opt.mouse = "a"
|
vim.opt.mouse = "a"
|
||||||
vim.opt.mousemodel = "extend"
|
vim.opt.mousemodel = "extend"
|
||||||
|
@ -461,11 +482,11 @@ local map_opts_silent = { noremap = true, silent = true }
|
||||||
map("i", "jj", "<Esc>", { noremap = true, silent = true, desc = "Escape Insert Mode" })
|
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("t", "<Esc>", "<C-\\><C-n>", { noremap = true, silent = true, desc = "Escape Terminal Mode" })
|
||||||
map("v", "//", function()
|
map("v", "//", function()
|
||||||
|
vim.cmd("normal! y")
|
||||||
local sel = vim.fn.getreg('"')
|
local sel = vim.fn.getreg('"')
|
||||||
local pattern = vim.fn.escape(sel, "/\\")
|
local pattern = vim.fn.escape(sel, "/\\")
|
||||||
vim.fn.setreg("/", "\\V" .. pattern)
|
vim.fn.setreg("/", "\\V" .. pattern)
|
||||||
vim.cmd("normal! gN")
|
vim.cmd("normal! n")
|
||||||
vim.opt.hlsearch = true
|
|
||||||
end, { noremap = true, silent = true, desc = "Search for Visual Selection" })
|
end, { noremap = true, silent = true, desc = "Search for Visual Selection" })
|
||||||
|
|
||||||
-- Neovide GUI Settings
|
-- Neovide GUI Settings
|
||||||
|
|
Loading…
Reference in a new issue