From a0229581e65a1934e1d0bf0e1aacb8852c1a38e7 Mon Sep 17 00:00:00 2001 From: Adam Daugherty Date: Tue, 21 Jul 2026 11:59:16 -0400 Subject: [PATCH] latest updates --- .gitignore | 1 + alacritty/alacritty.toml | 4 +- fish/completions/nvm.fish | 21 ++ fish/conf.d/nvm.fish | 28 +++ fish/config.fish | 3 + fish/fish_plugins | 1 + fish/fish_variables | 4 +- fish/functions/_nvm_index_update.fish | 20 ++ fish/functions/_nvm_list.fish | 14 ++ fish/functions/_nvm_version_activate.fish | 4 + fish/functions/_nvm_version_deactivate.fish | 5 + fish/functions/nvm.fish | 237 ++++++++++++++++++ nvim/lazy-lock.json | 55 ++-- nvim/lua/adam/plugins/lsp/lspconfig.lua | 139 +++++----- nvim/lua/adam/plugins/lsp/mason.lua | 3 +- nvim/lua/adam/plugins/neotest.lua | 1 + nvim/lua/adam/plugins/nvim-tree.lua | 1 + nvim/lua/adam/plugins/nvim-treesitter.lua | 3 + nvim/lua/adam/plugins/telescope.lua | 5 + tmux/{.tmux.conf => tmux.conf} | 0 .../colors/base16-gruvbox-dark-hard.conf | 0 21 files changed, 445 insertions(+), 104 deletions(-) create mode 100644 .gitignore create mode 100644 fish/completions/nvm.fish create mode 100644 fish/conf.d/nvm.fish create mode 100644 fish/functions/_nvm_index_update.fish create mode 100644 fish/functions/_nvm_list.fish create mode 100644 fish/functions/_nvm_version_activate.fish create mode 100644 fish/functions/_nvm_version_deactivate.fish create mode 100644 fish/functions/nvm.fish rename tmux/{.tmux.conf => tmux.conf} (100%) rename tmux/{.tmux => tmux}/colors/base16-gruvbox-dark-hard.conf (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..171cc65 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tmux/tmux/plugins/ diff --git a/alacritty/alacritty.toml b/alacritty/alacritty.toml index 3922e60..678d7c2 100644 --- a/alacritty/alacritty.toml +++ b/alacritty/alacritty.toml @@ -14,8 +14,8 @@ style = "Regular" # opacity = 1.0 [window.dimensions] -columns = 180 -lines = 40 +columns = 270 +lines = 60 # Base16 Gruvbox dark, hard - alacritty color config # Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox) diff --git a/fish/completions/nvm.fish b/fish/completions/nvm.fish new file mode 100644 index 0000000..14be1b7 --- /dev/null +++ b/fish/completions/nvm.fish @@ -0,0 +1,21 @@ +complete --command nvm --exclusive +complete --command nvm --exclusive --long version --description "Print version" +complete --command nvm --exclusive --long help --description "Print help" +complete --command nvm --long silent --description "Suppress standard output" + +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments install --description "Download and activate the specified Node version" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments use --description "Activate the specified Node version in the current shell" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed Node versions" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List available Node versions to install" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active Node version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from install" --arguments "( + test -e $nvm_data && string split ' ' <$nvm_data/.index +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use" --arguments "(_nvm_list | string split ' ')" +complete --command nvm --exclusive --condition __fish_use_subcommand --arguments uninstall --description "Uninstall the specified Node version" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from uninstall" --arguments "( + _nvm_list | string split ' ' | string replace system '' +)" +complete --command nvm --exclusive --condition "__fish_seen_subcommand_from use uninstall" --arguments "( + set --query nvm_default_version && echo default +)" diff --git a/fish/conf.d/nvm.fish b/fish/conf.d/nvm.fish new file mode 100644 index 0000000..7545699 --- /dev/null +++ b/fish/conf.d/nvm.fish @@ -0,0 +1,28 @@ +set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share +set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist +set --query nvm_data || set --global nvm_data $XDG_DATA_HOME/nvm + +function _nvm_install --on-event nvm_install + test ! -d $nvm_data && command mkdir -p $nvm_data + echo "Downloading the Node distribution index..." 2>/dev/null + _nvm_index_update +end + +function _nvm_update --on-event nvm_update + set --query --universal nvm_data && set --erase --universal nvm_data + set --query --universal nvm_mirror && set --erase --universal nvm_mirror + set --query nvm_mirror || set --global nvm_mirror https://nodejs.org/dist +end + +function _nvm_uninstall --on-event nvm_uninstall + command rm -rf $nvm_data + + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + + set --names | string replace --filter --regex -- "^nvm" "set --erase nvm" | source + functions --erase (functions --all | string match --entire --regex -- "^_nvm_") +end + +if status is-interactive && set --query nvm_default_version && ! set --query nvm_current_version + nvm use --silent $nvm_default_version +end diff --git a/fish/config.fish b/fish/config.fish index 859442e..0b508f8 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -3,4 +3,7 @@ if status is-interactive set fish_color_user 'yellow' end +set -gx DIGITALOCEAN_ACCESS_TOKEN dop_v1_20cd9acfdb7a0c1c78d7c262741c99891ca35efee3ceae9cf0a54bb092b34b12 + source ~/.asdf/asdf.fish +export PATH="$HOME/.local/bin:$PATH" diff --git a/fish/fish_plugins b/fish/fish_plugins index 9fcad41..6018c23 100644 --- a/fish/fish_plugins +++ b/fish/fish_plugins @@ -1,2 +1,3 @@ jorgebucaran/fisher tomyun/base16-fish +jorgebucaran/nvm.fish diff --git a/fish/fish_variables b/fish/fish_variables index 429dffa..7613e90 100644 --- a/fish/fish_variables +++ b/fish/fish_variables @@ -2,7 +2,8 @@ # VERSION: 3.0 SETUVAR __fish_initialized:3400 SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish -SETUVAR _fisher_plugins:jorgebucaran/fisher\x1etomyun/base16\x2dfish +SETUVAR _fisher_jorgebucaran_2F_nvm_2E_fish_files:\x7e/\x2econfig/fish/functions/_nvm_index_update\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_list\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_activate\x2efish\x1e\x7e/\x2econfig/fish/functions/_nvm_version_deactivate\x2efish\x1e\x7e/\x2econfig/fish/functions/nvm\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/nvm\x2efish\x1e\x7e/\x2econfig/fish/completions/nvm\x2efish +SETUVAR _fisher_plugins:jorgebucaran/fisher\x1etomyun/base16\x2dfish\x1ejorgebucaran/nvm\x2efish SETUVAR _fisher_tomyun_2F_base16_2D_fish_files:\x7e/\x2econfig/fish/functions/base16\x2d3024\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dapathy\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dapprentice\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dashes\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dcave\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dcave\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2ddune\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2ddune\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2destuary\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2destuary\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dforest\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dforest\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dheath\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dheath\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dlakeside\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dlakeside\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dplateau\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dplateau\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dsavanna\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dsavanna\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dseaside\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dseaside\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dsulphurpool\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datelier\x2dsulphurpool\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2datlas\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dbespin\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2dbathory\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2dburzum\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2ddark\x2dfuneral\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2dgorgoroth\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2dimmortal\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2dkhold\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2dmarduk\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2dmayhem\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2dnile\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2dvenom\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dblack\x2dmetal\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dbrewer\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dbright\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dbrogrammer\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dbrushtrees\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dbrushtrees\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dchalk\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dcircus\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dclassic\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dclassic\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dcodeschool\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dcolors\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dcupcake\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dcupertino\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddanqing\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddarcula\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddarkmoss\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddarktooth\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddarkviolet\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddecaf\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddefault\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddefault\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddirtysea\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2ddracula\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dedge\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dedge\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2deighties\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dembers\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dequilibrium\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dequilibrium\x2dgray\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dequilibrium\x2dgray\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dequilibrium\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2despresso\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2deva\x2ddim\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2deva\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dflat\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dframer\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dfruit\x2dsoda\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgigavolt\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgithub\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgoogle\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgoogle\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgrayscale\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgrayscale\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgreenscreen\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgruvbox\x2ddark\x2dhard\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgruvbox\x2ddark\x2dmedium\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgruvbox\x2ddark\x2dpale\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgruvbox\x2ddark\x2dsoft\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgruvbox\x2dlight\x2dhard\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgruvbox\x2dlight\x2dmedium\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dgruvbox\x2dlight\x2dsoft\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dhardcore\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dharmonic\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dharmonic\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dheetch\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dheetch\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dhelios\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dhopscotch\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dhorizon\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dhorizon\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dhorizon\x2dterminal\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dhorizon\x2dterminal\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dhumanoid\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dhumanoid\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dia\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dia\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dicy\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dirblack\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2disotope\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dkimber\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmacintosh\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmarrakesh\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmateria\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmaterial\x2ddarker\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmaterial\x2dlighter\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmaterial\x2dpalenight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmaterial\x2dvivid\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmaterial\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmellow\x2dpurple\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmexico\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmocha\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dmonokai\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dnebula\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dnord\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dnova\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2docean\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2doceanicnext\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2done\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2donedark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2doutrun\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dpapercolor\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dpapercolor\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dparaiso\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dpasque\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dphd\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dpico\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dpinky\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dpop\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dporple\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dqualia\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2drailscasts\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2drebecca\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2drose\x2dpine\x2ddawn\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2drose\x2dpine\x2dmoon\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2drose\x2dpine\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsagelight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsakura\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsandcastle\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dseti\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dshades\x2dof\x2dpurple\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dshapeshifter\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsilk\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsilk\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsnazzy\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsolarflare\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsolarflare\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsolarized\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsolarized\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dspacemacs\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsummercamp\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsummerfruit\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsummerfruit\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsynth\x2dmidnight\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dsynth\x2dmidnight\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dtango\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dtender\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dtomorrow\x2dnight\x2deighties\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dtomorrow\x2dnight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dtomorrow\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dtube\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dtwilight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dunikitty\x2ddark\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dunikitty\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dvulcan\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dwindows\x2d10\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dwindows\x2d10\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dwindows\x2d95\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dwindows\x2d95\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dwindows\x2dhighcontrast\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dwindows\x2dhighcontrast\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dwindows\x2dnt\x2dlight\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dwindows\x2dnt\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dwoodland\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dxcode\x2ddusk\x2efish\x1e\x7e/\x2econfig/fish/functions/base16\x2dzenburn\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/base16\x2efish SETUVAR _fisher_upgraded_to_4_4:\x1d SETUVAR base16_theme:gruvbox\x2ddark\x2dhard @@ -35,3 +36,4 @@ SETUVAR fish_pager_color_description:yellow\x1e\x2d\x2ddim SETUVAR fish_pager_color_prefix:white\x1e\x2d\x2dbold SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_selected_background:\x2dr +SETUVAR fish_user_paths:/usr/local/go/bin diff --git a/fish/functions/_nvm_index_update.fish b/fish/functions/_nvm_index_update.fish new file mode 100644 index 0000000..c66753d --- /dev/null +++ b/fish/functions/_nvm_index_update.fish @@ -0,0 +1,20 @@ +function _nvm_index_update + test ! -d $nvm_data && command mkdir -p $nvm_data + + set --local index $nvm_data/.index + + if not command curl -q --location --silent $nvm_mirror/index.tab >$index.temp + command rm -f $index.temp + echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2 + return 1 + end + + command awk -v OFS=\t ' + /v0.9.12/ { exit } # Unsupported + NR > 1 { + print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "") + } + ' $index.temp >$index + + command rm -f $index.temp +end diff --git a/fish/functions/_nvm_list.fish b/fish/functions/_nvm_list.fish new file mode 100644 index 0000000..1623bb8 --- /dev/null +++ b/fish/functions/_nvm_list.fish @@ -0,0 +1,14 @@ +function _nvm_list + set --local versions $nvm_data/* + + set --query versions[1] && + string match --entire --regex -- ( + string replace --all -- $nvm_data/ "" $versions | + string match --regex -- "v\d.+" | + string escape --style=regex | + string join "|" + ) <$nvm_data/.index + + command --all node | + string match --quiet --invert --regex -- "^$nvm_data" && echo system +end diff --git a/fish/functions/_nvm_version_activate.fish b/fish/functions/_nvm_version_activate.fish new file mode 100644 index 0000000..f7dfef7 --- /dev/null +++ b/fish/functions/_nvm_version_activate.fish @@ -0,0 +1,4 @@ +function _nvm_version_activate --argument-names ver + set --global --export nvm_current_version $ver + set --prepend PATH $nvm_data/$ver/bin +end diff --git a/fish/functions/_nvm_version_deactivate.fish b/fish/functions/_nvm_version_deactivate.fish new file mode 100644 index 0000000..24dd36e --- /dev/null +++ b/fish/functions/_nvm_version_deactivate.fish @@ -0,0 +1,5 @@ +function _nvm_version_deactivate --argument-names ver + test "$nvm_current_version" = "$ver" && set --erase nvm_current_version + set --local index (contains --index -- $nvm_data/$ver/bin $PATH) && + set --erase PATH[$index] +end diff --git a/fish/functions/nvm.fish b/fish/functions/nvm.fish new file mode 100644 index 0000000..64d94c5 --- /dev/null +++ b/fish/functions/nvm.fish @@ -0,0 +1,237 @@ +function nvm --description "Node version manager" + for silent in --silent -s + if set --local index (contains --index -- $silent $argv) + set --erase argv[$index] && break + end + set --erase silent + end + + set --local cmd $argv[1] + set --local ver $argv[2] + + if set --query silent && ! set --query cmd[1] + echo "nvm: Version number not specified (see nvm -h for usage)" >&2 + return 1 + end + + if ! set --query ver[1] && contains -- "$cmd" install use + for file in .nvmrc .node-version + set file (_nvm_find_up $PWD $file) && read ver <$file && break + end + + if ! set --query ver[1] + echo "nvm: Invalid version or missing \".nvmrc\" file" >&2 + return 1 + end + end + + set --local their_version $ver + + switch "$cmd" + case -v --version + echo "nvm, version 2.2.18" + case "" -h --help + echo "Usage: nvm install Download and activate the specified Node version" + echo " nvm install Install the version specified in the nearest .nvmrc file" + echo " nvm use Activate the specified Node version in the current shell" + echo " nvm use Activate the version specified in the nearest .nvmrc file" + echo " nvm list List installed Node versions" + echo " nvm list-remote List available Node versions to install" + echo " nvm list-remote List Node versions matching a given regex pattern" + echo " nvm current Print the currently-active Node version" + echo " nvm uninstall Uninstall the specified Node version" + echo "Options:" + echo " -s, --silent Suppress standard output" + echo " -v, --version Print the version of nvm" + echo " -h, --help Print this help message" + echo "Variables:" + echo " nvm_arch Override architecture, e.g. x64-musl" + echo " nvm_mirror Use a mirror for downloading Node binaries" + echo " nvm_default_version Set the default version for new shells" + echo " nvm_default_packages Install a list of packages every time a Node version is installed" + echo " nvm_data Set a custom directory for storing nvm data" + echo "Examples:" + echo " nvm install latest Install the latest version of Node" + echo " nvm use 14.15.1 Use Node version 14.15.1" + echo " nvm use system Activate the system's Node version" + + case install + _nvm_index_update + + string match --entire --regex -- (_nvm_version_match $ver) <$nvm_data/.index | read ver alias + + if ! set --query ver[1] + echo "nvm: Invalid version number or alias: \"$their_version\"" >&2 + return 1 + end + + if test ! -e $nvm_data/$ver + set --local os (command uname -s | string lower) + set --local ext tar.gz + set --local arch (command uname -m) + set --local tarcmd tar + + switch $os + case aix + set arch ppc64 + case sunos + case linux + case darwin + case {msys_nt,mingw\*_nt}\* + set os win + set ext zip + set tarcmd bsdtar + case \* + echo "nvm: Unsupported operating system: \"$os\"" >&2 + return 1 + end + + switch $arch + case i\*86 + set arch x86 + case x86_64 + set arch x64 + case arm64 + string match --regex --quiet "v(?\d+)" $ver + if test "$os" = darwin -a $major -lt 16 + set arch x64 + end + case armv6 armv6l + set arch armv6l + case armv7 armv7l + set arch armv7l + case armv8 armv8l aarch64 + set arch arm64 + end + + set --query nvm_arch && set arch $nvm_arch + + set --local dir "node-$ver-$os-$arch" + set --local url $nvm_mirror/$ver/$dir.$ext + + command mkdir -p $nvm_data/$ver + + if ! set --query silent + echo -e "Installing Node \x1b[1m$ver\x1b[22m $alias" + echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m" + end + + if ! command curl -q $silent --progress-bar --location $url | + command $tarcmd --extract --gzip --directory $nvm_data/$ver 2>/dev/null + command rm -rf $nvm_data/$ver + echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2 + return 1 + end + + set --query silent || echo -en "\033[F\33[2K\x1b[0m" + + if test "$os" = win + command mv $nvm_data/$ver/$dir $nvm_data/$ver/bin + else + command mv $nvm_data/$ver/$dir/* $nvm_data/$ver + command rm -rf $nvm_data/$ver/$dir + end + end + + if test $ver != "$nvm_current_version" + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + _nvm_version_activate $ver + + set --query nvm_default_packages[1] && npm install --global $silent $nvm_default_packages + end + + set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) + case use + test $ver = default && set ver $nvm_default_version + _nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __ + + if ! set --query ver[1] + echo "nvm: Can't use Node \"$their_version\", version must be installed first" >&2 + return 1 + end + + if test $ver != "$nvm_current_version" + set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version + test $ver != system && _nvm_version_activate $ver + end + + set --query silent || printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) + case uninstall + if test -z "$ver" + echo "nvm: Not enough arguments for command: \"$cmd\"" >&2 + return 1 + end + + test $ver = default && test ! -z "$nvm_default_version" && set ver $nvm_default_version + + _nvm_list | string match --entire --regex -- (_nvm_version_match $ver) | read ver __ + + if ! set -q ver[1] + echo "nvm: Node version not installed or invalid: \"$their_version\"" >&2 + return 1 + end + + set --query silent || printf "Uninstalling Node %s %s\n" $ver (string replace ~ \~ "$nvm_data/$ver/bin/node") + + _nvm_version_deactivate $ver + + command rm -rf $nvm_data/$ver + case current + _nvm_current + case ls list + _nvm_list | _nvm_list_format (_nvm_current) $argv[2] + case lsr {ls,list}-remote + _nvm_index_update || return + _nvm_list | command awk ' + FILENAME == "-" && (is_local[$1] = FNR == NR) { next } { + print $0 (is_local[$1] ? " ✓" : "") + } + ' - $nvm_data/.index | _nvm_list_format (_nvm_current) $argv[2] + case \* + echo "nvm: Unknown command or option: \"$cmd\" (see nvm -h for usage)" >&2 + return 1 + end +end + +function _nvm_find_up --argument-names path file + test -e "$path/$file" && echo $path/$file || begin + test ! -z "$path" || return + _nvm_find_up (string replace --regex -- '/[^/]*$' "" $path) $file + end +end + +function _nvm_version_match --argument-names ver + string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $ver | + string replace --filter --regex -- '^v?(\d+)' 'v$1' | + string escape --style=regex || string lower '\b'$ver'(?:/\w+)?$' +end + +function _nvm_list_format --argument-names current regex + command awk -v current="$current" -v regex="$regex" ' + $0 ~ regex { + aliases[versions[i++] = $1] = $2 " " $3 + pad = (n = length($1)) > pad ? n : pad + } + END { + if (!i) exit 1 + while (i--) + printf((current == versions[i] ? " ▶ " : " ") "%"pad"s %s\n", + versions[i], aliases[versions[i]]) + } + ' +end + +function _nvm_current + command --search --quiet node || return + set --query nvm_current_version && echo $nvm_current_version || echo system +end + +function _nvm_node_info + set --local npm_path (string replace bin/npm-cli.js "" (realpath (command --search npm))) + test -f $npm_path/package.json || set --local npm_version_default (command npm --version) + command node --eval " + console.log(process.version) + console.log('$npm_version_default' ? '$npm_version_default': require('$npm_path/package.json').version) + console.log(process.execPath) + " | string replace -- ~ \~ +end diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index b5fe326..799ece8 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,33 +1,34 @@ { - "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "LuaSnip": { "branch": "master", "commit": "f03089854a8e15594a01562fa7192d0009a6fbe7" }, - "base16-nvim": { "branch": "master", "commit": "2349e8357864bf0ef45d40f491f8e1e6465485b0" }, - "bufferline.nvim": { "branch": "main", "commit": "6ecd37e0fa8b156099daedd2191130e083fb1490" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, - "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, - "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "4eb8e15e3c0757303d4c6dea64d2981fc679e990" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, - "neotest": { "branch": "master", "commit": "d424d262d01bccc1e0b038c9a7220a755afd2a1f" }, - "neotest-elixir": { "branch": "master", "commit": "3117ca5442c02998847131c39551b76a6ceac9d7" }, - "neotest-go": { "branch": "main", "commit": "d29d20d912aca81a07c50022d880cc66f0d26542" }, - "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, - "nvim-lspconfig": { "branch": "master", "commit": "694aaec65733e2d54d393abf80e526f86726c988" }, - "nvim-tree.lua": { "branch": "master", "commit": "05f55c1fd6470b31627655c528245794e3cd4b2c" }, - "nvim-treesitter": { "branch": "master", "commit": "841dde702ce2e58ffc3724808f3dbea2edee57d5" }, - "nvim-web-devicons": { "branch": "master", "commit": "5efb8bd06841f91f97c90e16de85e96d57e9c862" }, - "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "base16-nvim": { "branch": "master", "commit": "23e5128eb5f629c29532c24a1e733cbe019f05bb" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" }, + "cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" }, + "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, + "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, + "lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" }, + "lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7b01e2974a47d489bb92f47a41e4c0088ea8f86e" }, + "mason.nvim": { "branch": "main", "commit": "cbf8d285e1462dd24acf3507817be2bbcb035919" }, + "neotest": { "branch": "master", "commit": "ad991822b7076b1d940b33a9d6d0d30416d5df81" }, + "neotest-elixir": { "branch": "master", "commit": "a242aebeaa6997c1c149138ff77f6cacbe33b6fc" }, + "neotest-go": { "branch": "main", "commit": "59b50505053f9c45a9febb79e11a56206c3e3901" }, + "nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" }, + "nvim-lspconfig": { "branch": "master", "commit": "dfbada1a311c4bf3369f8d5421369c9b6e8b888f" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-tree.lua": { "branch": "master", "commit": "07f541fcaa4a5ae019598240362449ab7e9812b3" }, + "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, + "nvim-web-devicons": { "branch": "master", "commit": "0d7d35fa946837b8738b17c18d1faa1ac351e7f9" }, + "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }, - "vim-tmux-navigator": { "branch": "master", "commit": "7db70e08ea03b3e4d91f63713d76134512e28d7e" }, - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } + "vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" }, + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } \ No newline at end of file diff --git a/nvim/lua/adam/plugins/lsp/lspconfig.lua b/nvim/lua/adam/plugins/lsp/lspconfig.lua index d416232..ad5aa3b 100644 --- a/nvim/lua/adam/plugins/lsp/lspconfig.lua +++ b/nvim/lua/adam/plugins/lsp/lspconfig.lua @@ -5,89 +5,29 @@ return { "hrsh7th/cmp-nvim-lsp", }, config = function() - local lspconfig = require("lspconfig") local cmp_nvim_lsp = require("cmp_nvim_lsp") - local keymap = vim.keymap - local opts = { noremap = true, silent = true } - local on_attach = function(client, bufnr) - opts.buffer = bufnr - - opts.desc = "Show LSP references" - keymap.set("n", "gR", "Telescope lsp_references", opts) -- show definition, references - - opts.desc = "Go to declaration" - keymap.set("n", "gD", vim.lsp.buf.declaration, opts) -- go to declaration - - opts.desc = "Show LSP definitions" - keymap.set("n", "gd", "Telescope lsp_definitions", opts) -- show lsp definitions - - opts.desc = "Show LSP implementations" - keymap.set("n", "gi", "Telescope lsp_implementations", opts) -- show lsp implementations - - opts.desc = "Show LSP type definitions" - keymap.set("n", "gt", "Telescope lsp_type_definitions", opts) -- show lsp type definitions - - opts.desc = "See available code actions" - keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) -- see available code actions, in visual mode will apply to selection - - opts.desc = "Smart rename" - keymap.set("n", "rn", vim.lsp.buf.rename, opts) -- smart rename - - opts.desc = "Show buffer diagnostics" - keymap.set("n", "D", "Telescope diagnostics bufnr=0", opts) -- show diagnostics for file - - opts.desc = "Show line diagnostics" - keymap.set("n", "d", vim.diagnostic.open_float, opts) -- show diagnostics for line - - opts.desc = "Go to previous diagnostic" - keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) -- jump to previous diagnostic in buffer - - opts.desc = "Go to next diagnostic" - keymap.set("n", "]d", vim.diagnostic.goto_next, opts) -- jump to next diagnostic in buffer - - opts.desc = "Show documentation for what is under cursor" - keymap.set("n", "K", vim.lsp.buf.hover, opts) -- show documentation for what is under cursor - - opts.desc = "Restart LSP" - keymap.set("n", "rs", ":LspRestart", opts) -- mapping to restart lsp if necessary - - client.server_capabilities.semanticTokensProvider = nil - end - local capabilities = cmp_nvim_lsp.default_capabilities() - local signs = { Error = " ", Warn = " ", Hint = "󰠠 ", Info = " " } + local signs = { Error = " ", Warn = " ", Hint = "󰠠 ", Info = " " } for type, icon in pairs(signs) do local hl = "DiagnosticSign" .. type vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) end - lspconfig["elixirls"].setup({ - capabilities = capabilities, - on_attach = on_attach, - cmd = { "/home/adam/.elixirls/language_server.sh" } - }) - - lspconfig["rust_analyzer"].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) - - lspconfig["pyright"].setup({ - capabilities = capabilities, - on_attach = on_attach, - }) + -- Configure servers + local servers = { "expert", "ts_ls", "rust_analyzer", "pyright", "gopls" } + for _, server in ipairs(servers) do + vim.lsp.config(server, { capabilities = capabilities }) + vim.lsp.enable(server) + end - lspconfig["lua_ls"].setup({ + vim.lsp.config("lua_ls", { capabilities = capabilities, - on_attach = on_attach, settings = { Lua = { - diagnostics = { - globals = { "vim" }, - }, + diagnostics = { globals = { "vim" } }, workspace = { library = { [vim.fn.expand("$VIMRUNTIME/lua")] = true, @@ -97,10 +37,63 @@ return { }, }, }) + vim.lsp.enable("lua_ls") - lspconfig["gopls"].setup({ - capabilities = capabilities, - on_attach = on_attach, + vim.api.nvim_create_autocmd("BufWritePre", { + pattern = "*.ex,*.exs", + callback = function() + vim.lsp.buf.format() + end, + }) + + -- Keymaps and on_attach via LspAttach autocommand + vim.api.nvim_create_autocmd("LspAttach", { + callback = function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + local bufnr = args.buf + local opts = { noremap = true, silent = true, buffer = bufnr } + + opts.desc = "Show LSP references" + keymap.set("n", "gR", "Telescope lsp_references", opts) + + opts.desc = "Go to declaration" + keymap.set("n", "gD", vim.lsp.buf.declaration, opts) + + opts.desc = "Show LSP definitions" + keymap.set("n", "gd", "Telescope lsp_definitions", opts) + + opts.desc = "Show LSP implementations" + keymap.set("n", "gi", "Telescope lsp_implementations", opts) + + opts.desc = "Show LSP type definitions" + keymap.set("n", "gt", "Telescope lsp_type_definitions", opts) + + opts.desc = "See available code actions" + keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) + + opts.desc = "Smart rename" + keymap.set("n", "rn", vim.lsp.buf.rename, opts) + + opts.desc = "Show buffer diagnostics" + keymap.set("n", "D", "Telescope diagnostics bufnr=0", opts) + + opts.desc = "Show line diagnostics" + keymap.set("n", "d", vim.diagnostic.open_float, opts) + + opts.desc = "Go to previous diagnostic" + keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) + + opts.desc = "Go to next diagnostic" + keymap.set("n", "]d", vim.diagnostic.goto_next, opts) + + opts.desc = "Show documentation for what is under cursor" + keymap.set("n", "K", vim.lsp.buf.hover, opts) + + opts.desc = "Restart LSP" + keymap.set("n", "rs", ":LspRestart", opts) + + client.server_capabilities.semanticTokensProvider = nil + end, }) end, -} +} \ No newline at end of file diff --git a/nvim/lua/adam/plugins/lsp/mason.lua b/nvim/lua/adam/plugins/lsp/mason.lua index 3399791..7299260 100644 --- a/nvim/lua/adam/plugins/lsp/mason.lua +++ b/nvim/lua/adam/plugins/lsp/mason.lua @@ -22,7 +22,8 @@ return { mason_lspconfig.setup({ ensure_installed = { - "elixirls", + "expert", + "ts_ls", "rust_analyzer", "lua_ls", "pyright", diff --git a/nvim/lua/adam/plugins/neotest.lua b/nvim/lua/adam/plugins/neotest.lua index df5c764..b268a3a 100644 --- a/nvim/lua/adam/plugins/neotest.lua +++ b/nvim/lua/adam/plugins/neotest.lua @@ -1,6 +1,7 @@ return { "nvim-neotest/neotest", dependencies = { + "nvim-neotest/nvim-nio", "nvim-lua/plenary.nvim", "antoinemadec/FixCursorHold.nvim", "jfpedroza/neotest-elixir", diff --git a/nvim/lua/adam/plugins/nvim-tree.lua b/nvim/lua/adam/plugins/nvim-tree.lua index 00ac637..490ea0f 100644 --- a/nvim/lua/adam/plugins/nvim-tree.lua +++ b/nvim/lua/adam/plugins/nvim-tree.lua @@ -13,6 +13,7 @@ return { vim.cmd([[ highlight NvimTreeFolderArrowOpen guifg=#3FC5FF ]]) nvimtree.setup({ + hijack_netrw = true, view = { width = 35, relativenumber = true, diff --git a/nvim/lua/adam/plugins/nvim-treesitter.lua b/nvim/lua/adam/plugins/nvim-treesitter.lua index ec5db00..caa0518 100644 --- a/nvim/lua/adam/plugins/nvim-treesitter.lua +++ b/nvim/lua/adam/plugins/nvim-treesitter.lua @@ -15,6 +15,9 @@ return { }, ensure_installed = { "elixir", + "javascript", + "typescript", + "tsx", "rust", "dockerfile", "lua", diff --git a/nvim/lua/adam/plugins/telescope.lua b/nvim/lua/adam/plugins/telescope.lua index 3e7563b..2c2f1d5 100644 --- a/nvim/lua/adam/plugins/telescope.lua +++ b/nvim/lua/adam/plugins/telescope.lua @@ -19,6 +19,11 @@ return { [""] = actions.send_selected_to_qflist + actions.open_qflist, } } + }, + pickers = { + find_files = { + file_ignore_patterns = { "^_build/", "deps" } + } } }) diff --git a/tmux/.tmux.conf b/tmux/tmux.conf similarity index 100% rename from tmux/.tmux.conf rename to tmux/tmux.conf diff --git a/tmux/.tmux/colors/base16-gruvbox-dark-hard.conf b/tmux/tmux/colors/base16-gruvbox-dark-hard.conf similarity index 100% rename from tmux/.tmux/colors/base16-gruvbox-dark-hard.conf rename to tmux/tmux/colors/base16-gruvbox-dark-hard.conf