mirror of
https://github.com/mitchell/dotfiles.git
synced 2025-07-12 11:56:08 +00:00
Compare commits
4 commits
b55aab8a89
...
e511802ea3
Author | SHA1 | Date | |
---|---|---|---|
|
e511802ea3 | ||
|
33da7ca122 | ||
|
38d5c4a29c | ||
|
44697ec5bf |
4
.config/fish/functions/aisearch.fish
Normal file
4
.config/fish/functions/aisearch.fish
Normal 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
|
|
@ -1,6 +1,7 @@
|
||||||
function define_aliases -a uname -d 'Defines aliases for commonly used commands'
|
function define_aliases -a uname -d 'Defines aliases for commonly used commands'
|
||||||
alias q exit
|
alias q exit
|
||||||
alias cl clear
|
alias cl clear
|
||||||
|
alias ls lsd
|
||||||
alias rcp 'rsync -aP'
|
alias rcp 'rsync -aP'
|
||||||
alias vg vagrant
|
alias vg vagrant
|
||||||
alias tf terraform
|
alias tf terraform
|
||||||
|
@ -12,11 +13,13 @@ 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'
|
||||||
alias hx helix
|
alias hx helix
|
||||||
alias ai aichat
|
alias ai aichat
|
||||||
|
alias ais aisearch
|
||||||
|
|
||||||
switch "$uname"
|
switch "$uname"
|
||||||
case Linux
|
case Linux
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
function fish_user_key_bindings
|
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,a 'ssh_add; commandline -f repaint'
|
||||||
bind --mode insert comma,p 'nvim +"Telescope git_files"; 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'
|
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,t 'fzf-file-widget'
|
||||||
bind --mode insert comma,r 'fzf-history-widget'
|
bind --mode insert comma,r 'fzf-history-widget'
|
||||||
bind --mode insert comma,c 'fzf-cd-widget'
|
bind --mode insert comma,c 'fzf-cd-widget'
|
||||||
|
bind --mode insert comma,l 'clear; commandline -f repaint'
|
||||||
end
|
end
|
||||||
|
|
|
@ -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 <Esc>
|
|
||||||
|
|
||||||
" Terminal escape
|
|
||||||
tnoremap <Esc> <C-\><C-n>
|
|
||||||
|
|
||||||
" Search for visually selected text
|
|
||||||
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
|
||||||
|
|
||||||
" ALE (Linting/Fixing)
|
|
||||||
nnoremap <leader>f <cmd>ALEFix<cr>
|
|
||||||
nnoremap <leader>a <cmd>ALEToggle<cr>
|
|
||||||
|
|
||||||
" File Navigation
|
|
||||||
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>
|
|
||||||
|
|
||||||
" LSP Integration
|
|
||||||
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>
|
|
||||||
|
|
||||||
" UI Toggles
|
|
||||||
nnoremap <leader>o <cmd>SymbolsOutline<cr>
|
|
||||||
nnoremap <leader>z <cmd>ZenMode<cr>
|
|
||||||
nnoremap <leader>l <cmd>Twilight<cr>
|
|
||||||
|
|
||||||
" Buffer Management
|
|
||||||
nnoremap <silent><leader>j <cmd>BufferLinePick<cr>
|
|
||||||
nnoremap <silent><leader>J <cmd>BufferLinePickClose<cr>
|
|
||||||
|
|
||||||
" Code Companion
|
|
||||||
nnoremap <silent><leader>c <cmd>CodeCompanionChat<cr>
|
|
||||||
|
|
||||||
" -----------------------------------------------------------------------------
|
|
||||||
" 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
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ require("lazy").setup({
|
||||||
install = { colorscheme = { "kanagawa" } },
|
install = { colorscheme = { "kanagawa" } },
|
||||||
spec = {
|
spec = {
|
||||||
-- UI and appearance
|
-- UI and appearance
|
||||||
|
"edkolev/tmuxline.vim",
|
||||||
{
|
{
|
||||||
"rebelot/kanagawa.nvim",
|
"rebelot/kanagawa.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
@ -36,6 +37,7 @@ require("lazy").setup({
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
version = "*",
|
version = "*",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
opts = {
|
opts = {
|
||||||
|
@ -51,6 +53,10 @@ require("lazy").setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>j", "<cmd>BufferLinePick<cr>", desc = "BufferLinePick", silent = true },
|
||||||
|
{ "<leader>J", "<cmd>BufferLinePickClose<cr>", desc = "BufferLinePickClose", silent = true },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
|
@ -93,17 +99,103 @@ 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
|
-- Editor enhancements
|
||||||
"w0rp/ale",
|
{
|
||||||
|
"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,
|
||||||
|
},
|
||||||
"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" },
|
||||||
|
config = function()
|
||||||
|
vim.g["pencil#map#suspend_af"] = "K" -- Use bracket notation for '#'
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tpope/vim-fugitive",
|
"tpope/vim-fugitive",
|
||||||
|
@ -120,8 +212,17 @@ require("lazy").setup({
|
||||||
twilight = { enabled = false },
|
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 },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ "folke/twilight.nvim", opts = {} },
|
|
||||||
|
|
||||||
-- Completion and LSP
|
-- Completion and LSP
|
||||||
{
|
{
|
||||||
|
@ -155,6 +256,20 @@ require("lazy").setup({
|
||||||
---@module "neo-tree"
|
---@module "neo-tree"
|
||||||
---@type neotree.Config?
|
---@type neotree.Config?
|
||||||
opts = {},
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>nn",
|
||||||
|
"<cmd>Neotree toggle 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",
|
"nvim-telescope/telescope.nvim",
|
||||||
|
@ -163,6 +278,25 @@ require("lazy").setup({
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
opts = {},
|
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 },
|
||||||
|
-- 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.
|
||||||
|
{ "<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",
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
|
@ -249,6 +383,8 @@ require("lazy").setup({
|
||||||
"terraform",
|
"terraform",
|
||||||
"yaml",
|
"yaml",
|
||||||
"json",
|
"json",
|
||||||
|
"markdown",
|
||||||
|
"markdown_inline",
|
||||||
},
|
},
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
highlight = {
|
highlight = {
|
||||||
|
@ -268,6 +404,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,
|
||||||
|
@ -285,18 +426,31 @@ require("lazy").setup({
|
||||||
cmd = { adapter = "gemini" },
|
cmd = { adapter = "gemini" },
|
||||||
},
|
},
|
||||||
adapters = {
|
adapters = {
|
||||||
anthropic = function()
|
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", {
|
return require("codecompanion.adapters").extend("anthropic", {
|
||||||
schema = {
|
schema = {
|
||||||
model = { default = "claude-3-7-sonnet-20250219" },
|
model = { default = "claude-3-7-sonnet-20250219" },
|
||||||
extended_thinking = { default = false },
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
gemini = function()
|
||||||
|
return require("codecompanion.adapters").extend("gemini", {
|
||||||
|
schema = {
|
||||||
|
model = { default = "gemini-2.5-flash-preview-04-17" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
gemini_deep = function()
|
gemini_deep = function()
|
||||||
return require("codecompanion.adapters").extend("gemini", {
|
return require("codecompanion.adapters").extend("gemini", {
|
||||||
schema = {
|
schema = {
|
||||||
model = { default = "gemini-2.5-pro-preview-03-25" },
|
model = { default = "gemini-2.5-pro-preview-05-06" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
@ -313,12 +467,77 @@ require("lazy").setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>c", "<cmd>CodeCompanionChat<cr>", desc = "CodeCompanion Chat", silent = true },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- General settings
|
-- General settings
|
||||||
vim.opt.guifont = "JetBrainsMono Nerd Font:h13"
|
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.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", "<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" })
|
||||||
|
|
||||||
|
-- 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
|
-- LSP Mappings
|
||||||
local opts = { silent = true }
|
local opts = { silent = true }
|
||||||
|
@ -330,11 +549,8 @@ vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, opts)
|
||||||
-- Use an on_attach function to only map the following keys
|
-- Use an on_attach function to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- after the language server attaches to the current buffer
|
||||||
local on_attach = function(client, bufnr)
|
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")
|
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 }
|
local bufopts = { silent = true, buffer = bufnr }
|
||||||
vim.keymap.set("n", "<leader>h", vim.lsp.buf.hover, bufopts)
|
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", "<C-k>", vim.lsp.buf.signature_help, bufopts)
|
||||||
|
@ -354,40 +570,43 @@ end
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||||
|
|
||||||
local lsp_flags = {
|
local lsp_flags = { debounce_text_changes = 150 }
|
||||||
-- This is the default in Nvim 0.7+
|
|
||||||
debounce_text_changes = 150,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Unused for now
|
-- 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,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"typescript",
|
|
||||||
"javascript",
|
"javascript",
|
||||||
|
"typescript",
|
||||||
"javascriptreact",
|
"javascriptreact",
|
||||||
"typescriptreact",
|
"typescriptreact",
|
||||||
"vue",
|
"vue",
|
||||||
},
|
},
|
||||||
settings = {
|
init_options = {
|
||||||
tsserver_plugins = {
|
plugins = {
|
||||||
"@vue/typescript-plugin",
|
{
|
||||||
|
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
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup({
|
vim.lsp.config(lsp, {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
})
|
})
|
||||||
|
vim.lsp.enable(lsp)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Source config.vim
|
|
||||||
vim.cmd("source ~/.config/nvim/config.vim")
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[alias]
|
[alias]
|
||||||
co = checkout
|
sw = switch
|
||||||
rs = restore
|
rs = restore
|
||||||
rss = restore --staged
|
rss = restore --staged
|
||||||
br = branch
|
br = branch
|
||||||
|
@ -21,7 +21,6 @@
|
||||||
puff = pull --ff-only
|
puff = pull --ff-only
|
||||||
merff = merge --ff-only
|
merff = merge --ff-only
|
||||||
fa = fetch --all
|
fa = fetch --all
|
||||||
pa = push --all
|
|
||||||
ap = add --patch
|
ap = add --patch
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
|
|
Loading…
Reference in a new issue