[fix] Change a lot of things

This commit is contained in:
Uttarayan Mondal
2023-07-21 12:25:50 +05:30
parent 0b9145d700
commit a1d6caa5fb
14 changed files with 75 additions and 350 deletions

View File

@@ -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
)"

View File

@@ -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

View File

@@ -1,2 +1 @@
jorgebucaran/fisher jorgebucaran/fisher
jorgebucaran/nvm.fish

View File

@@ -4,8 +4,7 @@ SETUVAR AFTERSHOOT_LOG:desktop_rust_backend\x3dtrace
SETUVAR BW_SESSION:lW6\x2bALLBSowAJgVMgqI6sSMqku9z/192K\x2bDNX0jF2WlzRGhBtKGlUAqXJgbWKTw/cDKU2MRO5Z/6aQPi6fkA6Q\x3d\x3d SETUVAR BW_SESSION:lW6\x2bALLBSowAJgVMgqI6sSMqku9z/192K\x2bDNX0jF2WlzRGhBtKGlUAqXJgbWKTw/cDKU2MRO5Z/6aQPi6fkA6Q\x3d\x3d
SETUVAR __fish_initialized:3400 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_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
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejorgebucaran/nvm\x2efish
SETUVAR fish_color_autosuggestion:555\x1ebrblack SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:005fd7 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_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr 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 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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 <version> Download and activate the specified Node version"
echo " nvm install Install version from nearest .nvmrc file"
echo " nvm use <version> 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 <regex> List versions matching a given regular expression"
echo " nvm current Print the currently-active version"
echo " nvm uninstall <version> 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(?<major>\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

View File

@@ -88,7 +88,9 @@ vim.g.coq_settings = {
} }
} }
-- vim.g.rooter_manual_only = 1 -- 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 vim.g.copilot_no_tab_map = true
require('keymaps') require('keymaps')
@@ -103,4 +105,3 @@ require 'nvim-treesitter.configs'.setup {
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = false,
}, },
} }
-- vim.notify = require 'notify'

View File

