mirror of https://github.com/mitchell/dotfiles.git
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.
This commit is contained in:
parent
4d4e715cb1
commit
b55aab8a89
|
@ -11,9 +11,6 @@ function configure_fish
|
||||||
import_sources $uname
|
import_sources $uname
|
||||||
define_aliases $uname
|
define_aliases $uname
|
||||||
ssh_agent_startup
|
ssh_agent_startup
|
||||||
starship init fish | source
|
|
||||||
zoxide init fish | source
|
|
||||||
fzf --fish | source
|
|
||||||
end
|
end
|
||||||
|
|
||||||
configure_fish
|
configure_fish
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 rcp 'rsync -aP'
|
alias rcp 'rsync -aP'
|
||||||
alias vg vagrant
|
alias vg vagrant
|
||||||
alias tf terraform
|
alias tf terraform
|
||||||
|
@ -15,6 +16,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
|
||||||
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
|
||||||
|
|
||||||
switch "$uname"
|
switch "$uname"
|
||||||
case Linux
|
case Linux
|
||||||
|
|
|
@ -21,7 +21,13 @@ function define_global_variables -d 'Defines all and exclusively globally export
|
||||||
|
|
||||||
set -gx LIBVIRT_DEFAULT_URI 'qemu:///system'
|
set -gx LIBVIRT_DEFAULT_URI 'qemu:///system'
|
||||||
|
|
||||||
|
if test (uname) = "Darwin"
|
||||||
|
set -gx ANDROID_HOME $HOME/Library/Android/Sdk
|
||||||
|
else
|
||||||
set -gx ANDROID_HOME $HOME/Android/Sdk
|
set -gx ANDROID_HOME $HOME/Android/Sdk
|
||||||
|
end
|
||||||
|
|
||||||
|
set -gx PYENV_ROOT $HOME/.pyenv
|
||||||
|
|
||||||
fish_add_path $GOBIN \
|
fish_add_path $GOBIN \
|
||||||
$HOME/.local/bin \
|
$HOME/.local/bin \
|
||||||
|
@ -31,6 +37,7 @@ function define_global_variables -d 'Defines all and exclusively globally export
|
||||||
$HOME/.cargo/bin \
|
$HOME/.cargo/bin \
|
||||||
$HOME/.dotnet/tools \
|
$HOME/.dotnet/tools \
|
||||||
$BUN_INSTALL/bin \
|
$BUN_INSTALL/bin \
|
||||||
|
$PYENV_ROOT/bin \
|
||||||
$ANDROID_HOME/emulator \
|
$ANDROID_HOME/emulator \
|
||||||
$ANDROID_HOME/platform-tools
|
$ANDROID_HOME/platform-tools
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
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 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 comma,a 'ssh_add; commandline -f repaint'
|
||||||
bind --mode insert ,p 'nvim +"Telescope git_files"; commandline -f repaint'
|
bind --mode insert comma,p 'nvim +"Telescope git_files"; commandline -f repaint'
|
||||||
bind --mode insert ,f 'nvim +"Telescope find_files"; commandline -f repaint'
|
bind --mode insert comma,f 'nvim +"Telescope find_files"; commandline -f repaint'
|
||||||
bind --mode insert ,n 'nvim .; commandline -f repaint'
|
bind --mode insert comma,n 'nvim .; commandline -f repaint'
|
||||||
bind --mode insert ,s 'sysz; commandline -f repaint'
|
bind --mode insert comma,s 'sysz; commandline -f repaint'
|
||||||
bind --mode insert ,z 'zi; commandline -f repaint'
|
bind --mode insert comma,z 'zi; commandline -f repaint'
|
||||||
bind --mode insert ,t 'fzf-file-widget'
|
bind --mode insert comma,t 'fzf-file-widget'
|
||||||
bind --mode insert ,r 'fzf-history-widget'
|
bind --mode insert comma,r 'fzf-history-widget'
|
||||||
bind --mode insert ,c 'fzf-cd-widget'
|
bind --mode insert comma,c 'fzf-cd-widget'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,10 +1,27 @@
|
||||||
function import_sources -a uname -d 'Loads any additional fish files needed at init.'
|
function import_sources -a uname -d 'Loads any additional fish files needed at init.'
|
||||||
test -f ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish; and source ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish
|
test -f ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish; and source ~/.asdf/plugins/dotnet-core/set-dotnet-home.fish
|
||||||
|
|
||||||
test -e ~/.asdf/asdf.fish
|
# ASDF configuration code
|
||||||
and source ~/.asdf/asdf.fish
|
if test -z $ASDF_DATA_DIR
|
||||||
and mkdir -p ~/.config/fish/completions
|
set _asdf_shims "$HOME/.asdf/shims"
|
||||||
and ln -sf ~/.asdf/completions/asdf.fish ~/.config/fish/completions
|
else
|
||||||
|
set _asdf_shims "$ASDF_DATA_DIR/shims"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Do not use fish_add_path (added in Fish 3.2) because it
|
||||||
|
# potentially changes the order of items in PATH
|
||||||
|
if not contains $_asdf_shims $PATH
|
||||||
|
set -gx --prepend PATH $_asdf_shims
|
||||||
|
end
|
||||||
|
set --erase _asdf_shims
|
||||||
|
|
||||||
|
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.
|
# 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
|
# if test -f '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; source '/Users/m/Documents/google-cloud-sdk/path.fish.inc'; end
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,30 +1,60 @@
|
||||||
|
" =============================================================================
|
||||||
|
" Neovim Configuration File
|
||||||
|
" =============================================================================
|
||||||
|
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" UI Settings
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
set colorcolumn=100
|
set colorcolumn=100
|
||||||
set cursorline
|
set cursorline
|
||||||
set showmatch
|
set showmatch
|
||||||
set hlsearch
|
|
||||||
set mouse=a
|
|
||||||
set mousemodel=extend
|
|
||||||
set number
|
set number
|
||||||
set noshowmode
|
set noshowmode
|
||||||
set background=dark
|
set background=dark
|
||||||
set nowrap
|
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 tabstop=2
|
||||||
set shiftwidth=0
|
set shiftwidth=0
|
||||||
set expandtab
|
set expandtab
|
||||||
set textwidth=100
|
set textwidth=100
|
||||||
set cmdheight=2
|
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" Search Settings
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
set hlsearch
|
||||||
set ignorecase
|
set ignorecase
|
||||||
set smartcase
|
set smartcase
|
||||||
set shortmess+=c
|
|
||||||
set foldmethod=expr
|
|
||||||
set foldexpr=nvim_treesitter#foldexpr()
|
|
||||||
set nofoldenable " Disable folding at startup.
|
|
||||||
set termguicolors
|
|
||||||
|
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" Key Mappings
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" Quick escape from insert mode
|
||||||
inoremap jj <Esc>
|
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>f <cmd>ALEFix<cr>
|
||||||
nnoremap <leader>a <cmd>ALEToggle<cr>
|
nnoremap <leader>a <cmd>ALEToggle<cr>
|
||||||
|
|
||||||
|
" File Navigation
|
||||||
nnoremap <leader>nn <cmd>Neotree toggle show git_status<cr>
|
nnoremap <leader>nn <cmd>Neotree toggle show git_status<cr>
|
||||||
nnoremap <leader>np <cmd>Neotree float reveal_force_cwd<cr>
|
nnoremap <leader>np <cmd>Neotree float reveal_force_cwd<cr>
|
||||||
nnoremap <leader>t <cmd>Telescope<cr>
|
nnoremap <leader>t <cmd>Telescope<cr>
|
||||||
|
@ -32,33 +62,43 @@ nnoremap <leader>p <cmd>Telescope git_files<cr>
|
||||||
nnoremap <C-p> <cmd>Telescope find_files<cr>
|
nnoremap <C-p> <cmd>Telescope find_files<cr>
|
||||||
nnoremap <leader>s <cmd>Telescope treesitter<cr>
|
nnoremap <leader>s <cmd>Telescope treesitter<cr>
|
||||||
nnoremap <leader>ga <cmd>Telescope grep_string<cr>
|
nnoremap <leader>ga <cmd>Telescope grep_string<cr>
|
||||||
|
|
||||||
|
" LSP Integration
|
||||||
nnoremap <leader>gg <cmd>Telescope lsp_definitions<cr>
|
nnoremap <leader>gg <cmd>Telescope lsp_definitions<cr>
|
||||||
nnoremap <leader>gr <cmd>Telescope lsp_references<cr>
|
nnoremap <leader>gr <cmd>Telescope lsp_references<cr>
|
||||||
nnoremap <leader>gi <cmd>Telescope lsp_implementations<cr>
|
nnoremap <leader>gi <cmd>Telescope lsp_implementations<cr>
|
||||||
nnoremap <leader>gd <cmd>Telescope lsp_type_definitions<cr>
|
nnoremap <leader>gd <cmd>Telescope lsp_type_definitions<cr>
|
||||||
|
|
||||||
|
" UI Toggles
|
||||||
nnoremap <leader>o <cmd>SymbolsOutline<cr>
|
nnoremap <leader>o <cmd>SymbolsOutline<cr>
|
||||||
nnoremap <leader>z <cmd>ZenMode<cr>
|
nnoremap <leader>z <cmd>ZenMode<cr>
|
||||||
nnoremap <leader>l <cmd>Twilight<cr>
|
nnoremap <leader>l <cmd>Twilight<cr>
|
||||||
nnoremap <leader>c <cmd>COQnow<cr>
|
|
||||||
|
" Buffer Management
|
||||||
nnoremap <silent><leader>j <cmd>BufferLinePick<cr>
|
nnoremap <silent><leader>j <cmd>BufferLinePick<cr>
|
||||||
nnoremap <silent><leader>J <cmd>BufferLinePickClose<cr>
|
nnoremap <silent><leader>J <cmd>BufferLinePickClose<cr>
|
||||||
|
|
||||||
tnoremap <Esc> <C-\><C-n>
|
" Code Companion
|
||||||
|
nnoremap <silent><leader>c <cmd>CodeCompanionChat<cr>
|
||||||
" Allows you to use // in order to search for the visually selected text
|
|
||||||
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
|
||||||
|
|
||||||
colorscheme kanagawa
|
|
||||||
|
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" Neovide GUI Settings
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
let g:neovide_scale_factor = 0.75
|
let g:neovide_scale_factor = 0.75
|
||||||
let g:neovide_transparency = 0.7
|
let g:neovide_transparency = 0.7
|
||||||
let g:neovide_cursor_vfx_mode = 'sonicboom'
|
let g:neovide_cursor_vfx_mode = 'sonicboom'
|
||||||
|
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" Plugin Configurations
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" ALE (Linting)
|
||||||
let g:ale_linters_explicit = 1
|
let g:ale_linters_explicit = 1
|
||||||
let g:ale_completion_enabled = 0
|
let g:ale_completion_enabled = 0
|
||||||
|
|
||||||
|
" Pencil
|
||||||
let g:pencil#map#suspend_af = 'K'
|
let g:pencil#map#suspend_af = 'K'
|
||||||
|
|
||||||
|
" ALE Linters Configuration
|
||||||
let g:ale_linters = {
|
let g:ale_linters = {
|
||||||
\ 'javascript': ['eslint', 'stylelint', 'biome'],
|
\ 'javascript': ['eslint', 'stylelint', 'biome'],
|
||||||
\ 'typescript': ['eslint', 'stylelint', 'biome'],
|
\ 'typescript': ['eslint', 'stylelint', 'biome'],
|
||||||
|
@ -81,7 +121,7 @@ let g:ale_linters = {
|
||||||
\ 'python': ['pylint'],
|
\ 'python': ['pylint'],
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
" ALE Fixers Configuration
|
||||||
let g:ale_fixers = {
|
let g:ale_fixers = {
|
||||||
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
|
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
|
||||||
\ 'graphql': ['prettier'],
|
\ 'graphql': ['prettier'],
|
||||||
|
@ -104,12 +144,18 @@ let g:ale_fixers = {
|
||||||
\ 'lua': ['stylua'],
|
\ 'lua': ['stylua'],
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" Autocommands
|
||||||
|
" -----------------------------------------------------------------------------
|
||||||
|
" Fish filetype settings
|
||||||
augroup ft_fish
|
augroup ft_fish
|
||||||
au!
|
au!
|
||||||
autocmd FileType fish set tabstop=4
|
autocmd FileType fish set tabstop=4
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
" Terminal settings
|
||||||
augroup term
|
augroup term
|
||||||
au!
|
au!
|
||||||
autocmd TermOpen * set nonumber
|
autocmd TermOpen * set nonumber
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
|
|
|
@ -1,50 +1,44 @@
|
||||||
local plug = vim.fn["plug#"]
|
-- Bootstrap lazy.nvim
|
||||||
vim.call("plug#begin")
|
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)
|
||||||
|
|
||||||
plug("w0rp/ale")
|
-- Set leader key before lazy setup
|
||||||
plug("tpope/vim-eunuch")
|
vim.g.mapleader = ","
|
||||||
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")
|
-- Plugin specifications
|
||||||
plug("rcarriga/nvim-notify")
|
require("lazy").setup({
|
||||||
plug("nvim-lua/plenary.nvim")
|
install = { colorscheme = { "kanagawa" } },
|
||||||
plug("nvim-tree/nvim-web-devicons")
|
spec = {
|
||||||
|
-- UI and appearance
|
||||||
plug("ms-jpq/coq_nvim", { ["branch"] = "coq" })
|
{
|
||||||
plug("ms-jpq/coq.artifacts", { ["branch"] = "artifacts" })
|
"rebelot/kanagawa.nvim",
|
||||||
plug("folke/noice.nvim")
|
lazy = false,
|
||||||
plug("folke/flash.nvim")
|
priority = 1000,
|
||||||
plug("folke/zen-mode.nvim")
|
opts = {
|
||||||
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,
|
transparent = not vim.g.neovide,
|
||||||
})
|
},
|
||||||
|
init = function()
|
||||||
require("bufferline").setup({
|
vim.cmd([[colorscheme kanagawa]])
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"akinsho/bufferline.nvim",
|
||||||
|
version = "*",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
separator_style = "slope",
|
separator_style = "slope",
|
||||||
offsets = {
|
offsets = {
|
||||||
|
@ -52,41 +46,34 @@ require("bufferline").setup({
|
||||||
filetype = "neo-tree",
|
filetype = "neo-tree",
|
||||||
text = "explorer",
|
text = "explorer",
|
||||||
highlight = "Directory",
|
highlight = "Directory",
|
||||||
separator = true, -- use a "true" to enable the default, or set your own character
|
separator = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
},
|
||||||
require("lualine").setup({
|
{
|
||||||
|
"nvim-lualine/lualine.nvim",
|
||||||
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||||
|
opts = {
|
||||||
extensions = {
|
extensions = {
|
||||||
"neo-tree",
|
"neo-tree",
|
||||||
"symbols-outline",
|
"symbols-outline",
|
||||||
},
|
},
|
||||||
})
|
|
||||||
|
|
||||||
require("zen-mode").setup({
|
|
||||||
window = {
|
|
||||||
backdrop = 0.95,
|
|
||||||
},
|
},
|
||||||
plugins = {
|
|
||||||
twilight = { enabled = false }, -- enable to start Twilight when zen mode opens
|
|
||||||
},
|
},
|
||||||
})
|
{
|
||||||
require("symbols-outline").setup({
|
"rcarriga/nvim-notify",
|
||||||
autofold_depth = 2,
|
opts = {
|
||||||
})
|
|
||||||
|
|
||||||
require("notify").setup({
|
|
||||||
background_colour = "#000000",
|
background_colour = "#000000",
|
||||||
})
|
},
|
||||||
|
},
|
||||||
require("telescope").setup()
|
{
|
||||||
require("telescope").load_extension("fzf")
|
"folke/noice.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
require("noice").setup({
|
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
|
||||||
|
opts = {
|
||||||
lsp = {
|
lsp = {
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
|
||||||
override = {
|
override = {
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
|
@ -94,9 +81,9 @@ require("noice").setup({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
presets = {
|
presets = {
|
||||||
bottom_search = true, -- use a classic bottom cmdline for search
|
bottom_search = true,
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
command_palette = true,
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
long_message_to_split = true,
|
||||||
},
|
},
|
||||||
views = {
|
views = {
|
||||||
notify = {
|
notify = {
|
||||||
|
@ -104,12 +91,145 @@ require("noice").setup({
|
||||||
merge = true,
|
merge = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
},
|
||||||
|
"edkolev/tmuxline.vim",
|
||||||
|
|
||||||
require("nvim-treesitter.configs").setup({
|
-- Editor enhancements
|
||||||
-- A list of parser names, or "all" (the four listed parsers should always be installed)
|
"w0rp/ale",
|
||||||
|
"tpope/vim-eunuch",
|
||||||
|
"tpope/vim-surround",
|
||||||
|
-- { "airblade/vim-gitgutter", lazy = false },
|
||||||
|
{ "echasnovski/mini.diff", version = false, opts = {} },
|
||||||
|
{
|
||||||
|
"reedes/vim-pencil",
|
||||||
|
cmd = { "HardPencil", "SoftPencil" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"tpope/vim-fugitive",
|
||||||
|
cmd = { "G", "Git" },
|
||||||
|
ft = "gitcommit",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"folke/zen-mode.nvim",
|
||||||
|
opts = {
|
||||||
|
window = {
|
||||||
|
backdrop = 0.95,
|
||||||
|
},
|
||||||
|
plugins = {
|
||||||
|
twilight = { enabled = false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "folke/twilight.nvim", opts = {} },
|
||||||
|
|
||||||
|
-- Completion and LSP
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
|
version = "1.*",
|
||||||
|
---@module 'blink.cmp'
|
||||||
|
---@type blink.cmp.Config
|
||||||
|
opts = {},
|
||||||
|
opts_extend = { "sources.default" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
dependencies = { "saghen/blink.cmp" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pmizio/typescript-tools.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Navigation and search
|
||||||
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
|
branch = "v3.x",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
},
|
||||||
|
lazy = false, -- neo-tree will lazily load itself
|
||||||
|
---@module "neo-tree"
|
||||||
|
---@type neotree.Config?
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"nvim-telescope/telescope.nvim",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
},
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Treesitter
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
|
opts = {
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"c",
|
"c",
|
||||||
|
"cpp",
|
||||||
"lua",
|
"lua",
|
||||||
"vim",
|
"vim",
|
||||||
"regex",
|
"regex",
|
||||||
|
@ -122,52 +242,85 @@ require("nvim-treesitter.configs").setup({
|
||||||
"elixir",
|
"elixir",
|
||||||
"vue",
|
"vue",
|
||||||
"groovy",
|
"groovy",
|
||||||
|
"java",
|
||||||
|
"objc",
|
||||||
|
"swift",
|
||||||
"hcl",
|
"hcl",
|
||||||
"terraform",
|
"terraform",
|
||||||
|
"yaml",
|
||||||
|
"json",
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Automatically install missing parsers when entering buffer
|
|
||||||
-- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
|
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
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,
|
additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
init_selection = "gnn", -- set to `false` to disable one of the mappings
|
init_selection = "gnn",
|
||||||
node_incremental = "grn",
|
node_incremental = "grn",
|
||||||
scope_incremental = "grc",
|
scope_incremental = "grc",
|
||||||
node_decremental = "grm",
|
node_decremental = "grm",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
config = function(plugin, opts)
|
||||||
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- CodeCompanion
|
||||||
|
{
|
||||||
|
"olimorris/codecompanion.nvim",
|
||||||
|
dependencies = { "nvim-lua/plenary.nvim", "nvim-treesitter/nvim-treesitter", "echasnovski/mini.diff" },
|
||||||
|
opts = {
|
||||||
|
display = { diff = { provider = "mini_diff" }, chat = { show_settings = true } },
|
||||||
|
strategies = {
|
||||||
|
chat = { adapter = "gemini_deep" },
|
||||||
|
inline = { adapter = "gemini" },
|
||||||
|
cmd = { adapter = "gemini" },
|
||||||
|
},
|
||||||
|
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 = {
|
||||||
|
model = { default = "gemini-2.5-pro-preview-03-25" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
ollama = function()
|
||||||
|
return require("codecompanion.adapters").extend("ollama", {
|
||||||
|
env = {
|
||||||
|
url = "http://scimitar.lan:11434",
|
||||||
|
},
|
||||||
|
schema = {
|
||||||
|
model = { default = "deepseek-r1:7b" },
|
||||||
|
num_ctx = { default = 8192 },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Map Leader
|
-- General settings
|
||||||
vim.g.mapleader = ","
|
vim.opt.guifont = "JetBrainsMono Nerd Font:h13"
|
||||||
|
|
||||||
-- Flash config
|
-- LSP Mappings
|
||||||
local flash = require("flash")
|
|
||||||
flash.setup()
|
|
||||||
vim.keymap.set({ "n", "x", "o" }, "s", flash.jump, { desc = "Flash" })
|
|
||||||
vim.keymap.set({ "n", "x", "o" }, "S", flash.treesitter, { desc = "Flash Treesitter" })
|
|
||||||
vim.keymap.set("o", "r", flash.remote, { desc = "Remote Flash" })
|
|
||||||
vim.keymap.set({ "o", "x" }, "R", flash.treesitter_search, { desc = "Treesitter Search" })
|
|
||||||
vim.keymap.set("c", "<c-s>", flash.toggle, { desc = "Toggle Flash Search" })
|
|
||||||
|
|
||||||
-- LSP Mappings.
|
|
||||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
|
||||||
local opts = { silent = true }
|
local opts = { silent = true }
|
||||||
vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
|
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_prev, opts)
|
||||||
|
@ -197,8 +350,9 @@ local on_attach = function(client, bufnr)
|
||||||
end, bufopts)
|
end, bufopts)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- LSP Setup
|
||||||
local lspconfig = require("lspconfig")
|
local lspconfig = require("lspconfig")
|
||||||
local coq = require("coq")
|
local capabilities = require("blink.cmp").get_lsp_capabilities()
|
||||||
|
|
||||||
local lsp_flags = {
|
local lsp_flags = {
|
||||||
-- This is the default in Nvim 0.7+
|
-- This is the default in Nvim 0.7+
|
||||||
|
@ -208,9 +362,10 @@ local lsp_flags = {
|
||||||
-- 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/language-server")
|
||||||
|
|
||||||
require("typescript-tools").setup(coq.lsp_ensure_capabilities({
|
require("typescript-tools").setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
|
capabilities = capabilities,
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"typescript",
|
"typescript",
|
||||||
"javascript",
|
"javascript",
|
||||||
|
@ -223,14 +378,16 @@ require("typescript-tools").setup(coq.lsp_ensure_capabilities({
|
||||||
"@vue/typescript-plugin",
|
"@vue/typescript-plugin",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}))
|
})
|
||||||
|
|
||||||
local servers = { "volar", "elixirls", "gopls", "pylsp" }
|
local servers = { "volar", "elixirls", "gopls", "pylsp" }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig[lsp].setup(coq.lsp_ensure_capabilities({
|
lspconfig[lsp].setup({
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
}))
|
capabilities = capabilities,
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Source config.vim
|
||||||
vim.cmd("source ~/.config/nvim/config.vim")
|
vim.cmd("source ~/.config/nvim/config.vim")
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
[alias]
|
[alias]
|
||||||
co = checkout
|
co = checkout
|
||||||
sco = restore --staged
|
rs = restore
|
||||||
|
rss = restore --staged
|
||||||
br = branch
|
br = branch
|
||||||
cm = commit
|
cm = commit
|
||||||
st = status
|
st = status
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
merff = merge --ff-only
|
merff = merge --ff-only
|
||||||
fa = fetch --all
|
fa = fetch --all
|
||||||
pa = push --all
|
pa = push --all
|
||||||
|
ap = add --patch
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
editor = nvim
|
editor = nvim
|
||||||
|
|
6
.skhdrc
6
.skhdrc
|
@ -1,5 +1,5 @@
|
||||||
# open terminal
|
# open terminal
|
||||||
cmd - return : /usr/local/bin/wezterm-gui start
|
cmd - return : /Applications/WezTerm.app/Contents/MacOS/wezterm-gui
|
||||||
|
|
||||||
# open web browser
|
# open web browser
|
||||||
shift + cmd - return : /Applications/Firefox.app/Contents/MacOS/firefox
|
shift + cmd - return : /Applications/Firefox.app/Contents/MacOS/firefox
|
||||||
|
@ -50,8 +50,8 @@ cmd + alt - w : yabai -m space --destroy
|
||||||
|
|
||||||
# fast focus desktop
|
# fast focus desktop
|
||||||
cmd + alt - x : yabai -m space --focus recent
|
cmd + alt - x : yabai -m space --focus recent
|
||||||
cmd + alt - z : yabai -m space --focus prev
|
cmd - 0x21 : yabai -m space --focus prev
|
||||||
cmd + alt - c : yabai -m space --focus next
|
cmd - 0x1E : yabai -m space --focus next
|
||||||
cmd + alt - 1 : yabai -m space --focus 1
|
cmd + alt - 1 : yabai -m space --focus 1
|
||||||
cmd + alt - 2 : yabai -m space --focus 2
|
cmd + alt - 2 : yabai -m space --focus 2
|
||||||
cmd + alt - 3 : yabai -m space --focus 3
|
cmd + alt - 3 : yabai -m space --focus 3
|
||||||
|
|
11
.wezterm.lua
11
.wezterm.lua
|
@ -6,6 +6,12 @@ local is_darwin = function()
|
||||||
return wezterm.target_triple:find("darwin") ~= nil
|
return wezterm.target_triple:find("darwin") ~= nil
|
||||||
end
|
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.force_reverse_video_cursor = true
|
||||||
config.colors = {
|
config.colors = {
|
||||||
foreground = "#dcd7ba",
|
foreground = "#dcd7ba",
|
||||||
|
@ -26,10 +32,9 @@ config.colors = {
|
||||||
indexed = { [16] = "#ffa066", [17] = "#ff5d62" },
|
indexed = { [16] = "#ffa066", [17] = "#ff5d62" },
|
||||||
}
|
}
|
||||||
|
|
||||||
config.window_background_opacity = 0.7
|
config.window_background_opacity = is_darwin() and 0.85 or 0.7
|
||||||
config.window_decorations = "RESIZE"
|
|
||||||
|
|
||||||
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.tab_bar_at_bottom = true
|
||||||
config.hide_tab_bar_if_only_one_tab = true
|
config.hide_tab_bar_if_only_one_tab = true
|
||||||
|
|
Loading…
Reference in New Issue