From d89197d212934a2c3d0f6e396742aa7af595fc23 Mon Sep 17 00:00:00 2001 From: Lee Tang Date: Mon, 30 Jan 2023 14:49:33 +0800 Subject: [PATCH] update Signed-off-by: Lee Tang --- .Brewfile.Darwin.gooddeAir | 2 ++ .zshrc | 4 +--- git/config | 11 ++++++++++- nvim/lua/plugins.lua | 13 +++++++++++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.Brewfile.Darwin.gooddeAir b/.Brewfile.Darwin.gooddeAir index 46a3933..263bb15 100644 --- a/.Brewfile.Darwin.gooddeAir +++ b/.Brewfile.Darwin.gooddeAir @@ -67,6 +67,7 @@ cask "lark" cask "logi-options-plus" cask "notion" cask "raycast" +cask "sourcetree" cask "spotify" cask "stats" cask "telegram" @@ -77,6 +78,7 @@ mas "1Password for Safari", id: 1569813296 mas "Bob", id: 1630034110 mas "Microsoft Remote Desktop", id: 1295203466 mas "Microsoft Word", id: 462054704 +mas "Notion Web Clipper", id: 1559269364 mas "Reeder", id: 1529448980 mas "Slack", id: 803453959 mas "Twitter", id: 1482454543 diff --git a/.zshrc b/.zshrc index 28144a4..d71f9dd 100644 --- a/.zshrc +++ b/.zshrc @@ -83,12 +83,10 @@ alias vi='nvim' alias batc='bat --paging=never' alias batcp='bat --plain --paging=never' alias fixscreen='sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.screensharing.plist && sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist' -alias zerotier_reload='sudo launchctl unload /Library/LaunchDaemons/com.zerotier.one.plist && sudo launchctl load /Library/LaunchDaemons/com.zerotier.one.plist' alias git_branch="git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'" alias git_clean="(git checkout main || git checkout master) && git branch --merged | grep -v 'master' | grep -v 'main' | cat | xargs git branch -d" -alias leetcode_today='curl -sL "https://leetcode-cn.com/graphql" -H "content-type: application/json" -d '\''{"operationName":"questionOfToday","variables":{},"query":"query questionOfToday {\n todayRecord {\n question {\n questionFrontendId\n questionTitleSlug\n __typename\n }\n lastSubmission {\n id\n __typename\n }\n date\n userStatus\n __typename\n }\n}\n"}'\'' | jq '\''.data.todayRecord[0].question'\''' alias clean_tmux_session='ls ~/.tmux/resurrect/* -1dtr | head -n 100 | xargs rm -v' - +alias pn='pnpm' [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh [ -f /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc ] && . /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc diff --git a/git/config b/git/config index 56d8dcb..a5bf18a 100644 --- a/git/config +++ b/git/config @@ -20,7 +20,7 @@ [core] editor = nvim - excludesfile = /Users/d0zingcat/.config/git/.gitignore + excludesfile = /Users/d0zingcat/.config/git/.gitignore [pager] difftool = true @@ -33,6 +33,7 @@ prompt = false [difftool "difftastic"] + prompt = false cmd = difft "$LOCAL" "$REMOTE" [alias] @@ -49,3 +50,11 @@ d = diff ds = diff --staged dc = diff --cached + +#[difftool "sourcetree"] +# cmd = opendiff \"$LOCAL\" \"$REMOTE\" +# path = +# +#[mergetool "sourcetree"] +# cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" +# trustExitCode = true diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 4692948..ffae65e 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -192,6 +192,19 @@ return require('packer').startup(function(use) require('config.tagbar') end, }) + -- BETTER editor + use({ + 'vinnymeller/swagger-preview.nvim', + run = "npm install -g swagger-ui-watcher", + config = function() + require("swagger-preview").setup({ + -- The port to run the preview server on + port = 9000, + -- The host to run the preview server on + host = "localhost", + }) + end, + }) -- LANGUAGES use({