fix: merge
This commit is contained in:
@@ -6,3 +6,4 @@ _set_env_*.sh
|
||||
_set_env.sh
|
||||
log
|
||||
cn.sh
|
||||
__pycache__
|
||||
|
||||
+76
-19
@@ -1,6 +1,10 @@
|
||||
|
||||
#################################################################
|
||||
# option
|
||||
fish_vi_key_bindings
|
||||
|
||||
|
||||
#################################################################
|
||||
# basic
|
||||
# 定义一个函数来检查并添加路径到 PATH
|
||||
function add_to_path
|
||||
# 遍历传递给函数的所有参数
|
||||
@@ -20,55 +24,108 @@ function add_to_path
|
||||
end
|
||||
end
|
||||
|
||||
## set environment
|
||||
# default
|
||||
set paths_to_check /usr/sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/bin /opt/sbin /usr/syno/sbin /usr/syno/bin /usr/local/sbin
|
||||
function refish
|
||||
echo "Updating fish configuration..."
|
||||
source ~/.config/fish/config.fish
|
||||
echo "Fish configuration updated!"
|
||||
end
|
||||
|
||||
alias vifish="vim ~/.config/fish/custom.fish"
|
||||
alias cdfish="cd ~/.config/fish/"
|
||||
|
||||
# set environment
|
||||
set paths_to_check /usr/sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/bin /opt/sbin /usr/syno/sbin /usr/syno/bin /usr/local/sbin $HOME/.local/bin
|
||||
for path in $paths_to_check
|
||||
add_to_path $path
|
||||
end
|
||||
|
||||
function sudoo
|
||||
eval sudo $history[1]
|
||||
end
|
||||
|
||||
# add my script
|
||||
add_to_path $HOME/.dotfile/script $HOME/.app00/script
|
||||
|
||||
if test -f ~/.config/fish/custom.fish
|
||||
source ~/.config/fish/custom.fish
|
||||
end
|
||||
|
||||
function resetp
|
||||
set -e http_proxy
|
||||
set -e https_proxy
|
||||
set -e ftp_proxy
|
||||
set -e all_proxy
|
||||
set -e HTTP_PROXY
|
||||
set -e HTTPS_PROXY
|
||||
set -e FTP_PROXY
|
||||
set -e ALL_PROXY
|
||||
echo "Proxy environment variables have been reset."
|
||||
export | grep -i 'proxy'
|
||||
end
|
||||
|
||||
function showp
|
||||
export | grep -i 'proxy'
|
||||
end
|
||||
|
||||
|
||||
#################################################################
|
||||
# brew
|
||||
set -gx HOMEBREW_BREW_GIT_REMOTE "https://mirrors.ustc.edu.cn/brew.git"
|
||||
set -gx HOMEBREW_CORE_GIT_REMOTE "https://mirrors.ustc.edu.cn/homebrew-core.git"
|
||||
set -gx HOMEBREW_BOTTLE_DOMAIN "https://mirrors.ustc.edu.cn/homebrew-bottles"
|
||||
|
||||
#################################################################
|
||||
# go
|
||||
set -gx GOPATH $HOME/go:$HOME/workrepo/go
|
||||
set -gx GOPROXY "goproxy.cn,direct"
|
||||
set -gx GOSUMDB "sum.golang.google.cn"
|
||||
|
||||
add_to_path $HOME/go/bin
|
||||
add_to_path $HOME/.yarn/bin $HOME/.config/yarn/global/node_modules/.bin
|
||||
|
||||
# add nvim
|
||||
|
||||
#################################################################
|
||||
# node
|
||||
add_to_path /usr/local/node/bin
|
||||
|
||||
|
||||
#################################################################
|
||||
# python
|
||||
set -gx PYENV_ROOT $HOME/.pyenv
|
||||
# Pyenv initialization
|
||||
if command -v pyenv 1>/dev/null 2>&1
|
||||
pyenv init - | source
|
||||
end
|
||||
|
||||
add_to_path $PYENV_ROOT/bin
|
||||
|
||||
|
||||
#################################################################
|
||||
# nvim
|
||||
add_to_path usr/local/nvim/bin /usr/local/osx-64/nvim/bin
|
||||
set -gx EDITOR vim
|
||||
function gtr
|
||||
go test -gcflags=all=-l -v -run=$argv
|
||||
end
|
||||
|
||||
# add my script
|
||||
add_to_path $HOME/.dotfile/script $HOME/.app00/script
|
||||
|
||||
# alias
|
||||
#################################################################
|
||||
# git
|
||||
# alias
|
||||
alias gitb="git branch --show-current | tr -d '\n' | pbcopy"
|
||||
alias gci="golangci-lint run -c=~/.dotfile/.golangci.yml ./..."
|
||||
alias gmt="go mod tidy"
|
||||
alias gtc="go test -gcflags=all=-l -cover ./..."
|
||||
alias swg="swag init -o docs -g "
|
||||
alias sws="swagger serve -F=swagger"
|
||||
alias sourceit="source ~/.config/fish/config.fish"
|
||||
|
||||
|
||||
function gtr
|
||||
go test -gcflags=all=-l -v -run=$argv
|
||||
#################################################################
|
||||
# other
|
||||
function ctl
|
||||
systemctl $argv
|
||||
end
|
||||
|
||||
if test -f ~/.config/fish/custom.fish
|
||||
source ~/.config/fish/custom.fish
|
||||
end
|
||||
|
||||
|
||||
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
|
||||
|
||||
|
||||
+6
-1
@@ -1,5 +1,5 @@
|
||||
[user]
|
||||
name = Laily
|
||||
name = laily
|
||||
email = i@laily.net
|
||||
[core]
|
||||
autocrlf = input
|
||||
@@ -49,6 +49,7 @@
|
||||
# list files which have changed since REVIEW_BASE
|
||||
# (REVIEW_BASE defaults to 'master' in my zshrc)
|
||||
files = !git diff --name-only $(git merge-base HEAD \"$REVIEW_BASE\")
|
||||
rmsubmodule = "!f(){ git submodule deinit -f \"$1\"; git rm -f \"$1\"; git commit -m \"Removed submodule $1\"; };f"
|
||||
|
||||
# Same as above, but with a diff stat instead of just names
|
||||
# (better for interactive use)
|
||||
@@ -65,3 +66,7 @@
|
||||
#git filter-branch -f --env-filter "GIT_AUTHOR_NAME='Laily'; GIT_AUTHOR_EMAIL='i@laily.net'; GIT_COMMITTER_NAME='Laily'; GIT_COMMITTER_EMAIL='i@laily.net';" HEAD
|
||||
[protocol "file"]
|
||||
allow = always
|
||||
|
||||
# https://hyperzsb.io/posts/git-ssl-error/
|
||||
[url "git@github.com:"]
|
||||
insteadOf = https://github.com/
|
||||
|
||||
+3
-3
@@ -32,6 +32,6 @@ _testmain.go
|
||||
.log
|
||||
go.work
|
||||
go.work.sum
|
||||
init_test.go
|
||||
_set_env.sh
|
||||
_set_env_*.sh
|
||||
_set_env*.sh
|
||||
.env*
|
||||
!.env.example
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
git remote set-url origin git@github.com:hilaily/.dotfile.git
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
defaults write com.googlecode.iterm2.plist LoadPrefsFromCustomFolder -bool true
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
#/bin/bash
|
||||
defaults write com.googlecode.iterm2.plist PrefsCustomFolder -string "~/.dotfile/iterm2"
|
||||
# then open iterm2, Preferences->General->Settings, Mark 'load preferences from xxx'
|
||||
+58
-65
@@ -1,73 +1,66 @@
|
||||
{
|
||||
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
|
||||
"LazyVim": { "branch": "main", "commit": "fe72424e77cb9c953084bbcaaa0eb7fe8056dc70" },
|
||||
"LuaSnip": { "branch": "master", "commit": "f3b3d3446bcbfa62d638b1903ff00a78b2b730a1" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "9bc9a3a19dc6047d79d6073082f3b0deb7002c99" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "dd852401ee902745b67fc09a83d113b3fe82a96f" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "b15c6daf5a64426c69732b31a951f4e438cb6590" },
|
||||
"catppuccin": { "branch": "main", "commit": "c0de3b46811fe1ce3912e2245a9dfbea6b41c300" },
|
||||
"LazyVim": { "branch": "main", "commit": "704c29110d578186f0ca3eac67b753ddf52541fc" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "a7ad1f6205500d1369382e2e43df4e60eeae7cb6" },
|
||||
"barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44" },
|
||||
"catppuccin": { "branch": "main", "commit": "637d99e638bc6f1efedac582f6ccab08badac0c6" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-emoji": { "branch": "main", "commit": "19075c36d5820253d32e2478b6aaf3734aeaafa0" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
||||
"cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"conform.nvim": { "branch": "master", "commit": "192a6d2ddace343f1840a8f72efe2315bd392243" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "413442b12d85315fc626c44a0ce4929b213ef604" },
|
||||
"conform.nvim": { "branch": "master", "commit": "023f795dbcf32d4351b6a9ed2e613d471b5bb812" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "ae309606940d26d8c9df8b048a6e136b6bbec478" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" },
|
||||
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "fed2c8389c148ff1dfdcdca63c2b48d08a50dea0" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
|
||||
"mini.ai": { "branch": "main", "commit": "ee9446a17c160aba6a04ff22097389c41872c878" },
|
||||
"mini.bufremove": { "branch": "main", "commit": "931a3bb514147d9e812767275c4beba6b779b1d3" },
|
||||
"mini.comment": { "branch": "main", "commit": "a4b7e46deb9ad2feb8902cc5dbf087eced112ee5" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "cf07f19e718ebb0bcc5b00999083ce11c37b8d40" },
|
||||
"mini.pairs": { "branch": "main", "commit": "04f58f2545ed80ac3b52dd4826e93f33e15b2af6" },
|
||||
"mini.surround": { "branch": "main", "commit": "a1b590cc3b676512de507328d6bbab5e43794720" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3941c57ec85d7bdb44fa53fd858fd80f159018f" },
|
||||
"neoconf.nvim": { "branch": "main", "commit": "98980b5300e7a5e7f93e8dbf81c98cc3daa55df7" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" },
|
||||
"neotest": { "branch": "master", "commit": "4440cc2227894c2ae9b0673a30e6cc6f1836e8c2" },
|
||||
"neotest-go": { "branch": "main", "commit": "6a2f996d89fe4631942e035b1c114544ee045043" },
|
||||
"neotest-plenary": { "branch": "master", "commit": "dcaf5ed67a9e28a246e9783319e5aa6c9ea1c584" },
|
||||
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
|
||||
"nui.nvim": { "branch": "main", "commit": "c3c7fd618dcb5a89e443a2e1033e7d11fdb0596b" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
||||
"nvim-dap": { "branch": "master", "commit": "5a2f7121869394502521c52b2bc581ab22c69447" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "5faf165f5062187320eaf9d177c3c1f647adc22e" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "3e8e207513e6ef520894950acd76b79902714103" },
|
||||
"nvim-lint": { "branch": "master", "commit": "4dade85ff26e4bad40f895a6cc6762b7036237f4" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "9553725789be682ecd945a527ec552e489ea8534" },
|
||||
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "3712ff0cdf4f9f877d9ca708d835a877d9a0abaf" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "d52fdeb0a300ac42b9cfa65ae0600a299f8e8677" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "4a8901b0d5398b45e075fcdbf9b8fe546349cc14" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "b8d1ffe58a88e0356da56b167373e89c4579ce15" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "95933e762e28f9d38b572d65e7e4da9d2f4d90cb" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "0bb67ef952ea3eb7b1bac9c011281471d99a27bc" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "fc78a3ca96f4db9f8893bb7e2fd9823e0780451b" },
|
||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "9a2f78219390b47d67795ab09390d7f092e23976" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
|
||||
"lsp_signature.nvim": { "branch": "master", "commit": "fc38521ea4d9ec8dbd4c2819ba8126cea743943b" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
|
||||
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "cab00668464d2914d0752b86168b4a431cc93eb2" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.ai": { "branch": "main", "commit": "31c149067d38b97720d2a179619f7745a0006ecc" },
|
||||
"mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" },
|
||||
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||
"neotest": { "branch": "master", "commit": "6d3d22cdad49999ef774ebe1bc250a4994038964" },
|
||||
"neotest-golang": { "branch": "main", "commit": "df6e3f34ae65f2520db798481a9d3f97581899b7" },
|
||||
"noice.nvim": { "branch": "main", "commit": "2626b4a49340e4eae24a388468ac98680fc24532" },
|
||||
"nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" },
|
||||
"nvim-dap": { "branch": "master", "commit": "29d1f8814fa4fcc194ec574de998a42a22ebbe4a" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "76d80c3d171224315b61c006502a1e30c213a9ab" },
|
||||
"nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "f012c1b176f0e3c71f40eb309bdec0316689462e" },
|
||||
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
|
||||
"nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "f7c65e11d695a084ca10b93df659bb7e68b71f9f" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "37427012d1c77c544356bfff0c9acc88fd3256bc" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
|
||||
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "063525196a43fd0a4a03bd67edce1b72e4f1c20b" },
|
||||
"symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
|
||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "48ffb8de688a22942940f50411d5928631368848" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "d5c4d9856320a07d04607c9b3a0523bd3f373328" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
|
||||
"vim-startuptime": { "branch": "master", "commit": "308b0088a864c4711a96e45b6734cf9294074f65" },
|
||||
"telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "85922dde3767e01d42a08e750a773effbffaea3e" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "9758827c3b380ba89da4a2212b6255d01afbcf08" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "3dc00c0447c016cd43e03054c3d49436a1f2076d" },
|
||||
"ts-comments.nvim": { "branch": "main", "commit": "2002692ad1d3f6518d016550c20c2a890f0cbf0e" },
|
||||
"vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" },
|
||||
"vim-vsnip-integ": { "branch": "master", "commit": "1914e72cf3de70df7f5dde476cd299aba2440aef" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||
}
|
||||
"vim-vsnip-integ": { "branch": "master", "commit": "90ae474e8b05ed41e36d6f58382a9fbfb4b672c4" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }
|
||||
}
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
"lazyvim.plugins.extras.lang.go"
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "2123"
|
||||
"NEWS.md": "7107"
|
||||
},
|
||||
"version": 2
|
||||
"version": 7
|
||||
}
|
||||
@@ -7,12 +7,12 @@ vim.api.nvim_create_autocmd("InsertLeave", {
|
||||
-- Disable the concealing in some file formats
|
||||
-- The default conceallevel is 3 in LazyVim
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {"js","tsx","ts", "json", "jsonc", "markdown","md","css","html" },
|
||||
pattern = { "js", "tsx", "ts", "json", "jsonc", "markdown", "md", "css", "html" },
|
||||
callback = function()
|
||||
vim.opt.conceallevel = 0
|
||||
vim.bo.tabstop = 2
|
||||
vim.bo.softtabstop = 2
|
||||
vim.bo.shiftwidth = 2
|
||||
vim.bo.expand = true
|
||||
-- vim.bo.expand = true
|
||||
end,
|
||||
})
|
||||
|
||||
@@ -3,18 +3,21 @@ return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
opts = {
|
||||
signs = {
|
||||
-- TODO add hl to colorscheme
|
||||
add = { hl = "GitSignsAdd", text = "▎", numhl = "GitSignsAddNr", linehl = "GitSignsAddLn" },
|
||||
change = { hl = "GitSignsChange", text = "▎", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" },
|
||||
delete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
||||
topdelete = { hl = "GitSignsDelete", text = "契", numhl = "GitSignsDeleteNr", linehl = "GitSignsDeleteLn" },
|
||||
changedelete = {
|
||||
hl = "GitSignsChange",
|
||||
text = "▎",
|
||||
numhl = "GitSignsChangeNr",
|
||||
linehl = "GitSignsChangeLn",
|
||||
},
|
||||
},
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
numhl = false,
|
||||
linehl = false,
|
||||
watch_gitdir = {
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
return {
|
||||
{ "nvim-neotest/neotest-plenary" },
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies= {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-neotest/neotest-go",
|
||||
},
|
||||
opts = {
|
||||
adapters = {
|
||||
require("neotest-go")({
|
||||
experimental = {
|
||||
test_table = true,
|
||||
},
|
||||
args = { "-gcflags=all=-l", "-count=1", "-timeout=60s" }
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"nvim-neotest/nvim-nio",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"antoinemadec/FixCursorHold.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"fredrikaverpil/neotest-golang", -- Installation
|
||||
},
|
||||
config = function()
|
||||
require("neotest").setup({
|
||||
adapters = {
|
||||
require("neotest-golang"), -- Registration
|
||||
},
|
||||
output = {
|
||||
enabled = true,
|
||||
open_on_run = true,
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
end,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
return {
|
||||
-- lsp servers
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
event = { 'BufReadPre', 'BufReadPost', 'BufNewFile' },
|
||||
event = { "BufReadPre", "BufReadPost", "BufNewFile" },
|
||||
opts = {
|
||||
inlay_hints = { enabled = false },
|
||||
---@type lspconfig.options
|
||||
@@ -10,12 +12,29 @@ return {
|
||||
cssls = {},
|
||||
tailwindcss = {
|
||||
root_dir = function(...)
|
||||
return require("lspconfig.util").root_pattern('tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.mjs', 'tailwind.config.ts', 'postcss.config.js', 'postcss.config.cjs', 'postcss.config.mjs', 'postcss.config.ts', 'package.json', 'node_modules', '.git')(...)
|
||||
return require("lspconfig.util").root_pattern(
|
||||
"tailwind.config.js",
|
||||
"tailwind.config.cjs",
|
||||
"tailwind.config.mjs",
|
||||
"tailwind.config.ts",
|
||||
"postcss.config.js",
|
||||
"postcss.config.cjs",
|
||||
"postcss.config.mjs",
|
||||
"postcss.config.ts",
|
||||
"package.json",
|
||||
"node_modules",
|
||||
".git"
|
||||
)(...)
|
||||
end,
|
||||
},
|
||||
tsserver = {
|
||||
root_dir = function(...)
|
||||
return require("lspconfig.util").root_pattern("tsconfig.json", "package.json", "jsconfig.json", ".git")(...)
|
||||
return require("lspconfig.util").root_pattern(
|
||||
"tsconfig.json",
|
||||
"package.json",
|
||||
"jsconfig.json",
|
||||
".git"
|
||||
)(...)
|
||||
end,
|
||||
single_file_support = false,
|
||||
settings = {
|
||||
@@ -120,15 +139,15 @@ return {
|
||||
cmd = { "gopls", "serve" }, -- use cmd in path, I can update it easily
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
nilness = true,
|
||||
unusedparams = true,
|
||||
unusedwrite = true,
|
||||
useany = true,
|
||||
analyses = {
|
||||
nilness = true,
|
||||
unusedparams = true,
|
||||
unusedwrite = true,
|
||||
useany = true,
|
||||
},
|
||||
staticcheck = false,
|
||||
usePlaceholders = false,
|
||||
},
|
||||
staticcheck = false,
|
||||
usePlaceholders = false,
|
||||
}
|
||||
},
|
||||
},
|
||||
pylsp = {
|
||||
@@ -139,11 +158,11 @@ return {
|
||||
checkOnType = false,
|
||||
diagnostics = false,
|
||||
inlayHints = true,
|
||||
smartCompletion = true
|
||||
}
|
||||
smartCompletion = true,
|
||||
},
|
||||
},
|
||||
single_file_support = true,
|
||||
}
|
||||
},
|
||||
},
|
||||
setup = {},
|
||||
},
|
||||
|
||||
@@ -5,6 +5,8 @@ return {
|
||||
cmd = "SymbolsOutline",
|
||||
opts = {
|
||||
position = "right",
|
||||
width = 35,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 检查参数数量
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Usage: $0 <command> [command_args...]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 获取 webhook URL
|
||||
WEBHOOK_URL="https://open.feishu.cn/open-apis/bot/v2/hook/808eafd8-a79f-4af0-b730-8442cf15933b"
|
||||
|
||||
# 执行命令并捕获输出
|
||||
OUTPUT=$("$@" 2>&1)
|
||||
EXIT_CODE=$?
|
||||
|
||||
# 如果命令失败,发送 webhook 通知
|
||||
if [ $EXIT_CODE -ne 0 ]; then
|
||||
# 准备 JSON 数据
|
||||
JSON_DATA=$(cat <<EOF
|
||||
{
|
||||
"msg_type": "text",
|
||||
"content": {
|
||||
"text": "Cron job fail\n\nCommand: $*\nError: $(echo "$OUTPUT" | sed 's/"/\\"/g')"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
)
|
||||
# 发送 webhook
|
||||
curl -s -X POST -H "Content-Type: application/json" -d "$JSON_DATA" "$WEBHOOK_URL"
|
||||
fi
|
||||
|
||||
# 退出,使用原命令的退出码
|
||||
exit $EXIT_CODE
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# delete old package
|
||||
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
|
||||
|
||||
# Add Docker's official GPG key:
|
||||
sudo apt-get update
|
||||
sudo apt-get install ca-certificates curl
|
||||
sudo install -m 0755 -d /etc/apt/keyrings
|
||||
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||
|
||||
# Add the repository to Apt sources:
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" |
|
||||
sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
|
||||
sudo apt-get update
|
||||
|
||||
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
|
||||
# add to docker group
|
||||
sudo usermod -aG docker $USER
|
||||
@@ -6,6 +6,9 @@ if [ -f "$HOME/.config/fish/config.fish" ]; then
|
||||
fi
|
||||
ln -s $HOME/.dotfile/fish/config.fish $HOME/.config/fish/config.fish
|
||||
|
||||
fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher"
|
||||
fish -c "fisher install jethrokuan/z"
|
||||
|
||||
echo 'Set fish as default shell'
|
||||
fishpath=$(which fish)
|
||||
echo $fishpath | sudo tee -a /etc/shells
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
import subprocess
|
||||
from typing import Dict, List, Optional
|
||||
import urllib.request
|
||||
import zipfile
|
||||
import shutil
|
||||
|
||||
def get_font_dir() -> str:
|
||||
"""根据操作系统确定字体安装目录"""
|
||||
system = platform.system()
|
||||
if system == "Darwin": # macOS
|
||||
return os.path.expanduser("~/Library/Fonts")
|
||||
elif system == "Linux":
|
||||
return os.path.expanduser("~/.local/share/fonts")
|
||||
else:
|
||||
raise OSError(f"不支持的操作系统: {system}")
|
||||
|
||||
def check_command(command: str) -> bool:
|
||||
"""检查命令是否存在"""
|
||||
return shutil.which(command) is not None
|
||||
|
||||
def download_file(url: str, dest_path: str) -> None:
|
||||
"""下载文件到指定路径"""
|
||||
try:
|
||||
urllib.request.urlretrieve(url, dest_path)
|
||||
except Exception as e:
|
||||
print(f"下载失败: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
def get_top_level_dirs(zip_file: zipfile.ZipFile) -> List[str]:
|
||||
"""获取 ZIP 文件中的顶级目录"""
|
||||
return list(set(item.split('/')[0] for item in zip_file.namelist() if '/' in item))
|
||||
|
||||
def has_single_top_dir(zip_file: zipfile.ZipFile) -> bool:
|
||||
"""检查 ZIP 文件是否只有一个顶级目录"""
|
||||
top_dirs = get_top_level_dirs(zip_file)
|
||||
return len(top_dirs) == 1 and all(name.startswith(top_dirs[0] + '/') for name in zip_file.namelist())
|
||||
|
||||
|
||||
def unzip_file(zip_path: str, font_name: str) -> None:
|
||||
"""解压文件到指定路径,根据 ZIP 文件结构决定是否创建顶级目录"""
|
||||
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
||||
if has_single_top_dir(zip_ref):
|
||||
# ZIP 文件有单一顶级目录,直接解压
|
||||
zip_ref.extractall("/tmp")
|
||||
print(f"已解压 {font_name} 到现有顶级目录")
|
||||
else:
|
||||
# 没有单一顶级目录,创建一个以字体名命名的目录
|
||||
font_dir = os.path.join("/tmp", font_name)
|
||||
os.makedirs(font_dir, exist_ok=True)
|
||||
for file in zip_ref.namelist():
|
||||
if not file.startswith('__MACOSX'): # 排除 macOS 系统文件
|
||||
zip_ref.extract(file, font_dir)
|
||||
print(f"已解压 {font_name} 并创建新的顶级目录")
|
||||
|
||||
|
||||
def install_font(font_name: str, font_dir: str) -> None:
|
||||
"""安装字体到指定目录"""
|
||||
# find ttf files to copy to the font_dir
|
||||
ttf_files = [file for file in os.listdir(f"/tmp/{font_name}") if file.endswith(".ttf")]
|
||||
for ttf_file in ttf_files:
|
||||
shutil.copy(f"/tmp/{font_name}/{ttf_file}", font_dir)
|
||||
print(f"已安装 {font_name} 到 {font_dir}")
|
||||
|
||||
def refresh_font_cache() -> None:
|
||||
"""在 Linux 系统上刷新字体缓存"""
|
||||
if platform.system() == "Linux" and check_command("fc-cache"):
|
||||
subprocess.run(["fc-cache", "-f"])
|
||||
print("字体缓存已刷新。")
|
||||
else:
|
||||
print("警告:无法刷新字体缓存。您可能需要手动刷新。")
|
||||
|
||||
def main() -> None:
|
||||
fonts: Dict[str, str] = {
|
||||
"SarasaNerd":"https://github.com/jonz94/Sarasa-Gothic-Nerd-Fonts/releases/download/v1.0.23-0/sarasa-fixed-sc-nerd-font.zip",
|
||||
"FiraCode": "https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip"
|
||||
}
|
||||
|
||||
try:
|
||||
font_dir = get_font_dir()
|
||||
except OSError as e:
|
||||
print(str(e))
|
||||
sys.exit(1)
|
||||
|
||||
os.makedirs(font_dir, exist_ok=True)
|
||||
|
||||
for font in fonts:
|
||||
print(f"正在下载和安装 {font}...")
|
||||
zip_path = f"/tmp/{font}.zip"
|
||||
download_file(fonts[font], zip_path)
|
||||
unzip_file(zip_path, font)
|
||||
install_font(font, font_dir)
|
||||
os.remove(zip_path)
|
||||
|
||||
refresh_font_cache()
|
||||
print("安装完成。请重启您的终端或应用程序以使用新字体。")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# install neovim
|
||||
os_arch=$(uname -s)-$(uname -m)
|
||||
|
||||
case $os_arch in
|
||||
"Darwin-x86_64")
|
||||
cd /usr/local
|
||||
wget https://golang.google.cn/dl/go1.23.2.linux-amd64.tar.gz
|
||||
tar zxvf go1.23.2.linux-amd64.tar.gz
|
||||
;;
|
||||
"Linux-x86_64"|"Linux-arm64")
|
||||
cd /tmp
|
||||
rm -rf nvim-linux64.tar.gz
|
||||
wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz
|
||||
tar zxvf go1.23.2.linux-amd64.tar.gz
|
||||
mv go /usr/local/
|
||||
sudo ln -s /usr/local/go/bin/go/usr/local/bin/go
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
#!bin/sh
|
||||
#git clone https://github.com/hilaily/.dotfile.git ~/.dotfile
|
||||
|
||||
# 判断 zsh 是否安装
|
||||
#sudo yum update && sudo yum -y install zsh
|
||||
|
||||
# 判断 oh-my-zsh 是否安装
|
||||
if [ ! -d "$HOME/.oh-my-zsh" ];then
|
||||
export ZSH=$HOME/.oh-my-zsh
|
||||
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
|
||||
fi
|
||||
ln -sf ~/.dotfile/.zshrc ~/
|
||||
ln -sf ~/.dotfile/laily.zsh-theme ~/.oh-my-zsh/themes/
|
||||
ln -sf ~/.dotfile/.tmux.conf ~/
|
||||
ln -sf ~/.dotfile/git/.gitconfig ~/.gitconfig
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 定义变量
|
||||
NVIM_CONFIG_DIR="$HOME/.config/nvim"
|
||||
YOUR_CUSTOM_CONFIG_DIR="$HOME/.dotfile/nvim" # 请替换为您的自定义配置目录路径
|
||||
|
||||
# 检查软链接是否已经存在并指向正确的目录
|
||||
if [ -L "$NVIM_CONFIG_DIR" ] && [ "$(readlink -f "$NVIM_CONFIG_DIR")" = "$(readlink -f "$YOUR_CUSTOM_CONFIG_DIR")" ]; then
|
||||
echo "软链接已经存在并指向正确的目录。无需进行任何操作。"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 检查是否存在现有的 Neovim 配置
|
||||
if [ -e "$NVIM_CONFIG_DIR" ]; then
|
||||
echo "检测到现有的 Neovim 配置。"
|
||||
|
||||
# 如果是目录或常规文件,创建备份
|
||||
if [ -d "$NVIM_CONFIG_DIR" ] || [ -f "$NVIM_CONFIG_DIR" ]; then
|
||||
BACKUP_DIR="$NVIM_CONFIG_DIR.backup.$(date +%Y%m%d%H%M%S)"
|
||||
mv "$NVIM_CONFIG_DIR" "$BACKUP_DIR"
|
||||
echo "已将现有配置备份到 $BACKUP_DIR"
|
||||
else
|
||||
# 如果是其他类型的文件(如损坏的软链接),直接删除
|
||||
rm "$NVIM_CONFIG_DIR"
|
||||
echo "已删除现有的无效配置。"
|
||||
fi
|
||||
fi
|
||||
|
||||
# 创建软链接
|
||||
ln -s "$YOUR_CUSTOM_CONFIG_DIR" "$NVIM_CONFIG_DIR"
|
||||
|
||||
# 检查软链接是否创建成功
|
||||
if [ -L "$NVIM_CONFIG_DIR" ] && [ "$(readlink -f "$NVIM_CONFIG_DIR")" = "$(readlink -f "$YOUR_CUSTOM_CONFIG_DIR")" ]; then
|
||||
echo "软链接创建成功。Neovim 现在将使用您的自定义配置。"
|
||||
else
|
||||
echo "创建软链接时出错。请检查路径和权限。"
|
||||
fi
|
||||
|
||||
+36
-3
@@ -1,4 +1,37 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# install neovim
|
||||
cd /usr/local
|
||||
wget https://github.com/neovim/neovim/releases/download/stable/nvim-macos.tar.gz
|
||||
tar zxvf nvim-macos.tar.gz
|
||||
os_arch=$(uname -s)-$(uname -m)
|
||||
ver=v0.10.2
|
||||
|
||||
case $os_arch in
|
||||
"Darwin-x86_64")
|
||||
cd /tmp
|
||||
rm -rf nvim-macos-x86_64.tar.gz
|
||||
wget https://github.com/neovim/neovim/releases/download/$ver/nvim-macos-x86_64.tar.gz
|
||||
tar zxf nvim-macos-x86_64.tar.gz
|
||||
sudo mv -f /usr/local/nvim /usr/local/nvim-bak
|
||||
sudo mv nvim-macos-x86_64 /usr/local/nvim
|
||||
sudo ln -sf /usr/local/nvim/bin/nvim /usr/local/bin/vim
|
||||
sudo ln -sf /usr/local/nvim/bin/nvim /usr/local/bin/nvim
|
||||
echo ""
|
||||
vim -v
|
||||
;;
|
||||
"Linux-x86_64" | "Linux-arm64")
|
||||
cd /tmp
|
||||
rm -rf nvim-linux64.tar.gz
|
||||
wget https://github.com/neovim/neovim/releases/download/$ver/nvim-linux64.tar.gz
|
||||
tar zxf nvim-linux64.tar.gz
|
||||
[ -e /usr/local/nvim ] && sudo mv -f /usr/local/nvim /usr/local/nvim-bak
|
||||
sudo mv nvim-linux64 /usr/local/nvim
|
||||
sudo ln -sf /usr/local/nvim/bin/nvim /usr/local/bin/vim
|
||||
sudo ln -sf /usr/local/nvim/bin/nvim /usr/local/bin/nvim
|
||||
echo ""
|
||||
vim -v
|
||||
;;
|
||||
esac
|
||||
|
||||
# if has error "no c compile found"
|
||||
# sudo apt install build-essential
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# 设置颜色
|
||||
GREEN='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# 检查是否已安装 pyenv
|
||||
if ! command -v pyenv &> /dev/null
|
||||
then
|
||||
echo -e "${RED}pyenv 未安装. 正在安装 pyenv...${NC}"
|
||||
# 安装 pyenv
|
||||
curl https://pyenv.run | bash
|
||||
source ~/.config/fish/config.fish
|
||||
else
|
||||
echo -e "${GREEN}pyenv 已安装${NC}"
|
||||
fi
|
||||
|
||||
# 询问用户想安装的 Python 版本
|
||||
python_version=3.11.10
|
||||
|
||||
# 安装指定版本的 Python
|
||||
echo -e "${GREEN}正在安装 Python $python_version...${NC}"
|
||||
pyenv install $python_version
|
||||
|
||||
# 设置全局 Python 版本
|
||||
pyenv global $python_version
|
||||
|
||||
# 验证安装
|
||||
installed_version=$(python --version)
|
||||
echo -e "${GREEN}Python 安装完成. 当前版本: $installed_version${NC}"
|
||||
|
||||
# 安装一些常用的 Python 包
|
||||
echo -e "${GREEN}正在安装一些常用的 Python 包...${NC}"
|
||||
pip install --upgrade pip
|
||||
pip install ipython jupyter notebook pandas numpy matplotlib scikit-learn
|
||||
|
||||
echo -e "${GREEN}Python 环境设置完成!${NC}"
|
||||
@@ -1,2 +0,0 @@
|
||||
#/bin/fish
|
||||
source $HOME/.config/fish/config.fish
|
||||
@@ -51,6 +51,7 @@ set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'junegunn/fzf'
|
||||
set -g @plugin 'tmux-plugins/tmux-fzf'
|
||||
set -g @plugin 'tmux-plugins/tmux-resurrect'
|
||||
|
||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
|
||||
Reference in New Issue
Block a user