diff --git a/tools/fish/conf.d/0init.fish b/tools/fish/conf.d/0init.fish index 6fa2a74..08f8d40 100644 --- a/tools/fish/conf.d/0init.fish +++ b/tools/fish/conf.d/0init.fish @@ -23,13 +23,14 @@ else set -gx XDG_RUNTIME_DIR /run/user/(id -u) end +set -gx GHCUP_USE_XDG_DIRS 1 set -gx PAGER "less -R" set -gx EDITOR nvim set -gx VISUAL nvim # Minimal PATH for early commands -for dir in /usr/local/bin /usr/bin /bin /usr/sbin /sbin "$HOME/.local/bin" +for dir in /usr/local/bin /usr/bin /bin /usr/sbin /sbin "$HOME/.local/bin" /opt/share/bin if test -d "$dir" -a ! -L "$dir" fish_add_path "$dir" end diff --git a/tools/nvim/lua/plugins/appearance.lua b/tools/nvim/lua/plugins/appearance.lua index 16a06b9..f0a2d18 100644 --- a/tools/nvim/lua/plugins/appearance.lua +++ b/tools/nvim/lua/plugins/appearance.lua @@ -80,6 +80,7 @@ return { opts = { current_line_blame = true, }, + event = "BufReadPre", keys = { { "gb", "Gitsigns blame", desc = "Blame file" }, { "gd", "Gitsigns diffthis", desc = "Diff file" }, diff --git a/tools/nvim/lua/plugins/mod/snacks-nvim.lua b/tools/nvim/lua/plugins/mod/snacks-nvim.lua index 6e33e1d..82d1b09 100644 --- a/tools/nvim/lua/plugins/mod/snacks-nvim.lua +++ b/tools/nvim/lua/plugins/mod/snacks-nvim.lua @@ -6,7 +6,7 @@ return { lazy = false, ---@type snacks.Config opts = { - -- bigfile = { enabled = true }, + bigfile = { enabled = true }, dashboard = { enabled = true, preset = { @@ -32,22 +32,12 @@ return { }, }, -- explorer = { - -- -- TODO: Remap some keys in explorer - -- -- win = { - -- -- list = { - -- -- keys = { - -- -- ["l"] = "focus_input", - -- -- ["i"] = "confirm", - -- -- ["O"] = "explorer_open", -- Open with system default - -- -- }, - -- -- }, - -- -- }, -- }, indent = { enabled = true }, -- input = { enabled = true }, - -- notifier = { enabled = true }, + notifier = { enabled = true }, -- quickfile = { enabled = true }, - -- scope = { enabled = true }, + scope = { enabled = true }, -- scroll = { enabled = true }, statuscolumn = { enabled = true }, -- words = { enabled = true }, diff --git a/tools/vscode/vscode.vimrc b/tools/vscode/vscode.vimrc index 0578a25..d545641 100644 --- a/tools/vscode/vscode.vimrc +++ b/tools/vscode/vscode.vimrc @@ -60,7 +60,7 @@ noremap gpr editor.action.referenceSearch.trigger noremap ga editor.action.quickFix " Rename, or [c]hange [d]efinition -noremap cd editor.action.rename +nnoremap cd editor.action.rename " Requires matchit by redguardtoo " nnoremap % extension.matchitJumpItems @@ -74,8 +74,9 @@ vnoremap > editor.action.indentLines " 分词版本的w和b,支持中文,需要插件 " 为了保证递归解析,而不是打断,使用 `nmap` 而不是 `nnoremap` " Comment if you don't use cjk or the plugin -nmap w cjkWordHandler.cursorWordEndRight -nmap b cjkWordHandler.cursorWordStartLeft +" This is buggy +"nmap w cjkWordHandler.cursorWordEndRight +"nmap b cjkWordHandler.cursorWordStartLeft " will be parsed by VSCode itself. " noremap n j diff --git a/tools/zsh/zprofile b/tools/zsh/zprofile index 3bfe9da..e69de29 100644 --- a/tools/zsh/zprofile +++ b/tools/zsh/zprofile @@ -1 +0,0 @@ -export FZF_DEFAULT_OPTS_FILE="$DOTFILES/common/fzfrc" diff --git a/tools/zsh/zshenv b/tools/zsh/zshenv index 943bc7f..d7e852f 100644 --- a/tools/zsh/zshenv +++ b/tools/zsh/zshenv @@ -33,8 +33,11 @@ export PAGER="less -R" export EDITOR="nvim" export VISUAL="nvim" +export GHCUP_USE_XDG_DIRS=1 +export RUSTUP_HOME="$XDG_DATA_HOME"/rustup + # Minimal PATH for early commands -export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH" +export PATH="$HOME/.local/bin:/opt/share/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH" if [ -d "/opt/homebrew/bin" ]; then # macOS export PATH="/opt/homebrew/bin:$PATH" @@ -135,6 +138,10 @@ fi if command -v emacs >/dev/null; then export SPACEMACSDIR="$XDG_CONFIG_HOME"/spacemacs fi +# Fzf +if command -v fzf > /dev/null; then + export FZF_DEFAULT_OPTS_FILE="$HOME/.dotfiles/common/fzfrc" +fi # tldr # Works only with C client (did not verify) if command -v tldr >/dev/null; then @@ -162,3 +169,4 @@ fi if command -v vcpkg >/dev/null; then export VCPKG_ROOT="$XDG_DATA_HOME"/vcpkg fi + diff --git a/tools/zsh/zshrc b/tools/zsh/zshrc index 209532b..26ee997 100644 --- a/tools/zsh/zshrc +++ b/tools/zsh/zshrc @@ -32,3 +32,5 @@ esac for file in $DOTFILES/tools/zsh/mod/*.zsh; do source $file done + +[ -f "/home/js0ny/.local/share/ghcup/env" ] && . "/home/js0ny/.local/share/ghcup/env" # ghcup-env \ No newline at end of file