@@ -1,55 +1,55 @@
{ {
"comfortable-motion.vim": { "branch": "master", "commit": "e20aeafb07c6184727b29f7674530150f7ab2036" }, "comfortable-motion.vim": { "branch": "master", "commit": "e20aeafb07c6184727b29f7674530150f7ab2036" },
"copilot.vim": { "branch": "release", "commit": "98c293994f1bbebd5bade5d5840ead3b2feb5074" }, "copilot.vim": { "branch": "release", "commit": "a4a6d6b3f9e284e7f5c849619e06cd228cad8abd" },
"coq.artifacts": { "branch": "artifacts", "commit": "af56cc3daf29d1da7f331f679ff45164fa189c67" }, "coq.artifacts": { "branch": "artifacts", "commit": "f47ef45647d237598b3ceead98a15a358bbf2e33" },
"coq.thirdparty": { "branch": "3p", "commit": "0ccf22d8e64d5c2d939f08ceec2587c9b9ad9844" }, "coq.thirdparty": { "branch": "3p", "commit": "0fb2082030fb9e922a1aa4951a98aa16ecbb81c0" },
"coq_nvim": { "branch": "coq", "commit": "0e063bc90e0f8b1bb0620022ced5ff7ce9ebe119" }, "coq_nvim": { "branch": "coq", "commit": "ac991666d3c6fef33bf07374d2f1e3d086e60530" },
"d2-vim": { "branch": "master", "commit": "981c87dccb63df2887cc41b96e84bf550f736c57" }, "d2-vim": { "branch": "master", "commit": "981c87dccb63df2887cc41b96e84bf550f736c57" },
"diffview.nvim": { "branch": "main", "commit": "b3a763f8c7810b352226c95faa7d3ac9fb93b8d9" }, "diffview.nvim": { "branch": "main", "commit": "e91110d2a7f8e2f667666aba6ea089ff823f8748" },
"fidget.nvim": { "branch": "main", "commit": "f1c375ba68839eaa4a65efdf2aa078c0da0548fe" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
"formatter.nvim": { "branch": "master", "commit": "fa4f2729cc2909db599169f22d8e55632d4c8d59" }, "formatter.nvim": { "branch": "master", "commit": "9bf2e7e294b00bac87c6123c889828ee08dc9b46" },
"galaxyline.nvim": { "branch": "main", "commit": "4d4f5fc8e20a10824117e5beea7ec6e445466a8f" }, "galaxyline.nvim": { "branch": "main", "commit": "4d4f5fc8e20a10824117e5beea7ec6e445466a8f" },
"git-conflict.nvim": { "branch": "main", "commit": "8d962d83cae924a314965f738ed1e05a4000d682" }, "git-conflict.nvim": { "branch": "main", "commit": "8d962d83cae924a314965f738ed1e05a4000d682" },
"glow.nvim": { "branch": "main", "commit": "bbd0473d72a45094495ee5600b5577823543eefe" }, "glow.nvim": { "branch": "main", "commit": "bbd0473d72a45094495ee5600b5577823543eefe" },
"indent-blankline.nvim": { "branch": "master", "commit": "7075d7861f7a6bbf0de0298c83f8a13195e6ec01" }, "indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" },
"lazy.nvim": { "branch": "main", "commit": "b7043f2983d7aead78ca902f3f2053907081859a" }, "lazy.nvim": { "branch": "main", "commit": "ed15f6b39422f46412212005f6d12c6f353b0293" },
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" }, "lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
"lspsaga.nvim": { "branch": "main", "commit": "4f075452c466df263e69ae142f6659dcf9324bf6" }, "lspsaga.nvim": { "branch": "main", "commit": "2f9d768c30d5d68c9875deb437785e99dadd7992" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "d381fcb78d7a562c3244e1c8f76406954649db36" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "828a538ac8419f586c010996aefa5df6eb7c250b" },
"mason.nvim": { "branch": "main", "commit": "664c987c3b14d2262a4e580f993a3e5045baded0" }, "mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" },
"neorg": { "branch": "main", "commit": "6fece1546d051a5f2a2d932d5978beec1ef920ab" }, "neorg": { "branch": "main", "commit": "774f5dd80d15aa11d0221aba767da699f9533e32" },
"no-neck-pain.nvim": { "branch": "main", "commit": "d3527936c4944baf0227c4f5b7fd64e7119ac13c" }, "no-neck-pain.nvim": { "branch": "main", "commit": "6000e12d13188e008e9539085c24ff34794da40b" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-dap": { "branch": "master", "commit": "a6d48d23407fbad7a4c1451803b8f34cab31c441" }, "nvim-dap": { "branch": "master", "commit": "d17d1bba23ec72a157bd183c57840c39e323f515" },
"nvim-dap-ui": { "branch": "master", "commit": "c020f660b02772f9f3d11f599fefad3268628a9e" }, "nvim-dap-ui": { "branch": "master", "commit": "85b16ac2309d85c88577cd8ee1733ce52be8227e" },
"nvim-lspconfig": { "branch": "master", "commit": "b6b34b9acf84949f0ac1c00747765e62b81fb38d" }, "nvim-lspconfig": { "branch": "master", "commit": "dd11ba7b3c8f82d51b6d4dd7d68fce2d78bf78a0" },
"nvim-nu": { "branch": "main", "commit": "f45f36a97fb0ea6e39f08cc2fac7a2fb3dc3999b" }, "nvim-nu": { "branch": "main", "commit": "f45f36a97fb0ea6e39f08cc2fac7a2fb3dc3999b" },
"nvim-treesitter": { "branch": "master", "commit": "f26596386f31d5bd74b85b7d1ab0fd90c5b98608" }, "nvim-treesitter": { "branch": "master", "commit": "4115fad9fded72571bdc3e0f7351e64b31799a3d" },
"nvim-treesitter-context": { "branch": "master", "commit": "6eccc445394df5ab9b1c1e2c445c033949a6a784" }, "nvim-treesitter-context": { "branch": "master", "commit": "6f8f788738b968f24a108ee599c5be0031f94f06" },
"nvim-web-devicons": { "branch": "master", "commit": "14b3a5ba63b82b60cde98d0a40319d80f25e8301" }, "nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
"octo.nvim": { "branch": "master", "commit": "f498fd88bc0d9983a7fb566fa5535f8e38b874c0" }, "octo.nvim": { "branch": "master", "commit": "22328c578bc013fa4b0cef3d00af35efe0c0f256" },
"plenary.nvim": { "branch": "master", "commit": "36aaceb6e93addd20b1b18f94d86aecc552f30c4" }, "plenary.nvim": { "branch": "master", "commit": "267282a9ce242bbb0c5dc31445b6d353bed978bb" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"rest.nvim": { "branch": "main", "commit": "aea7c64bdff1073beed9bd7fddb60cce7796d7ff" }, "rest.nvim": { "branch": "main", "commit": "22673c848768ff25517154a5aebfebc0c77d0b4f" },
"rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" },
"sonokai": { "branch": "master", "commit": "a9b2a3e83ed4fa7a5541e41be9becaa7b436edcf" }, "sonokai": { "branch": "master", "commit": "a9b2a3e83ed4fa7a5541e41be9becaa7b436edcf" },
"ssr.nvim": { "branch": "main", "commit": "e5768511518a397fa712f26389ba30d0404990de" }, "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" }, "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "62ea5e58c7bbe191297b983a9e7e89420f581369" }, "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" }, "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" }, "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-abolish": { "branch": "master", "commit": "cb3dcb220262777082f63972298d57ef9e9455ec" },
"vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" }, "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-mergetool": { "branch": "master", "commit": "0275a85256ad173e3cde586d54f66566c01b607f" },
"vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" },
"vim-speeddating": { "branch": "master", "commit": "5a36fd29df63ea3f65562bd2bb837be48a5ec90b" }, "vim-speeddating": { "branch": "master", "commit": "5a36fd29df63ea3f65562bd2bb837be48a5ec90b" },
"vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" },
"vim-vinegar": { "branch": "master", "commit": "bb1bcddf43cfebe05eb565a84ab069b357d0b3d6" }, "vim-vinegar": { "branch": "master", "commit": "bb1bcddf43cfebe05eb565a84ab069b357d0b3d6" },
"which-key.nvim": { "branch": "main", "commit": "d871f2b664afd5aed3dc1d1573bef2fb24ce0484" } "which-key.nvim": { "branch": "main", "commit": "38b990f6eabf62014018b4aae70a97d7a6c2eb88" }
} }

