Minor fix

This commit is contained in:
js0ny 2025-04-07 08:51:19 +01:00
parent c37d7bb33e
commit 866174e7e2
7 changed files with 21 additions and 19 deletions

View file

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

View file

@ -80,6 +80,7 @@ return {
opts = {
current_line_blame = true,
},
event = "BufReadPre",
keys = {
{ "<leader>gb", "<cmd>Gitsigns blame<CR>", desc = "Blame file" },
{ "<leader>gd", "<cmd>Gitsigns diffthis<CR>", desc = "Diff file" },

View file

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

View file

@ -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
" <C-w> will be parsed by VSCode itself.
" noremap <C-w>n <C-w>j

View file

@ -1 +0,0 @@
export FZF_DEFAULT_OPTS_FILE="$DOTFILES/common/fzfrc"

View file

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

View file

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