From a1d6caa5fb3545d2af3035a2780ba4836c11ec9b Mon Sep 17 00:00:00 2001 From: Uttarayan Mondal Date: Fri, 21 Jul 2023 12:25:50 +0530 Subject: [PATCH] [fix] Change a lot of things --- config/fish/completions/nvm.fish | 19 -- config/fish/conf.d/nvm.fish | 28 --- config/fish/fish_plugins | 1 - config/fish/fish_variables | 5 +- config/fish/functions/_nvm_index_update.fish | 16 -- config/fish/functions/_nvm_list.fish | 11 - .../fish/functions/_nvm_version_activate.fish | 4 - .../functions/_nvm_version_deactivate.fish | 5 - config/fish/functions/nvm.fish | 208 ------------------ config/nvim/init.lua | 5 +- config/nvim/lazy-lock.json | 60 ++--- config/nvim/lua/keymaps.lua | 37 +++- config/nvim/lua/plugins.lua | 24 +- config/tmux/tmux.conf | 2 +- 14 files changed, 75 insertions(+), 350 deletions(-) delete mode 100644 config/fish/completions/nvm.fish delete mode 100644 config/fish/conf.d/nvm.fish delete mode 100644 config/fish/functions/_nvm_index_update.fish delete mode 100644 config/fish/functions/_nvm_list.fish delete mode 100644 config/fish/functions/_nvm_version_activate.fish delete mode 100644 config/fish/functions/_nvm_version_deactivate.fish delete mode 100644 config/fish/functions/nvm.fish diff --git a/config/fish/completions/nvm.fish b/config/fish/completions/nvm.fish deleted file mode 100644 index e94e50c7..00000000 --- a/config/fish/completions/nvm.fish +++ /dev/null @@ -1,19 +0,0 @@ -complete --command nvm --exclusive --long version --description "Print version" -complete --command nvm --exclusive --long help --description "Print help" - -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 a version in the current shell" -complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list --description "List installed versions" -complete --command nvm --exclusive --condition __fish_use_subcommand --arguments list-remote --description "List versions available to install matching optional regex" -complete --command nvm --exclusive --condition __fish_use_subcommand --arguments current --description "Print the currently-active 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 a 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/config/fish/conf.d/nvm.fish b/config/fish/conf.d/nvm.fish deleted file mode 100644 index 347c2bd7..00000000 --- a/config/fish/conf.d/nvm.fish +++ /dev/null @@ -1,28 +0,0 @@ -function _nvm_install --on-event nvm_install - set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share - set --universal nvm_data $XDG_DATA_HOME/nvm - set --query nvm_mirror || set --universal nvm_mirror https://nodejs.org/dist - - test ! -d $nvm_data && command mkdir -p $nvm_data - echo "Downloading the Node distribution index..." 2>/dev/null - _nvm_index_update $nvm_mirror $nvm_data/.index -end - -function _nvm_update --on-event nvm_update - set --query XDG_DATA_HOME || set --local XDG_DATA_HOME ~/.local/share - set --universal nvm_data $XDG_DATA_HOME/nvm - set --query nvm_mirror || set --universal 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 $nvm_default_version >/dev/null -end diff --git a/config/fish/fish_plugins b/config/fish/fish_plugins index 9673b425..594dfc03 100644 --- a/config/fish/fish_plugins +++ b/config/fish/fish_plugins @@ -1,2 +1 @@ jorgebucaran/fisher -jorgebucaran/nvm.fish diff --git a/config/fish/fish_variables b/config/fish/fish_variables index 3f7214c3..adf7fc85 100644 --- a/config/fish/fish_variables +++ b/config/fish/fish_variables @@ -4,8 +4,7 @@ SETUVAR AFTERSHOOT_LOG:desktop_rust_backend\x3dtrace SETUVAR BW_SESSION:lW6\x2bALLBSowAJgVMgqI6sSMqku9z/192K\x2bDNX0jF2WlzRGhBtKGlUAqXJgbWKTw/cDKU2MRO5Z/6aQPi6fkA6Q\x3d\x3d SETUVAR __fish_initialized:3400 SETUVAR _fisher_jorgebucaran_2F_fisher_files:/Users/fs0c131y/\x2econfig/fish/functions/fisher\x2efish\x1e/Users/fs0c131y/\x2econfig/fish/completions/fisher\x2efish -SETUVAR _fisher_jorgebucaran_2F_nvm_2E_fish_files:/Users/fs0c131y/\x2econfig/fish/functions/_nvm_index_update\x2efish\x1e/Users/fs0c131y/\x2econfig/fish/functions/_nvm_list\x2efish\x1e/Users/fs0c131y/\x2econfig/fish/functions/_nvm_version_activate\x2efish\x1e/Users/fs0c131y/\x2econfig/fish/functions/_nvm_version_deactivate\x2efish\x1e/Users/fs0c131y/\x2econfig/fish/functions/nvm\x2efish\x1e/Users/fs0c131y/\x2econfig/fish/conf\x2ed/nvm\x2efish\x1e/Users/fs0c131y/\x2econfig/fish/completions/nvm\x2efish -SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejorgebucaran/nvm\x2efish +SETUVAR _fisher_plugins:jorgebucaran/fisher SETUVAR fish_color_autosuggestion:555\x1ebrblack SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_command:005fd7 @@ -36,5 +35,3 @@ SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_selected_background:\x2dr SETUVAR fish_user_paths:/opt/homebrew/bin\x1e/usr/lib/emscripten\x1e/home/fs0c131y/\x2elocal/bin\x1e/home/fs0c131y/\x2ecargo/bin\x1e/opt/homebrew/Cellar/arm\x2dgcc\x2dbin\x408/8\x2d2019\x2dq3\x2dupdate_2/bin\x1e/Users/fs0c131y/\x2ecargo/bin\x1e/Users/fs0c131y/\x2elocal/bin -SETUVAR nvm_data:/Users/fs0c131y/\x2elocal/share/nvm -SETUVAR nvm_mirror:https\x3a//nodejs\x2eorg/dist diff --git a/config/fish/functions/_nvm_index_update.fish b/config/fish/functions/_nvm_index_update.fish deleted file mode 100644 index 0ba33058..00000000 --- a/config/fish/functions/_nvm_index_update.fish +++ /dev/null @@ -1,16 +0,0 @@ -function _nvm_index_update --argument-names mirror index - if not command curl --location --silent $mirror/index.tab >$index.temp - command rm -f $index.temp - echo "nvm: Can't update index, host unavailable: \"$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/config/fish/functions/_nvm_list.fish b/config/fish/functions/_nvm_list.fish deleted file mode 100644 index fb5ab0ed..00000000 --- a/config/fish/functions/_nvm_list.fish +++ /dev/null @@ -1,11 +0,0 @@ -function _nvm_list - set --local versions $nvm_data/* - set --query versions[1] && - string match --entire --regex -- (string match --regex -- "v\d.+" $versions | - 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/config/fish/functions/_nvm_version_activate.fish b/config/fish/functions/_nvm_version_activate.fish deleted file mode 100644 index b2aee92a..00000000 --- a/config/fish/functions/_nvm_version_activate.fish +++ /dev/null @@ -1,4 +0,0 @@ -function _nvm_version_activate --argument-names v - set --global --export nvm_current_version $v - set --prepend PATH $nvm_data/$v/bin -end diff --git a/config/fish/functions/_nvm_version_deactivate.fish b/config/fish/functions/_nvm_version_deactivate.fish deleted file mode 100644 index 540f6974..00000000 --- a/config/fish/functions/_nvm_version_deactivate.fish +++ /dev/null @@ -1,5 +0,0 @@ -function _nvm_version_deactivate --argument-names v - test "$nvm_current_version" = "$v" && set --erase nvm_current_version - set --local index (contains --index -- $nvm_data/$v/bin $PATH) && - set --erase PATH[$index] -end diff --git a/config/fish/functions/nvm.fish b/config/fish/functions/nvm.fish deleted file mode 100644 index 77ec62eb..00000000 --- a/config/fish/functions/nvm.fish +++ /dev/null @@ -1,208 +0,0 @@ -function nvm --argument-names cmd v --description "Node version manager" - if test -z "$v" && contains -- "$cmd" install use - for file in .nvmrc .node-version - set file (_nvm_find_up $PWD $file) && read v <$file && break - end - if test -z "$v" - echo "nvm: Invalid version or missing \".nvmrc\" file" >&2 - return 1 - end - end - - set --local their_version $v - - switch "$cmd" - case -v --version - echo "nvm, version 2.2.7" - case "" -h --help - echo "Usage: nvm install Download and activate the specified Node version" - echo " nvm install Install version from nearest .nvmrc file" - echo " nvm use Activate a version in the current shell" - echo " nvm use Activate version from nearest .nvmrc file" - echo " nvm list List installed versions" - echo " nvm list-remote List versions available to install" - echo " nvm list-remote List versions matching a given regular expression" - echo " nvm current Print the currently-active version" - echo " nvm uninstall Uninstall a version" - echo "Options:" - echo " -v or --version Print version" - echo " -h or --help Print this help message" - echo "Variables:" - echo " nvm_arch Override architecture, e.g. x64-musl" - echo " nvm_mirror Set the Node download mirror" - echo " nvm_default_version Set the default version for new shells" - case install - _nvm_index_update $nvm_mirror $nvm_data/.index || return - - string match --entire --regex -- (_nvm_version_match $v) <$nvm_data/.index | read v alias - - if ! set --query v[1] - echo "nvm: Invalid version number or alias: \"$their_version\"" >&2 - return 1 - end - - if test ! -e $nvm_data/$v - set --local os (command uname -s | string lower) - set --local ext tar.gz - set --local arch (command uname -m) - - switch $os - case aix - set arch ppc64 - case sunos - case linux - case darwin - case {MSYS_NT,MINGW\*_NT}\* - set os win - set ext zip - 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+)" $v - 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-$v-$os-$arch" - set --local url $nvm_mirror/$v/$dir.$ext - - command mkdir -p $nvm_data/$v - - echo -e "Installing Node \x1b[1m$v\x1b[22m $alias" - echo -e "Fetching \x1b[4m$url\x1b[24m\x1b[7m" - - if ! command curl --progress-bar --location $url \ - | command tar --extract --gzip --directory $nvm_data/$v 2>/dev/null - command rm -rf $nvm_data/$v - echo -e "\033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \"$url\"" >&2 - return 1 - end - - echo -en "\033[F\33[2K\x1b[0m" - - if test "$os" = win - command mv $nvm_data/$v/$dir $nvm_data/$v/bin - else - command mv $nvm_data/$v/$dir/* $nvm_data/$v - command rm -rf $nvm_data/$v/$dir - end - end - - if test $v != "$nvm_current_version" - set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version - _nvm_version_activate $v - end - - printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) - case use - test $v = default && set v $nvm_default_version - _nvm_list | string match --entire --regex -- (_nvm_version_match $v) | read v __ - - if ! set --query v[1] - echo "nvm: Can't use Node \"$their_version\", version must be installed first" >&2 - return 1 - end - - if test $v != "$nvm_current_version" - set --query nvm_current_version && _nvm_version_deactivate $nvm_current_version - test $v != system && _nvm_version_activate $v - end - - printf "Now using Node %s (npm %s) %s\n" (_nvm_node_info) - case uninstall - if test -z "$v" - echo "nvm: Not enough arguments for command: \"$cmd\"" >&2 - return 1 - end - - test $v = default && test ! -z "$nvm_default_version" && set v $nvm_default_version - - _nvm_list | string match --entire --regex -- (_nvm_version_match $v) | read v __ - - if ! set -q v[1] - echo "nvm: Node version not installed or invalid: \"$their_version\"" >&2 - return 1 - end - - printf "Uninstalling Node %s %s\n" $v (string replace ~ \~ "$nvm_data/$v/bin/node") - - _nvm_version_deactivate $v - - command rm -rf $nvm_data/$v - case current - _nvm_current - case ls list - _nvm_list | _nvm_list_format (_nvm_current) $argv[2] - case lsr {ls,list}-remote - _nvm_index_update $nvm_mirror $nvm_data/.index || 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)" >&2 - return 1 - end -end - -function _nvm_find_up --argument-names path file - test -e "$path/$file" && echo $path/$file || begin - test "$path" != / || return - _nvm_find_up (command dirname $path) $file - end -end - -function _nvm_version_match --argument-names v - string replace --regex -- '^v?(\d+|\d+\.\d+)$' 'v$1.' $v | - string replace --filter --regex -- '^v?(\d+)' 'v$1' | - string escape --style=regex || - string lower '\b'$v'(?:/\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.replace(require('os').homedir(), '~')) - " -end diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 80540295..6981aa48 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -88,7 +88,9 @@ vim.g.coq_settings = { } } -- vim.g.rooter_manual_only = 1 -vim.g.copilot_node_command = "~/.local/share/nvm/v16.18.1/bin/node" + +local fnm_dir = os.getenv("FNM_DIR") or "/Users/fs0c131y/Library/Application Support/fnm" +vim.g.copilot_node_command = fnm_dir .. "/node-versions/v17.9.1/installation/bin/node" vim.g.copilot_no_tab_map = true require('keymaps') @@ -103,4 +105,3 @@ require 'nvim-treesitter.configs'.setup { additional_vim_regex_highlighting = false, }, } --- vim.notify = require 'notify' diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index 951688e2..77b1555b 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -1,55 +1,55 @@ { "comfortable-motion.vim": { "branch": "master", "commit": "e20aeafb07c6184727b29f7674530150f7ab2036" }, - "copilot.vim": { "branch": "release", "commit": "98c293994f1bbebd5bade5d5840ead3b2feb5074" }, - "coq.artifacts": { "branch": "artifacts", "commit": "af56cc3daf29d1da7f331f679ff45164fa189c67" }, - "coq.thirdparty": { "branch": "3p", "commit": "0ccf22d8e64d5c2d939f08ceec2587c9b9ad9844" }, - "coq_nvim": { "branch": "coq", "commit": "0e063bc90e0f8b1bb0620022ced5ff7ce9ebe119" }, + "copilot.vim": { "branch": "release", "commit": "a4a6d6b3f9e284e7f5c849619e06cd228cad8abd" }, + "coq.artifacts": { "branch": "artifacts", "commit": "f47ef45647d237598b3ceead98a15a358bbf2e33" }, + "coq.thirdparty": { "branch": "3p", "commit": "0fb2082030fb9e922a1aa4951a98aa16ecbb81c0" }, + "coq_nvim": { "branch": "coq", "commit": "ac991666d3c6fef33bf07374d2f1e3d086e60530" }, "d2-vim": { "branch": "master", "commit": "981c87dccb63df2887cc41b96e84bf550f736c57" }, - "diffview.nvim": { "branch": "main", "commit": "b3a763f8c7810b352226c95faa7d3ac9fb93b8d9" }, - "fidget.nvim": { "branch": "main", "commit": "f1c375ba68839eaa4a65efdf2aa078c0da0548fe" }, - "formatter.nvim": { "branch": "master", "commit": "fa4f2729cc2909db599169f22d8e55632d4c8d59" }, + "diffview.nvim": { "branch": "main", "commit": "e91110d2a7f8e2f667666aba6ea089ff823f8748" }, + "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, + "formatter.nvim": { "branch": "master", "commit": "9bf2e7e294b00bac87c6123c889828ee08dc9b46" }, "galaxyline.nvim": { "branch": "main", "commit": "4d4f5fc8e20a10824117e5beea7ec6e445466a8f" }, "git-conflict.nvim": { "branch": "main", "commit": "8d962d83cae924a314965f738ed1e05a4000d682" }, "glow.nvim": { "branch": "main", "commit": "bbd0473d72a45094495ee5600b5577823543eefe" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7075d7861f7a6bbf0de0298c83f8a13195e6ec01" }, - "lazy.nvim": { "branch": "main", "commit": "b7043f2983d7aead78ca902f3f2053907081859a" }, + "indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" }, + "lazy.nvim": { "branch": "main", "commit": "ed15f6b39422f46412212005f6d12c6f353b0293" }, "lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" }, - "lspsaga.nvim": { "branch": "main", "commit": "4f075452c466df263e69ae142f6659dcf9324bf6" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "d381fcb78d7a562c3244e1c8f76406954649db36" }, - "mason.nvim": { "branch": "main", "commit": "664c987c3b14d2262a4e580f993a3e5045baded0" }, - "neorg": { "branch": "main", "commit": "6fece1546d051a5f2a2d932d5978beec1ef920ab" }, - "no-neck-pain.nvim": { "branch": "main", "commit": "d3527936c4944baf0227c4f5b7fd64e7119ac13c" }, + "lspsaga.nvim": { "branch": "main", "commit": "2f9d768c30d5d68c9875deb437785e99dadd7992" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "828a538ac8419f586c010996aefa5df6eb7c250b" }, + "mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" }, + "neorg": { "branch": "main", "commit": "774f5dd80d15aa11d0221aba767da699f9533e32" }, + "no-neck-pain.nvim": { "branch": "main", "commit": "6000e12d13188e008e9539085c24ff34794da40b" }, "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, - "nvim-dap": { "branch": "master", "commit": "a6d48d23407fbad7a4c1451803b8f34cab31c441" }, - "nvim-dap-ui": { "branch": "master", "commit": "c020f660b02772f9f3d11f599fefad3268628a9e" }, - "nvim-lspconfig": { "branch": "master", "commit": "b6b34b9acf84949f0ac1c00747765e62b81fb38d" }, + "nvim-dap": { "branch": "master", "commit": "d17d1bba23ec72a157bd183c57840c39e323f515" }, + "nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" }, + "nvim-lspconfig": { "branch": "master", "commit": "dd11ba7b3c8f82d51b6d4dd7d68fce2d78bf78a0" }, "nvim-nu": { "branch": "main", "commit": "f45f36a97fb0ea6e39f08cc2fac7a2fb3dc3999b" }, - "nvim-treesitter": { "branch": "master", "commit": "f26596386f31d5bd74b85b7d1ab0fd90c5b98608" }, - "nvim-treesitter-context": { "branch": "master", "commit": "6eccc445394df5ab9b1c1e2c445c033949a6a784" }, - "nvim-web-devicons": { "branch": "master", "commit": "14b3a5ba63b82b60cde98d0a40319d80f25e8301" }, - "octo.nvim": { "branch": "master", "commit": "f498fd88bc0d9983a7fb566fa5535f8e38b874c0" }, - "plenary.nvim": { "branch": "master", "commit": "36aaceb6e93addd20b1b18f94d86aecc552f30c4" }, + "nvim-treesitter": { "branch": "master", "commit": "4115fad9fded72571bdc3e0f7351e64b31799a3d" }, + "nvim-treesitter-context": { "branch": "master", "commit": "6f8f788738b968f24a108ee599c5be0031f94f06" }, + "nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" }, + "octo.nvim": { "branch": "master", "commit": "22328c578bc013fa4b0cef3d00af35efe0c0f256" }, + "plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, - "rest.nvim": { "branch": "main", "commit": "aea7c64bdff1073beed9bd7fddb60cce7796d7ff" }, - "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, + "rest.nvim": { "branch": "main", "commit": "22673c848768ff25517154a5aebfebc0c77d0b4f" }, + "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, "sonokai": { "branch": "master", "commit": "a9b2a3e83ed4fa7a5541e41be9becaa7b436edcf" }, "ssr.nvim": { "branch": "main", "commit": "e5768511518a397fa712f26389ba30d0404990de" }, - "suda.vim": { "branch": "master", "commit": "08abd39dfe1cee681b8ce3e7321da5fa03e045c1" }, + "suda.vim": { "branch": "master", "commit": "8b0fc3711760195aba104e2d190cff9af8267052" }, "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, - "telescope.nvim": { "branch": "master", "commit": "ffe35cb433192fcb5080b557c1aef14d37092035" }, + "telescope.nvim": { "branch": "master", "commit": "47c755d737702df7a39b640c8d9c473a728be1df" }, "todo-comments.nvim": { "branch": "main", "commit": "09b0b17d824d2d56f02ff15967e8a2499a89c731" }, - "toggleterm.nvim": { "branch": "main", "commit": "cf146a267a6a7db62b1e2aff40414b20081048a1" }, + "toggleterm.nvim": { "branch": "main", "commit": "00c13dccc78c09fa5da4c5edda990a363e75035e" }, "tree-sitter-just": { "branch": "main", "commit": "4e5f5f3ff37b12a1bbf664eb3966b3019e924594" }, - "trouble.nvim": { "branch": "main", "commit": "a3372bd2ba3a91882a6e54ed35da13a441d7c167" }, + "trouble.nvim": { "branch": "main", "commit": "20d1b30d6925213abece21d35858a16e11d1e9fc" }, "vim-abolish": { "branch": "master", "commit": "cb3dcb220262777082f63972298d57ef9e9455ec" }, "vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" }, - "vim-fugitive": { "branch": "master", "commit": "43f18ab9155c853a84ded560c6104e6300ad41da" }, + "vim-fugitive": { "branch": "master", "commit": "b3b838d690f315a503ec4af8c634bdff3b200aaf" }, "vim-mergetool": { "branch": "master", "commit": "0275a85256ad173e3cde586d54f66566c01b607f" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, "vim-speeddating": { "branch": "master", "commit": "5a36fd29df63ea3f65562bd2bb837be48a5ec90b" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "vim-vinegar": { "branch": "master", "commit": "bb1bcddf43cfebe05eb565a84ab069b357d0b3d6" }, - "which-key.nvim": { "branch": "main", "commit": "d871f2b664afd5aed3dc1d1573bef2fb24ce0484" } + "which-key.nvim": { "branch": "main", "commit": "38b990f6eabf62014018b4aae70a97d7a6c2eb88" } } \ No newline at end of file diff --git a/config/nvim/lua/keymaps.lua b/config/nvim/lua/keymaps.lua index 88c6eccb..b0f703d5 100644 --- a/config/nvim/lua/keymaps.lua +++ b/config/nvim/lua/keymaps.lua @@ -1,3 +1,4 @@ +---@diagnostic disable: redefined-local local vim = vim vim.api.nvim_set_keymap('', '', '', { noremap = true, silent = true }) vim.g.mapleader = " " @@ -25,8 +26,10 @@ local normal_mode_maps = { { key = '', map = [[lua require'dap'.step_out()]] }, { key = 'bb', map = [[lua require'dap'.toggle_breakpoint()]] }, { key = 'B', map = [[lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))]] }, - { key = 'lp', - map = [[lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))]] }, + { + key = 'lp', + map = [[lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))]] + }, { key = 'dr', map = [[lua require'dap'.repl.open()]] }, { key = 'dl', map = [[lua require'dap'.run_last()]] }, @@ -46,7 +49,7 @@ local normal_mode_maps = { { key = 'rd', map = [[RustDebuggables]] }, { key = 'rr', map = [[RustRunnables]] }, { key = 'vff', map = [[vertical Gdiffsplit]] }, - { key = 'vff!', map = [[vertical Gdiffsplit!]] }, + -- { key = 'vff!', map = [[vertical Gdiffsplit!]] }, -- { key = 'ssr', map = [[lua require'rust-tools'.ssr.ssr(query)]] }, { key = 'ssr', map = [[lua require("ssr").open()]] }, { key = '', map = [[ToggleTerm]] }, @@ -56,7 +59,9 @@ local normal_mode_maps = { { key = 'sl', map = [[SessionLoad]] }, -- lsp - { key = 'K', map = [[lua vim.lsp.buf.hover()]] }, + -- { key = 'K', map = [[lua vim.lsp.buf.hover()]] }, + -- vim.keymap.set('n', 'K', 'Lspsaga hover_doc') + { key = 'K', map = [[Lspsaga hover_doc]] }, { key = '', map = [[lua vim.lsp.buf.definition()]] }, { key = 'gi', map = [[lua vim.lsp.buf.implementation()]] }, { key = 'o', map = [[TroubleToggle]] }, @@ -68,16 +73,26 @@ local normal_mode_maps = { { key = 'F', map = [[lua vim.lsp.buf.format { async = true }]] }, { key = 'T', map = [[lua require'lsp_extensions'.inlay_hints()]] }, { key = '%', map = [[vsplit]] }, + { key = '"', map = [[split]] }, { key = '', map = [[:SymbolsOutline]] }, + { key = 'A', map = [[:Lspsaga code_action]] }, -- Other { key = 'm', map = [[silent !mpcfzf]] }, - { key = 'l', - map = [[lua require('telescope.builtin').lsp_references({include_current_line = true, fname_width = 40})]] }, - { key = 'i', - map = [[lua require('telescope.builtin').lsp_incoming_calls({fname_width = 40})]] }, - { key = 'e', - map = [[RestNvim]] }, + -- { key = 'l', + -- map = [[lua require('telescope.builtin').lsp_references({include_current_line = true, fname_width = 40})]] }, + { + key = 'l', + map = [[Lspsaga finder]] + }, + { + key = 'i', + map = [[lua require('telescope.builtin').lsp_incoming_calls({fname_width = 40})]] + }, + { + key = 'e', + map = [[RestNvim]] + }, { key = 'u', map = [[Telescope undo]] }, { key = '', map = [[Telescope commands]] }, -- { key = '', map = [[call comfortable_motion#flick(40)]], options = { silent = true } }, @@ -90,7 +105,7 @@ local insert_mode_maps = { { key = '', map = '' }, -- { key = "", map = 'copilot#Accept("")', options = { silent = true, expr = true } }, -- { key = "", map = 'copilot#Accept("")', options = { silent = true, expr = true } }, - { key = '', map = [[Telescope commands]] }, + -- { key = '', map = [[Telescope commands]] }, } diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index 57fcfb23..e6e1caa3 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -230,6 +230,7 @@ return require('lazy').setup({ { 'neovim/nvim-lspconfig', ft = { "rust", "toml", "lua", "c", "cpp", "markdown", "sql", "python" }, + cmd = "LspStart", config = function() require("lsp") end @@ -372,24 +373,21 @@ return require('lazy').setup({ end }, { - "glepnir/lspsaga.nvim", + "nvimdev/lspsaga.nvim", event = "LspAttach", config = function() - require("lspsaga").setup({}) + require("lspsaga").setup({ + ui = { + code_action = 'A' + } + }) end, dependencies = { { "nvim-tree/nvim-web-devicons" }, - --Please make sure you install markdown and markdown_inline parser { "nvim-treesitter/nvim-treesitter" } + --Please make sure you install markdown and markdown_inline parser } }, - { - 'j-hui/fidget.nvim', - event = "LspAttach", - config = function() - require("fidget").setup({}) - end - }, { "cshuaimin/ssr.nvim", module = "ssr", @@ -410,6 +408,12 @@ return require('lazy').setup({ }, } end + }, + { + "j-hui/fidget.nvim", + tag = "legacy", + event = "LspAttach", + opts = {}, } }, { diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index cf2c4b28..1cae872b 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -23,7 +23,7 @@ run -b '~/.config/tmux/plugins/tpm/tpm' # if on macos use /opt/homebrew/bin/fish if-shell "[ -f /usr/bin/fish ]" "set -g default-shell '/usr/bin/fish'" if-shell "[ -f /opt/homebrew/bin/fish ]" "set -g default-shell '/opt/homebrew/bin/fish'" -if-shell "[ -f /opt/homebrew/bin/nu ]" "set -g default-shell '/opt/homebrew/bin/nu'" +# if-shell "[ -f /opt/homebrew/bin/nu ]" "set -g default-shell '/opt/homebrew/bin/nu'" set -g default-terminal 'tmux-256color' set -ga terminal-overrides ',*256col*:Tc'