fish alias & proxy & zed setting update

This commit is contained in:
2026-03-13 15:14:22 +08:00
parent f24dad4e49
commit e6635566b9
5 changed files with 66 additions and 25 deletions
-5
View File
@@ -1,5 +0,0 @@
function amnesia --description 'amnesia'
pushd ~/amnesia/
fish s.fish
popd
end
-5
View File
@@ -1,5 +0,0 @@
function clash_proxy --description 'use clash proxy in terminal'
export https_proxy=http://127.0.0.1:7890;
export http_proxy=http://127.0.0.1:7890;
export all_proxy=socks5://127.0.0.1:7890
end
+3
View File
@@ -0,0 +1,3 @@
function lg --wraps=/Users/congyu/lg/lg --description 'alias lg /Users/congyu/lg/lg'
/Users/congyu/lg/lg $argv
end
+56
View File
@@ -0,0 +1,56 @@
function __proxy_enable
set IP 127.0.0.1
set PORT 7890
set PROTO socks5
set OPT -g -x
for arg in $argv
switch $arg
case "-non-global"
set OPT -x
case "-socks" "-socks5"
set PROTO socks5
case "-socks5h"
set PROTO socks5h
case "-http"
set PROTO http
case '*'
if test (string sub -l 1 -- "$arg") != "-"
if string match -qr '^[0-9]+$' -- "$arg"
set PORT "$arg"
else
echo "Invalid port: $arg" >&2
return 1
end
end
end
end
set PROXY "$PROTO://$IP:$PORT"
echo set $OPT HTTP_PROXY $PROXY
echo set $OPT HTTPS_PROXY $PROXY
echo set $OPT ALL_PROXY $PROXY
echo set $OPT NO_PROXY localhost,127.0.0.1,::1
echo set $OPT http_proxy $PROXY
echo set $OPT https_proxy $PROXY
echo set $OPT all_proxy $PROXY
echo set $OPT no_proxy localhost,127.0.0.1,::1
end
function proxy_enable
source (__proxy_enable $argv | psub)
end
function proxy_disable
set -e -g HTTP_PROXY
set -e -g HTTPS_PROXY
set -e -g ALL_PROXY
set -e -g NO_PROXY
set -e -g http_proxy
set -e -g https_proxy
set -e -g all_proxy
set -e -g no_proxy
end
+7 -15
View File
@@ -7,18 +7,18 @@
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"diagnostics": {
"inline": {
"enabled": true
"vim_mode": true,
"agent_servers": {
"codex": {
"default_config_options": {
"reasoning_effort": "xhigh"
}
}
},
"ui_font_size": 16.0,
"show_edit_predictions": false,
"relative_line_numbers": "disabled",
"edit_predictions": {
"provider": "none"
},
"remove_trailing_whitespace_on_save": false,
"inline_code_actions": true,
"gutter": {
"breakpoints": true,
@@ -43,12 +43,6 @@
"outline_panel": {
"default_width": 280.0,
},
"notification_panel": {
"dock": "right",
},
"debugger": {
"dock": "bottom",
},
"telemetry": {
"diagnostics": false,
"metrics": false,
@@ -69,6 +63,7 @@
"tab_size": 4,
"format_on_save": "off",
"ensure_final_newline_on_save": false,
"remove_trailing_whitespace_on_save": false,
// "preferred_line_length": 80,
"soft_wrap": "editor_width",
"git": {
@@ -76,9 +71,6 @@
"enabled": false,
},
},
"collaboration_panel": {
"button": false,
},
// "vim_mode": true,
////// LSP config //////
"lsp": {