fish alias & proxy & zed setting update
This commit is contained in:
@@ -1,5 +0,0 @@
|
|||||||
function amnesia --description 'amnesia'
|
|
||||||
pushd ~/amnesia/
|
|
||||||
fish s.fish
|
|
||||||
popd
|
|
||||||
end
|
|
||||||
@@ -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
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
function lg --wraps=/Users/congyu/lg/lg --description 'alias lg /Users/congyu/lg/lg'
|
||||||
|
/Users/congyu/lg/lg $argv
|
||||||
|
end
|
||||||
@@ -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
@@ -7,18 +7,18 @@
|
|||||||
// custom settings, run `zed: open default settings` from the
|
// custom settings, run `zed: open default settings` from the
|
||||||
// command palette (cmd-shift-p / ctrl-shift-p)
|
// command palette (cmd-shift-p / ctrl-shift-p)
|
||||||
{
|
{
|
||||||
"diagnostics": {
|
"vim_mode": true,
|
||||||
"inline": {
|
"agent_servers": {
|
||||||
"enabled": true
|
"codex": {
|
||||||
|
"default_config_options": {
|
||||||
|
"reasoning_effort": "xhigh"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ui_font_size": 16.0,
|
|
||||||
"show_edit_predictions": false,
|
"show_edit_predictions": false,
|
||||||
"relative_line_numbers": "disabled",
|
|
||||||
"edit_predictions": {
|
"edit_predictions": {
|
||||||
"provider": "none"
|
"provider": "none"
|
||||||
},
|
},
|
||||||
"remove_trailing_whitespace_on_save": false,
|
|
||||||
"inline_code_actions": true,
|
"inline_code_actions": true,
|
||||||
"gutter": {
|
"gutter": {
|
||||||
"breakpoints": true,
|
"breakpoints": true,
|
||||||
@@ -43,12 +43,6 @@
|
|||||||
"outline_panel": {
|
"outline_panel": {
|
||||||
"default_width": 280.0,
|
"default_width": 280.0,
|
||||||
},
|
},
|
||||||
"notification_panel": {
|
|
||||||
"dock": "right",
|
|
||||||
},
|
|
||||||
"debugger": {
|
|
||||||
"dock": "bottom",
|
|
||||||
},
|
|
||||||
"telemetry": {
|
"telemetry": {
|
||||||
"diagnostics": false,
|
"diagnostics": false,
|
||||||
"metrics": false,
|
"metrics": false,
|
||||||
@@ -69,6 +63,7 @@
|
|||||||
"tab_size": 4,
|
"tab_size": 4,
|
||||||
"format_on_save": "off",
|
"format_on_save": "off",
|
||||||
"ensure_final_newline_on_save": false,
|
"ensure_final_newline_on_save": false,
|
||||||
|
"remove_trailing_whitespace_on_save": false,
|
||||||
// "preferred_line_length": 80,
|
// "preferred_line_length": 80,
|
||||||
"soft_wrap": "editor_width",
|
"soft_wrap": "editor_width",
|
||||||
"git": {
|
"git": {
|
||||||
@@ -76,9 +71,6 @@
|
|||||||
"enabled": false,
|
"enabled": false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"collaboration_panel": {
|
|
||||||
"button": false,
|
|
||||||
},
|
|
||||||
// "vim_mode": true,
|
// "vim_mode": true,
|
||||||
////// LSP config //////
|
////// LSP config //////
|
||||||
"lsp": {
|
"lsp": {
|
||||||
|
|||||||
Reference in New Issue
Block a user