https://github.com/junegunn/fzf
https://github.com/zsh-users/zsh-autosuggestions
-
iterm
-
ohmyzsh: https://ohmyz.sh/
-
ohmyzsh theme: "agnoster" or "powerlevel10k/powerlevel10k"
https://github.com/agnoster/agnoster-zsh-theme ZSH_THEME="agnoster" or ZSH_THEME="powerlevel10k/powerlevel10k" https://github.com/romkatv/powerlevel10k#extremely-customizable
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k OR brew install romkatv/powerlevel10k/powerlevel10k echo 'source /usr/local/opt/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc
Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc. p10k configure
-
ohmyzsh: fonts
https://github.com/powerline/fonts https://ethanschoonover.com/solarized/ iterm: Profiles > Colors > Load Presets :choose solarized dark theme All Fonts > Source Code Pro Powerline > Regular > 14 OR Meslo Nerd Font for powerlevel10k
-
Auto suggestions (for Oh My Zsh)
https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh
-
Syntax highlighting
https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md#oh-my-zsh
.zshrc
plugins=(git dnf zsh-autosuggestions zsh-syntax-highlighting)
ulimit -S -n 2048
alias zshrc="vim ~/.zshrc"
# Easier navigation:
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
{
"git.enableCommitSigning": true,
"git.requireGitUserConfig": true,
// Golang specific configs -------------------------------------------------
"[go]": {
"editor.insertSpaces": false,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "golang.go"
},
"gopls": {
// "build.buildFlags": ["-tags=slo"]
"build.buildFlags": ["-tags=!slo"]
},
"go.useLanguageServer": true,
"go.alternateTools": {
"go-langserver": "gopls",
"gocode": "gocode"
},
"go.delveConfig": {
"dlvLoadConfig": {
"followPointers": true,
"maxVariableRecurse": 1,
"maxStringLen": 64,
"maxArrayValues": 64,
"maxStructFields": -1
}
},
"go.formatTool": "goimports",
"go.lintTool": "revive",
"go.lintOnSave": "package",
"go.playground": {
"openbrowser": true
},
"go.vetOnSave": "package",
"go.trace.server": "verbose",
// "go.inlayHints.assignVariableTypes": true,
"go.inlayHints.compositeLiteralFields": true,
// "go.inlayHints.compositeLiteralTypes": true,
"go.inlayHints.constantValues": true,
// "go.inlayHints.functionTypeParameters": true,
// "go.inlayHints.parameterNames": true,
"go.inlayHints.rangeVariableTypes": true,
// -------------------------------------------------------------------------
"[java]": {
"editor.defaultFormatter": "redhat.java"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[python]": {
"editor.formatOnType": true
},
"[yaml]": {
"editor.formatOnSave": false
},
"[yml]": {
"editor.formatOnSave": false
},
// Editor configs ----------------------------------------------------------
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",
"editor.guides.highlightActiveBracketPair": true,
"editor.guides.bracketPairsHorizontal": "active",
"editor.matchBrackets": "always",
"editor.formatOnSave": true,
"editor.fontSize": 15,
// "editor.fontFamily": "Source Code Pro for Powerline"
"editor.fontFamily": "IBM Plex Mono Light",
"editor.fontLigatures": true,
"editor.fontWeight": "100",
"editor.lineHeight": 25,
"editor.rulers": [80, 100],
"editor.largeFileOptimizations": false,
"editor.inlineSuggest.enabled": true,
"editor.stickyTabStops": true,
"editor.stickyScroll.enabled": true,
"editor.tokenColorCustomizations": {
"[*Light*]": {
"textMateRules": [
{
"scope": "ref.matchtext",
"settings": {
"foreground": "#000"
}
}
]
},
"[*Dark*]": {
"textMateRules": [
{
"scope": "ref.matchtext",
"settings": {
"foreground": "#fff"
}
}
]
},
"types": {
"foreground": "#dfc184"
},
"functions": {
"foreground": "#6CB6FF"
},
"keywords": "#b85ede",
"textMateRules": [
{
"scope": "storage.type",
"settings": {
"foreground": "#F47067"
}
},
{
"scope": "keyword.package.go",
"settings": {
"foreground": "#b85ede"
}
},
{
"scope": "keyword.map",
"settings": {
"foreground": "#b85ede"
}
},
{
"scope": "keyword.const",
"settings": {
"foreground": "#b85ede"
}
},
{
"scope": "keyword.var",
"settings": {
"foreground": "#b85ede"
}
},
{
"scope": "keyword.function",
"settings": {
"foreground": "#b85ede"
}
},
{
"scope": "keyword.type",
"settings": {
"foreground": "#b85ede"
}
},
{
"scope": "keyword.struct.go",
"settings": {
"foreground": "#b85ede"
}
},
{
"scope": "keyword.interface.go",
"settings": {
"foreground": "#b85ede"
}
},
{
"scope": "variable.other.go",
"settings": {
"foreground": "#ADBAC7"
}
},
{
"scope": "string.quoted.double.go",
"settings": {
"foreground": "#a1c182"
}
},
{
"scope": "entity.name.import.go",
"settings": {
"foreground": "#a1c182"
}
},
{
"scope": "constant.language.boolean.go",
"settings": {
"foreground": "#dfc184"
}
},
{
"scope": "entity.name.type.package.go",
"settings": {
"foreground": "#ADBAC7"
}
}
]
},
// -------------------------------------------------------------------------
"breadcrumbs.enabled": false,
// "vs-kubernetes": {
// "vs-kubernetes.draft-path.mac": "/home/manigandand/.vs-kubernetes/tools/draft/darwin-amd64/draft",
// "vscode-kubernetes.minikube-path.mac": "/home/manigandand/.vs-kubernetes/tools/minikube/darwin-amd64/minikube",
// "vscode-kubernetes.helm-path.mac": "/home/manigandand/.vs-kubernetes/tools/helm/darwin-amd64/helm",
// "vscode-kubernetes.kubectl-path.mac": "/home/manigandand/.vs-kubernetes/tools/kubectl/kubectl",
// "vs-kubernetes.minikube-show-information-expiration": "2023-10-12T11:20:20.308Z"
// },
"prettier.useTabs": true,
"diffEditor.ignoreTrimWhitespace": false,
"go.toolsManagement.autoUpdate": true,
"github.copilot.editor.enableAutoCompletions": true,
"github.copilot.enable": {
"*": true,
"plaintext": true,
"markdown": false,
"scminput": false,
"yaml": true,
"go": true,
"c": false
},
"redhat.telemetry.enabled": true,
"security.workspace.trust.untrustedFiles": "open",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"terminal.integrated.fontFamily": "MesloLGS NF",
"terminal.integrated.fontSize": 14,
// "terminal.integrated.shell.osx": "/bin/zsh",
// "terminal.integrated.defaultProfile.osx": "zsh",
"terminal.integrated.defaultProfile.linux": "zsh",
"explorer.confirmDragAndDrop": false,
"errorLens.enabledDiagnosticLevels": ["warning", "info", "error"],
"errorLens.enabled": false,
"githubPullRequests.pullBranch": "never",
"workbench.editorAssociations": {
"*.db": "default",
"*.gz": "default"
},
"material-icon-theme.folders.theme": "classic",
"workbench.preferredDarkColorTheme": "GitHub Dark Dimmed",
"workbench.editor.empty.hint": "hidden",
"workbench.tree.enableStickyScroll": true,
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "GitHub Dark Dimmed",
"workbench.colorCustomizations": {
"[GitHub Dark Dimmed]": {
"activityBar.background": "#22272e",
"sideBar.background": "#22272e",
"sideBarSectionHeader.background": "#1c2128",
"activityBar.activeBorder": "#04a029",
"activityBar.activeFocusBorder": "#fce566",
"activityBar.foreground": "#07e107",
"editor.background": "#1c2128",
"tab.activeBackground": "#1c2128",
"tab.inactiveBackground": "#272b34",
"editorRuler.foreground": "#adbac749"
}
},
"window.autoDetectColorScheme": true
}
- golang snippets
{
"funcwr": {
"prefix": "funcwr",
"body": [
"func nameHandler(w http.ResponseWriter, r *http.Request) *errors.AppError {",
"ctx := r.Context()",
"userID, _ := ctx.Value().(primitive.ObjectID)",
"respond.OK(w, nil, nil)",
"return nil",
"}",
],
"description": "http handler function"
}
}
git config --global user.name "Manigandan Dharmalingam"
git config --global user.email "[email protected]"
https://docs.github.com/en/github/authenticating-to-github/generating-a-new-gpg-key
https://docs.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account
https://docs.github.com/en/github/authenticating-to-github/telling-git-about-your-signing-key
.gitconfig
[user]
name = Manigandan Dharmalingam
email = [email protected]
signingkey = C252B4684EF3C781
[core]
sshCommand = "ssh -i ~/.ssh/id_rsa_github_personal"
[gpg]
program = gpg
[commit]
gpgsign = true
[includeIf "gitdir:~/gopherhut/gitlab/"]
path = ~/gopherhut/gitlab/.gitconfig
[includeIf "gitdir:~/workspace/"]
path = ~/workspace/.gitconfig
/Users/manigandand/gopherhut/gitlab/.gitconfig
[user]
name = Manigandan Dharmalingam
email = [email protected]
[core]
sshCommand = "ssh -i ~/.ssh/id_rsa_gitlab_personal"
/Users/manigandand/workspace/.gitconfig
[user]
name = Manigandan Dharmalingam
email = [email protected]
[core]
sshCommand = "ssh -i ~/.ssh/id_rsa_gitlab_work"
[url "[email protected]:"]
insteadOf = https://git.gopherhut.io/
[url "[email protected]"]
insteadOf = [email protected]%
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
ZSH_DISABLE_COMPFIX=true
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/manigandand/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="powerlevel10k/powerlevel10k"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git dnf zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias zshrc="vim ~/.zshrc"
# Easier navigation:
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
#alias gc-S-m='git commit -S -m " "'
# K8s alias ----------------------------------
# add autocomplete permanently to your bash shell.
[[ /usr/local/bin/kubectl ]] && source <(kubectl completion zsh)
alias k=kubectl
complete -F __start_kubectl k
# --------------------------------------------
ulimit -S -n 2048
POWERLEVEL9K_MODE="nerdfont-complete placement"
# exports ------------------------------------
export GOPATH=$HOME/go
export GONOSUMDB=github.com/gopherhut
# --------------------------------------------
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/manigandand/Downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/manigandand/Downloads/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/manigandand/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/manigandand/Downloads/google-cloud-sdk/completion.zsh.inc'; fi