View File

@@ -1,3 +1,4 @@
---@diagnostic disable: redefined-local
local vim = vim local vim = vim
vim.api.nvim_set_keymap('', '<Space>', '<Nop>', { noremap = true, silent = true }) vim.api.nvim_set_keymap('', '<Space>', '<Nop>', { noremap = true, silent = true })
vim.g.mapleader = " " vim.g.mapleader = " "
@@ -25,8 +26,10 @@ local normal_mode_maps = {
{ key = '<F12>', map = [[<cmd>lua require'dap'.step_out()<cr>]] }, { key = '<F12>', map = [[<cmd>lua require'dap'.step_out()<cr>]] },
{ key = '<Leader>bb', map = [[<cmd>lua require'dap'.toggle_breakpoint()<cr>]] }, { key = '<Leader>bb', map = [[<cmd>lua require'dap'.toggle_breakpoint()<cr>]] },
{ key = '<Leader>B', map = [[<cmd>lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>]] }, { key = '<Leader>B', map = [[<cmd>lua require'dap'.set_breakpoint(vim.fn.input('Breakpoint condition: '))<cr>]] },
{ key = '<Leader>lp', {
map = [[<cmd>lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))<cr>]] }, key = '<Leader>lp',
map = [[<cmd>lua require'dap'.set_breakpoint(nil, nil, vim.fn.input('Log point message: '))<cr>]]
},
{ key = '<Leader>dr', map = [[<cmd>lua require'dap'.repl.open()<cr>]] }, { key = '<Leader>dr', map = [[<cmd>lua require'dap'.repl.open()<cr>]] },
{ key = '<Leader>dl', map = [[<cmd>lua require'dap'.run_last()<cr>]] }, { key = '<Leader>dl', map = [[<cmd>lua require'dap'.run_last()<cr>]] },
@@ -46,7 +49,7 @@ local normal_mode_maps = {
{ key = '<leader>rd', map = [[<cmd>RustDebuggables<cr>]] }, { key = '<leader>rd', map = [[<cmd>RustDebuggables<cr>]] },
{ key = '<leader>rr', map = [[<cmd>RustRunnables<cr>]] }, { key = '<leader>rr', map = [[<cmd>RustRunnables<cr>]] },
{ key = 'vff', map = [[<cmd>vertical Gdiffsplit<cr>]] }, { key = 'vff', map = [[<cmd>vertical Gdiffsplit<cr>]] },
{ key = 'vff!', map = [[<cmd>vertical Gdiffsplit!<cr>]] }, -- { key = 'vff!', map = [[<cmd>vertical Gdiffsplit!<cr>]] },
-- { key = 'ssr', map = [[<cmd>lua require'rust-tools'.ssr.ssr(query)<cr>]] }, -- { key = 'ssr', map = [[<cmd>lua require'rust-tools'.ssr.ssr(query)<cr>]] },
{ key = 'ssr', map = [[<cmd>lua require("ssr").open()<cr>]] }, { key = 'ssr', map = [[<cmd>lua require("ssr").open()<cr>]] },
{ key = '<C-\\>', map = [[<cmd>ToggleTerm<cr>]] }, { key = '<C-\\>', map = [[<cmd>ToggleTerm<cr>]] },
@@ -56,7 +59,9 @@ local normal_mode_maps = {
{ key = '<leader>sl', map = [[<cmd>SessionLoad<cr>]] }, { key = '<leader>sl', map = [[<cmd>SessionLoad<cr>]] },
-- lsp -- lsp
{ key = 'K', map = [[<cmd>lua vim.lsp.buf.hover()<cr>]] }, -- { key = 'K', map = [[<cmd>lua vim.lsp.buf.hover()<cr>]] },
-- vim.keymap.set('n', 'K', '<cmd>Lspsaga hover_doc')
{ key = 'K', map = [[<cmd>Lspsaga hover_doc<cr>]] },
{ key = '<C-k>', map = [[<cmd>lua vim.lsp.buf.definition()<cr>]] }, { key = '<C-k>', map = [[<cmd>lua vim.lsp.buf.definition()<cr>]] },
{ key = 'gi', map = [[<cmd>lua vim.lsp.buf.implementation()<cr>]] }, { key = 'gi', map = [[<cmd>lua vim.lsp.buf.implementation()<cr>]] },
{ key = '<leader>o', map = [[<cmd>TroubleToggle<cr>]] }, { key = '<leader>o', map = [[<cmd>TroubleToggle<cr>]] },
@@ -68,16 +73,26 @@ local normal_mode_maps = {
{ key = 'F', map = [[<cmd>lua vim.lsp.buf.format { async = true }<cr>]] }, { key = 'F', map = [[<cmd>lua vim.lsp.buf.format { async = true }<cr>]] },
{ key = 'T', map = [[<cmd>lua require'lsp_extensions'.inlay_hints()<cr>]] }, { key = 'T', map = [[<cmd>lua require'lsp_extensions'.inlay_hints()<cr>]] },
{ key = '<C-W>%', map = [[<cmd>vsplit<cr>]] }, { key = '<C-W>%', map = [[<cmd>vsplit<cr>]] },
{ key = '<C-W>"', map = [[<cmd>split<cr>]] },
{ key = '<C-l>', map = [[<cmd>:SymbolsOutline<cr>]] }, { key = '<C-l>', map = [[<cmd>:SymbolsOutline<cr>]] },
{ key = '<leader>A', map = [[<cmd>:Lspsaga code_action<cr>]] },
-- Other -- Other
{ key = '<leader>m', map = [[<cmd>silent !mpcfzf<cr>]] }, { key = '<leader>m', map = [[<cmd>silent !mpcfzf<cr>]] },
{ key = '<leader>l', -- { key = '<leader>l',
map = [[<cmd>lua require('telescope.builtin').lsp_references({include_current_line = true, fname_width = 40})<cr>]] }, -- map = [[<cmd>lua require('telescope.builtin').lsp_references({include_current_line = true, fname_width = 40})<cr>]] },
{ key = '<leader>i', {
map = [[<cmd>lua require('telescope.builtin').lsp_incoming_calls({fname_width = 40})<cr>]] }, key = '<leader>l',
{ key = '<leader>e', map = [[<cmd>Lspsaga finder<cr>]]
map = [[<Plug>RestNvim<cr>]] }, },
{
key = '<leader>i',
map = [[<cmd>lua require('telescope.builtin').lsp_incoming_calls({fname_width = 40})<cr>]]
},
{
key = '<leader>e',
map = [[<Plug>RestNvim<cr>]]
},
{ key = '<leader>u', map = [[<cmd>Telescope undo<cr>]] }, { key = '<leader>u', map = [[<cmd>Telescope undo<cr>]] },
{ key = '<C-c>', map = [[<cmd>Telescope commands<cr>]] }, { key = '<C-c>', map = [[<cmd>Telescope commands<cr>]] },
-- { key = '<ScrollWheelDown>', map = [[<cmd>call comfortable_motion#flick(40)<cr>]], options = { silent = true } }, -- { key = '<ScrollWheelDown>', map = [[<cmd>call comfortable_motion#flick(40)<cr>]], options = { silent = true } },
@@ -90,7 +105,7 @@ local insert_mode_maps = {
{ key = '<C-j>', map = '<ESC>' }, { key = '<C-j>', map = '<ESC>' },
-- { key = "<C-l>", map = 'copilot#Accept("<CR>")', options = { silent = true, expr = true } }, -- { key = "<C-l>", map = 'copilot#Accept("<CR>")', options = { silent = true, expr = true } },
-- { key = "<C-m>", map = 'copilot#Accept("<CR>")', options = { silent = true, expr = true } }, -- { key = "<C-m>", map = 'copilot#Accept("<CR>")', options = { silent = true, expr = true } },
{ key = '<C-c>', map = [[<cmd>Telescope commands<cr>]] }, -- { key = '<C-c>', map = [[<cmd>Telescope commands<cr>]] },
} }

View File

@@ -230,6 +230,7 @@ return require('lazy').setup({
{ {
'neovim/nvim-lspconfig', 'neovim/nvim-lspconfig',
ft = { "rust", "toml", "lua", "c", "cpp", "markdown", "sql", "python" }, ft = { "rust", "toml", "lua", "c", "cpp", "markdown", "sql", "python" },
cmd = "LspStart",
config = function() config = function()
require("lsp") require("lsp")
end end
@@ -372,24 +373,21 @@ return require('lazy').setup({
end end
}, },
{ {
"glepnir/lspsaga.nvim", "nvimdev/lspsaga.nvim",
event = "LspAttach", event = "LspAttach",
config = function() config = function()
require("lspsaga").setup({}) require("lspsaga").setup({
ui = {
code_action = 'A'
}
})
end, end,
dependencies = { dependencies = {
{ "nvim-tree/nvim-web-devicons" }, { "nvim-tree/nvim-web-devicons" },
--Please make sure you install markdown and markdown_inline parser
{ "nvim-treesitter/nvim-treesitter" } { "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", "cshuaimin/ssr.nvim",
module = "ssr", module = "ssr",
@@ -410,6 +408,12 @@ return require('lazy').setup({
}, },
} }
end end
},
{
"j-hui/fidget.nvim",
tag = "legacy",
event = "LspAttach",
opts = {},
} }
}, { }, {

View File

@@ -23,7 +23,7 @@ run -b '~/.config/tmux/plugins/tpm/tpm'
# if on macos use /opt/homebrew/bin/fish # if on macos use /opt/homebrew/bin/fish
if-shell "[ -f /usr/bin/fish ]" "set -g default-shell '/usr/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/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 -g default-terminal 'tmux-256color'
set -ga terminal-overrides ',*256col*:Tc' set -ga terminal-overrides ',*256col*:Tc'