mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-04 08:41:43 +05:30
Major Update
- Updated repo to support both mac and kde neon - bootstrap.sh updated to auto-detect OS and read from the required directory - Added VIM & NeoVIM dot files
This commit is contained in:
74
common/.aliases
Normal file
74
common/.aliases
Normal file
@@ -0,0 +1,74 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Generic
|
||||
alias sb="source ~/.bashrc"
|
||||
alias bashreload="source ~/.bashrc"
|
||||
alias sz="source ~/.zshrc"
|
||||
alias zshreload="source ~/.zshrc"
|
||||
alias bashrc="${EDITOR:-nano} +116 ~/.bashrc"
|
||||
alias zshrc="${EDITOR:-nano} ~/.zshrc"
|
||||
alias free="free -ht"
|
||||
alias type="type -a"
|
||||
alias grep='grep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias usersearch="awk -F: '{print \"UserName: \" \$1 \", UserID: \" \$3 \", Home Dir: \" \$6 \", Shell Used: \" \$7}' /etc/passwd | grep"
|
||||
alias untar='tar -zxvf '
|
||||
|
||||
url_encode(){
|
||||
python3 -c "import urllib.parse, sys; print(urllib.parse.quote(sys.stdin.read()))" <<< "$1"
|
||||
}
|
||||
|
||||
|
||||
# History
|
||||
alias histsearch="history | grep"
|
||||
alias hs="histsearch"
|
||||
alias hsi="histsearch"
|
||||
|
||||
|
||||
# Directories and Directory listings
|
||||
alias ~="cd ~"
|
||||
alias ..="cd .."
|
||||
alias ...='cd ../../../' # Go back 3 directory levels
|
||||
alias ..4='cd ../../../../' # Go back 4 directory levels
|
||||
alias ..5='cd ../../../../../' # Go back 5 directory levels
|
||||
alias ..6='cd ../../../../../../' # Go back 6 directory levels
|
||||
alias lsc='ls --color=auto'
|
||||
alias ll='lsc -alhF'
|
||||
alias la='lsc -Ah'
|
||||
alias l='lsc -CF'
|
||||
alias lsa="lsc -lAFhZ"
|
||||
alias mkdir="mkdir -pv"
|
||||
alias df="df -h"
|
||||
mkcd () {
|
||||
mkdir "$1"
|
||||
cd "$1" || exit
|
||||
}
|
||||
|
||||
|
||||
# Network
|
||||
alias ping="ping -c 10"
|
||||
alias ping8="ping 8.8.8.8"
|
||||
alias ping1="ping 1.1.1.1"
|
||||
alias p8="ping8"
|
||||
alias p1="ping1"
|
||||
alias pubip="curl https://ipinfo.io/ip; echo"
|
||||
alias speedtest="speedtest-cli --secure" # needs speedtest-cli installed
|
||||
geoip () {
|
||||
curl -s https://ipinfo.io | sed '/readme/d;/loc/d;/postal/d;s/org/ISP/' | tr -d {},\" | awk -F ':' 'NF {printf ("%10s: %.25s \n", $1, $2)}'
|
||||
}
|
||||
|
||||
|
||||
# Git
|
||||
# To use this - Ensure all git server SSH are in ~/.ssh
|
||||
alias git_signin='(for i in ~/.ssh/{*github*,*gitea*}; do ssh-add -k $i; done; ) && (echo; echo Identities added successfully)'
|
||||
git_push_all_changes(){
|
||||
git add . && git commit -am "${1}" && git push
|
||||
}
|
||||
|
||||
|
||||
alias ta="tmux a"
|
||||
alias tat="tmux a -t"
|
||||
alias tls="tmux ls"
|
||||
alias tnew="tmux new"
|
||||
alias tnewt="tmux new -t"
|
||||
209
common/.bashrc
Normal file
209
common/.bashrc
Normal file
@@ -0,0 +1,209 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# set variable identifying the chroot you work in (used in the prompt below)
|
||||
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||
debian_chroot=$(cat /etc/debian_chroot)
|
||||
fi
|
||||
|
||||
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||
case "$TERM" in
|
||||
xterm-color|*-256color) color_prompt=yes;;
|
||||
esac
|
||||
|
||||
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||
# off by default to not distract the user: the focus in a terminal window
|
||||
# should be on the output of commands, not on the prompt
|
||||
#force_color_prompt=yes
|
||||
|
||||
if [ -n "$force_color_prompt" ]; then
|
||||
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||
# We have color support; assume it's compliant with Ecma-48
|
||||
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||
# a case would tend to support setf rather than setaf.)
|
||||
color_prompt=yes
|
||||
else
|
||||
color_prompt=
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$color_prompt" != yes ]; then
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
|
||||
unset color_prompt force_color_prompt
|
||||
|
||||
# If this is an xterm set the title to user@host:dir
|
||||
case "$TERM" in
|
||||
xterm*|rxvt*)
|
||||
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias ls='ls --color=auto'
|
||||
#alias dir='dir --color=auto'
|
||||
#alias vdir='vdir --color=auto'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# colored GCC warnings and errors
|
||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
# Alias definitions.
|
||||
# You may want to put all your additions into a separate file like
|
||||
# ~/.bash_aliases, instead of adding them here directly.
|
||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
. ~/.bash_aliases
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
################################################################################
|
||||
################################################################################
|
||||
############### Everything below this line are customizations
|
||||
################################################################################
|
||||
################################################################################
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=-1
|
||||
HISTFILESIZE=-1
|
||||
HISTCONTROL=ignorespace
|
||||
HISTTIMEFORMAT="%H:%M:%S(%z)%d-%b-%y "
|
||||
|
||||
# Do not let globbing complain on no match
|
||||
shopt -s nullglob
|
||||
|
||||
## When only a directory is entered without cd, cd into it
|
||||
shopt -s autocd
|
||||
|
||||
function timer_start {
|
||||
timer=${timer:-$SECONDS}
|
||||
}
|
||||
|
||||
trap 'timer_start' DEBUG
|
||||
|
||||
PROMPT_COMMAND=jazz_my_prompt
|
||||
|
||||
jazz_my_prompt() {
|
||||
# Capture exit code of last command
|
||||
# Below MUST be the 1st line of the function
|
||||
local ex=$?
|
||||
|
||||
# Capture the last command's execution time
|
||||
timer_show=$(($SECONDS - $timer))
|
||||
unset timer
|
||||
|
||||
#----------------------------------------------------------------------------#
|
||||
# Bash text colour specification: \e[<COLOUR>;<STYLE>m
|
||||
# Colours: 31=red, 32=green, 33=yellow, 34=blue, 35=purple, 36=cyan, 37=white
|
||||
# Styles: 0=normal, 1=bold, 2=dimmed, 4=underlined, 7=highlighted
|
||||
#----------------------------------------------------------------------------#
|
||||
|
||||
local reset="\[\e[0m\]"
|
||||
local normal=';0m'
|
||||
local bold=';1m'
|
||||
local boldyellow="\[\e[32${bold}\]"
|
||||
local boldwhite="\[\e[37${bold}\]"
|
||||
local normalwhite="\[\e[37${normal}\]"
|
||||
local yellow_highlight="\[\e[31;7m\]"
|
||||
|
||||
# Add color preference BEFORE the item
|
||||
local hostname="${normalwhite}\h"
|
||||
local username="${boldwhite}\u"
|
||||
local jobs="${boldwhite}jobs:\j"
|
||||
local history_cnt="${normalwhite}!\!"
|
||||
local timestamp="${normalwhite}\D{%H:%M:%S(%z) %d%b}"
|
||||
local session_cmd_cnt="${normalwhite}#\#"
|
||||
local pwd="${boldwhite}\w"
|
||||
local isroot="${boldwhite}\$"
|
||||
|
||||
# Set prompt content
|
||||
# If exit code of last command is non-zero, prepend this code to the prompt
|
||||
local exit_code=''
|
||||
if [[ "$ex" -eq 0 ]]
|
||||
then
|
||||
exit_code="${boldwhite}✓"
|
||||
else
|
||||
exit_code="${yellow_highlight}✗ $ex\a${reset}"
|
||||
fi
|
||||
|
||||
# Style each group separately
|
||||
local groupstart="${boldyellow}["
|
||||
local groupend="${boldyellow}]"
|
||||
group1="${groupstart}${username}@${hostname}${groupend}"
|
||||
group2="${groupstart}${jobs}${groupend}"
|
||||
group3="${groupstart}${history_cnt}${groupend}"
|
||||
group4="${groupstart}${session_cmd_cnt}${groupend}"
|
||||
group5="${groupstart}${timestamp}${groupend}"
|
||||
group6="${groupstart}${exit_code}${groupend}"
|
||||
group8="${groupstart}${pwd}${groupend}"
|
||||
group9="${groupstart}${normalwhite}${timer_show}s${groupend}"
|
||||
|
||||
# Position each group where you would like them
|
||||
PS1="\n${group1}-${group2}-${group3}-${group4}-${group5}\n${group6}-${group9}-${group8}\n${isroot}${reset} "
|
||||
}
|
||||
|
||||
# Setup path and export variables
|
||||
[[ ! -f ~/.env ]] || source ~/.env
|
||||
[[ ! -f ~/.set_path ]] || source ~/.set_path
|
||||
[[ ! -f "$HOME/.cargo/env" ]] || source "$HOME/.cargo/env"
|
||||
|
||||
# Aliases
|
||||
[[ ! -f ~/.aliases ]] || source ~/.aliases
|
||||
[[ ! -f ~/.mac_aliases ]] || source ~/.mac_aliases
|
||||
[[ ! -f ~/.neon_aliases ]] || source ~/.neon_aliases
|
||||
[[ ! -f ~/.aliases_personal ]] || source ~/.aliases_personal
|
||||
|
||||
# nvm Setup
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
[[ ! -f ~/.config/exercism/exercism_completion.bash ]] || source ~/.config/exercism/exercism_completion.bash
|
||||
export QT_PLUGIN_PATH=~/.local/lib/qt/plugins/:
|
||||
|
||||
eval "$(ssh-agent -s)"
|
||||
66
common/.config/Code/User/keybindings.json
Normal file
66
common/.config/Code/User/keybindings.json
Normal file
@@ -0,0 +1,66 @@
|
||||
// Place your key bindings in this file to override the defaults
|
||||
[
|
||||
{
|
||||
"key": "ctrl+alt+b",
|
||||
"command": "bookmarks.toggle",
|
||||
"when": "editorTextFocus"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+t",
|
||||
"command": "workbench.action.terminal.new"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+alt+right",
|
||||
"command": "editor.emmet.action.nextEditPoint"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+alt+t",
|
||||
"command": "editor.emmet.action.matchTag"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+alt+p",
|
||||
"command": "editor.emmet.action.wrapWithAbbreviation"
|
||||
},
|
||||
{
|
||||
"key": "alt+q",
|
||||
"command": "workbench.action.terminal.focus"
|
||||
},
|
||||
{
|
||||
"key": "alt+q",
|
||||
"command": "workbench.action.focusActiveEditorGroup",
|
||||
"when": "terminalFocus"
|
||||
},
|
||||
{
|
||||
"key": "alt+e",
|
||||
"command": "workbench.action.focusActiveEditorGroup"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+e",
|
||||
"command": "python.execInTerminal"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+n",
|
||||
"command": "explorer.newFile"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+alt+g",
|
||||
"command": "git.checkout"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+j",
|
||||
"command": "editor.action.joinLines"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+j",
|
||||
"command": "workbench.action.togglePanel"
|
||||
},
|
||||
{
|
||||
"key": "shift+f1",
|
||||
"command": "workbench.action.terminal.toggleTerminal",
|
||||
"when": "terminal.active"
|
||||
},
|
||||
{
|
||||
"key": "shift+escape",
|
||||
"command": "workbench.action.toggleSidebarVisibility"
|
||||
}
|
||||
]
|
||||
281
common/.config/Code/User/settings.json
Normal file
281
common/.config/Code/User/settings.json
Normal file
@@ -0,0 +1,281 @@
|
||||
{
|
||||
// Global
|
||||
"update.mode": "manual",
|
||||
"workbench.settings.editor": "json",
|
||||
//
|
||||
// Privacy
|
||||
"telemetry.telemetryLevel": "off",
|
||||
"extensions.ignoreRecommendations": true,
|
||||
//
|
||||
// Editor
|
||||
"editor.fontSize": 21, // Increase the Editor's font to offset
|
||||
"window.zoomLevel": -1, // Reduces the Activity Bar size
|
||||
"editor.cursorWidth": 4,
|
||||
"editor.minimap.enabled": false,
|
||||
"editor.wordWrap": "on",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnPaste": true,
|
||||
"editor.copyWithSyntaxHighlighting": true,
|
||||
"editor.acceptSuggestionOnEnter": "smart",
|
||||
"editor.snippetSuggestions": "top",
|
||||
"editor.guides.indentation": true,
|
||||
"editor.tabSize": 4,
|
||||
"editor.insertSpaces": true,
|
||||
"editor.detectIndentation": false,
|
||||
"editor.multiCursorModifier": "ctrlCmd",
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"files.autoSave": "afterDelay",
|
||||
"files.autoSaveDelay": 1000,
|
||||
"diffEditor.renderSideBySide": true,
|
||||
"diffEditor.ignoreTrimWhitespace": false,
|
||||
//
|
||||
// Editor Font
|
||||
"editor.fontFamily": "FuraCode Nerd Font",
|
||||
"editor.fontLigatures": true,
|
||||
"terminal.integrated.fontFamily": "FuraCode Nerd Font",
|
||||
"terminal.integrated.fontSize": 20,
|
||||
//
|
||||
// Workbench - Everything that surrounds the editor
|
||||
"workbench.startupEditor": "newUntitledFile",
|
||||
"workbench.sideBar.location": "left",
|
||||
"workbench.colorCustomizations": {
|
||||
"tab.activeBackground": "#07f7af3f",
|
||||
"tab.activeBorder": "#ffffff"
|
||||
},
|
||||
"bookmarks.navigateThroughAllFiles": true,
|
||||
"window.menuBarVisibility": "compact",
|
||||
"explorer.confirmDragAndDrop": false,
|
||||
//
|
||||
// Screencast Options
|
||||
"screencastMode.verticalOffset": 5,
|
||||
"screencastMode.fontSize": 45,
|
||||
//
|
||||
// Debugging
|
||||
"debug.toolBarLocation": "docked",
|
||||
//
|
||||
// Prettier Plugin
|
||||
"prettier.tabWidth": 4,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||
"prettier.useTabs": false,
|
||||
"prettier.printWidth": 85,
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[json]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
//
|
||||
// Code Spell Checker Plugin
|
||||
"cSpell.diagnosticLevel": "Hint",
|
||||
"cSpell.allowCompoundWords": true,
|
||||
"cSpell.fixSpellingWithRenameProvider": true,
|
||||
"cSpell.enableFiletypes": ["shellscript"],
|
||||
"cSpell.minWordLength": 3,
|
||||
"cSpell.numSuggestions": 10,
|
||||
"cSpell.userWords": [
|
||||
"Aadhaar",
|
||||
"Aiginia",
|
||||
"BBSR",
|
||||
"Bhubaneswar",
|
||||
"CLR",
|
||||
"Destructured",
|
||||
"GOPATH",
|
||||
"IIS",
|
||||
"JIT",
|
||||
"Jython",
|
||||
"Kumar",
|
||||
"LINQ",
|
||||
"MVC",
|
||||
"Monomorphization",
|
||||
"OOP",
|
||||
"Odisha",
|
||||
"Postgres",
|
||||
"Pratik",
|
||||
"Printf",
|
||||
"Println",
|
||||
"Sprintf",
|
||||
"Struct",
|
||||
"Structs",
|
||||
"Tripathy",
|
||||
"VIMP",
|
||||
"VVIMP",
|
||||
"VVVIMP",
|
||||
"Vec",
|
||||
"arity",
|
||||
"atleast",
|
||||
"destructure",
|
||||
"elif",
|
||||
"mkdir",
|
||||
"monomorphized",
|
||||
"pratiktri",
|
||||
"ptr",
|
||||
"pylint",
|
||||
"subfolder",
|
||||
"ulta",
|
||||
"umount",
|
||||
"unmount"
|
||||
],
|
||||
//
|
||||
// Shell check plugin
|
||||
"shellcheck.run": "onSave",
|
||||
"shellcheck.exclude": ["2181", "2039"],
|
||||
"security.workspace.trust.untrustedFiles": "open",
|
||||
//
|
||||
// Better Comments
|
||||
"better-comments.tags": [
|
||||
{
|
||||
"tag": "!",
|
||||
"color": "#FF2D00",
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
},
|
||||
{
|
||||
"tag": "?",
|
||||
"color": "#3498DB",
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
},
|
||||
{
|
||||
"tag": "//",
|
||||
"color": "#474747",
|
||||
"strikethrough": true,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
},
|
||||
{
|
||||
"tag": "todo",
|
||||
"color": "#FF8C00",
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
},
|
||||
{
|
||||
"tag": "*",
|
||||
"color": "#98C379",
|
||||
"strikethrough": false,
|
||||
"underline": false,
|
||||
"backgroundColor": "transparent",
|
||||
"bold": false,
|
||||
"italic": false
|
||||
}
|
||||
],
|
||||
// ES Lint
|
||||
"eslint.alwaysShowStatus": true,
|
||||
"eslint.run": "onSave",
|
||||
//
|
||||
// JavaScript
|
||||
"typescript.suggest.paths": false,
|
||||
//
|
||||
// Git
|
||||
"git.enableSmartCommit": true,
|
||||
"git.autofetch": true,
|
||||
"git.confirmSync": false,
|
||||
// GetLens
|
||||
"gitlens.hovers.currentLine.over": "line",
|
||||
"gitlens.advanced.telemetry.enabled": false,
|
||||
"gitlens.statusBar.reduceFlicker": true,
|
||||
"gitlens.blame.avatars": false,
|
||||
"gitlens.currentLine.uncommittedChangesFormat": "✏️ ${ago}",
|
||||
"gitlens.codeLens.enabled": false,
|
||||
"gitlens.currentLine.enabled": false,
|
||||
"gitlens.views.branches.branches.layout": "list",
|
||||
//
|
||||
// Golang
|
||||
"go.useLanguageServer": true,
|
||||
"go.formatTool": "gofmt",
|
||||
// Markdown
|
||||
"markdownlint.run": "onType",
|
||||
"markdown.extension.print.imgToBase64": true,
|
||||
"markdown.extension.print.theme": "dark",
|
||||
"markdown.extension.toc.orderedList": true,
|
||||
"markdown.extension.tableFormatter.normalizeIndentation": true,
|
||||
"markdown.extension.list.indentationSize": "inherit",
|
||||
"markdown.extension.bold.indicator": "**",
|
||||
"markdown.extension.italic.indicator": "*",
|
||||
"markdownlint.config": {
|
||||
"default": true,
|
||||
"MD007": false,
|
||||
"MD024": false,
|
||||
"MD029": false,
|
||||
"MD030": false,
|
||||
"MD033": false,
|
||||
"MD046": false,
|
||||
"no-hard-tabs": false,
|
||||
"line-length": false
|
||||
},
|
||||
// LaTex
|
||||
// https://nevalsar.hashnode.dev/compiling-latex-with-ubuntu-and-visual-studio-code#heading-issues-with-modules-setting-additional-compiler-flags
|
||||
"latex-workshop.latex.tools": [
|
||||
{
|
||||
"name": "latexmk",
|
||||
"command": "latexmk",
|
||||
"args": [
|
||||
"--shell-escape",
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-file-line-error",
|
||||
"-pdf",
|
||||
"-outdir=%OUTDIR%",
|
||||
"%DOC%"
|
||||
],
|
||||
"env": {}
|
||||
},
|
||||
{
|
||||
"name": "pdflatex",
|
||||
"command": "pdflatex",
|
||||
"args": [
|
||||
"--shell-escape",
|
||||
"-synctex=1",
|
||||
"-interaction=nonstopmode",
|
||||
"-file-line-error",
|
||||
"%DOC%"
|
||||
],
|
||||
"env": {}
|
||||
},
|
||||
{
|
||||
"name": "bibtex",
|
||||
"command": "bibtex",
|
||||
"args": ["--shell-escape", "%DOCFILE%"],
|
||||
"env": {}
|
||||
}
|
||||
],
|
||||
|
||||
//
|
||||
// Python
|
||||
"python.jediEnabled": false,
|
||||
"python.languageServer": "Pylance",
|
||||
"workbench.iconTheme": "material-icon-theme",
|
||||
"workbench.colorTheme": "GitHub Dark",
|
||||
// "theme-by-language.themes": {
|
||||
// "*": "GitHub Dark",
|
||||
// "markdown": "Community Material Theme Darker High Contrast"
|
||||
// },
|
||||
|
||||
// Rust
|
||||
// "rust.build_on_save": true,
|
||||
// "rust.clippy_preference": "on",
|
||||
// "rust.full_docs": true,
|
||||
// "rust-analyzer.assist.importMergeBehavior": "last",
|
||||
// "rust-analyzer.cargo.loadOutDirsFromCheck": true,
|
||||
// "rust-analyzer.procMacro.enable": true,
|
||||
// "rust-analyzer.checkOnSave.command": "clippy",
|
||||
// "rust-analyzer.cargo.target": null,
|
||||
// "rust-analyzer.completion.postfix.enable": false,
|
||||
// "rust-analyzer.inlayHints.enable": false,
|
||||
// "rust-analyzer.inlayHints.typeHints": false,
|
||||
//
|
||||
"terminal.integrated.shell.linux": "/bin/zsh",
|
||||
"debug.javascript.autoAttachFilter": "disabled",
|
||||
"debug.onTaskErrors": "debugAnyway"
|
||||
//
|
||||
}
|
||||
15
common/.config/nvim/.neoconf.json
Normal file
15
common/.config/nvim/.neoconf.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
2
common/.config/nvim/init.lua
Normal file
2
common/.config/nvim/init.lua
Normal file
@@ -0,0 +1,2 @@
|
||||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
53
common/.config/nvim/lazy-lock.json
Normal file
53
common/.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"LazyVim": { "branch": "main", "commit": "e996eed750aabdfaa976357450f9ccbcd333a785" },
|
||||
"LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "357cc8f8eeb64702e6fcf2995e3b9becee99a5d3" },
|
||||
"catppuccin": { "branch": "main", "commit": "dcef0a062de380885193fb0f919217d58b979753" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"conform.nvim": { "branch": "master", "commit": "4897996612adeb9cb39325f95c9b0481ce892edf" },
|
||||
"dashboard-nvim": { "branch": "master", "commit": "c71cab740e2add248c54c458b5ca9d6e77c30fa6" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "1f2d1206a03bd3add8aedf6251e4534611de577f" },
|
||||
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "5a9a6ac29a7805c4783cda21b80a1e361964b3f2" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "8a7b48f5823cc924f815129192288ec2e2b9288f" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "4c75c8eeb957a99aa44ce8e526c04340ab358c5e" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "09be3766669bfbabbe2863c624749d8da392c916" },
|
||||
"mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
|
||||
"mini.ai": { "branch": "main", "commit": "10ad2ed049fb681a829b44aeb23443c0a9c910ae" },
|
||||
"mini.bufremove": { "branch": "main", "commit": "75be0b153b0cd2499c031e57d44cde8dad4766e4" },
|
||||
"mini.comment": { "branch": "main", "commit": "a27b9115e40519ef23991af9564f43ec14a41fe2" },
|
||||
"mini.indentscope": { "branch": "main", "commit": "cbc07203ca8faae952ca373c1f6cc5881ce97af0" },
|
||||
"mini.pairs": { "branch": "main", "commit": "6f6bd7ed5757b40bc29c73dac0d743e4e6978124" },
|
||||
"mini.surround": { "branch": "main", "commit": "68ce058ef9716d7d955b79363845d2dd003d6500" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "63ebe879ad4798b66d29c0b2c8d04942389d438e" },
|
||||
"neoconf.nvim": { "branch": "main", "commit": "671d8456ecbd8279de2ac4cc4f3cf967683c5770" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "b094a663ccb71733543d8254b988e6bebdbdaca4" },
|
||||
"noice.nvim": { "branch": "main", "commit": "8f1b53ab85f83e0687d0f267085ad781ec240432" },
|
||||
"nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "d3a3056204e1a9dbb7c7fe36c114dc43b681768c" },
|
||||
"nvim-lint": { "branch": "master", "commit": "e236bd9401709f1cfff7b9951445d965658fa3dc" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "38da5bbe1eaab2394056109e48c7e195bdb8fdfe" },
|
||||
"nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
|
||||
"nvim-spectre": { "branch": "master", "commit": "696cff781a4a7ecc91549736835e2acbd00fe859" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "f636d58c8d5780e5fe79a8de5691b1712c758b05" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "8aa32aa6b84dda357849dbc0f775e69f2e04c041" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "23f3840b7520e009121b3175f528178136dd9834" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
|
||||
"nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "f0267921c845c42685968401bc49aa65e18d3e09" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "74ce793a60759e3db0d265174f137fb627430355" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "531b04704fc9ff994d8b9c0720428fdc3c7d49d1" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
|
||||
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
|
||||
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||
}
|
||||
9
common/.config/nvim/lazyvim.json
Normal file
9
common/.config/nvim/lazyvim.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extras": [
|
||||
|
||||
],
|
||||
"news": {
|
||||
"NEWS.md": "2123"
|
||||
},
|
||||
"version": 2
|
||||
}
|
||||
3
common/.config/nvim/lua/config/autocmds.lua
Normal file
3
common/.config/nvim/lua/config/autocmds.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
3
common/.config/nvim/lua/config/keymaps.lua
Normal file
3
common/.config/nvim/lua/config/keymaps.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
46
common/.config/nvim/lua/config/lazy.lua
Normal file
46
common/.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,46 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
-- { import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
-- { import = "lazyvim.plugins.extras.lang.json" },
|
||||
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "tokyonight", "habamax" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
3
common/.config/nvim/lua/config/options.lua
Normal file
3
common/.config/nvim/lua/config/options.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
265
common/.config/nvim/lua/plugins/example.lua
Normal file
265
common/.config/nvim/lua/plugins/example.lua
Normal file
@@ -0,0 +1,265 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- add symbols-outline
|
||||
{
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sources, { name = "emoji" })
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add telescope-fzf-native
|
||||
{
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, "😄")
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Use <tab> for completion and snippets (supertab)
|
||||
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
keys = function()
|
||||
return {}
|
||||
end,
|
||||
},
|
||||
-- then: setup supertab in cmp
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- this way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
3
common/.config/nvim/stylua.toml
Normal file
3
common/.config/nvim/stylua.toml
Normal file
@@ -0,0 +1,3 @@
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
column_width = 120
|
||||
6
common/.env
Executable file
6
common/.env
Executable file
@@ -0,0 +1,6 @@
|
||||
# Setup Shared cache for Rust
|
||||
export RUSTC_WRAPPER=sccache
|
||||
export SCCACHE_CACHE_SIZE="20G"
|
||||
|
||||
# Optout of dotnetcore telemetry
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
14
common/.gitconfig
Normal file
14
common/.gitconfig
Normal file
@@ -0,0 +1,14 @@
|
||||
[user]
|
||||
email = mail@pratik.live
|
||||
name = Pratik Tripathy
|
||||
[core]
|
||||
autocrlf = input
|
||||
editor = code --wait
|
||||
[diff]
|
||||
tool = vscode
|
||||
[difftool "vscode"]
|
||||
cmd = "code --wait --diff $LOCAL $REMOTE"
|
||||
[alias]
|
||||
ll = log --pretty=format:'%Cblue%cn (%ce)%Creset commited %Cred%h%Creset %Cgreen%cr%Creset:%n%B'
|
||||
unstage = restore --staged .
|
||||
|
||||
45
common/.ideavimrc
Normal file
45
common/.ideavimrc
Normal file
@@ -0,0 +1,45 @@
|
||||
" .ideavimrc is a configuration file for IdeaVim plugin. It uses
|
||||
" the same commands as the original .vimrc configuration.
|
||||
" You can find a list of commands here: https://jb.gg/h38q75
|
||||
" Find more examples here: https://jb.gg/share-ideavimrc
|
||||
|
||||
" Source your .vimrc
|
||||
source ~/.vimrc
|
||||
|
||||
"" -- Suggested options --
|
||||
" Show a few lines of context around the cursor. Note that this makes the
|
||||
" text scroll if you mouse-click near the start or end of the window.
|
||||
set scrolloff=5
|
||||
|
||||
" Quick scope for motions with f, t, F & T
|
||||
" https://plugins.jetbrains.com/plugin/19417-ideavim-quickscope
|
||||
" set quickscope
|
||||
|
||||
" Do incremental searching.
|
||||
set incsearch
|
||||
|
||||
" Don't use Ex mode, use Q for formatting.
|
||||
map Q gq
|
||||
|
||||
" --- Enable IdeaVim plugins https://jb.gg/ideavim-plugins
|
||||
|
||||
" Highlight copied text
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
" Commentary plugin
|
||||
Plug 'tpope/vim-commentary'
|
||||
" Surround Plugin
|
||||
Plug 'tpope/vim-surround'
|
||||
|
||||
"" -- Map IDE actions to IdeaVim -- https://jb.gg/abva4t
|
||||
"" Map \r to the Reformat Code action
|
||||
map \r <Action>(ReformatCode)
|
||||
|
||||
"" Map <leader>d to start debug
|
||||
"map <leader>d <Action>(Debug)
|
||||
|
||||
"" Map \b to toggle the breakpoint on the current line
|
||||
"map \b <Action>(ToggleLineBreakpoint)
|
||||
|
||||
" Center the cursor when doing 1/2 page down and page up
|
||||
nnoremap <C-d> <C-d>zz
|
||||
nnoremap <C-u> <C-u>zz
|
||||
1603
common/.p10k.zsh
Normal file
1603
common/.p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
27
common/.profile
Normal file
27
common/.profile
Normal file
@@ -0,0 +1,27 @@
|
||||
# ~/.profile: executed by the command interpreter for login shells.
|
||||
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||
# exists.
|
||||
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||
# the files are located in the bash-doc package.
|
||||
|
||||
# the default umask is set in /etc/profile; for setting the umask
|
||||
# for ssh logins, install and configure the libpam-umask package.
|
||||
#umask 022
|
||||
|
||||
# if running bash
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
# include .bashrc if it exists
|
||||
if [ -f "$HOME/.bashrc" ]; then
|
||||
. "$HOME/.bashrc"
|
||||
fi
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/bin" ] ; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
fi
|
||||
|
||||
# set PATH so it includes user's private bin if it exists
|
||||
if [ -d "$HOME/.local/bin" ] ; then
|
||||
PATH="$HOME/.local/bin:$PATH"
|
||||
fi
|
||||
57
common/.tmux.conf
Normal file
57
common/.tmux.conf
Normal file
@@ -0,0 +1,57 @@
|
||||
######################## Key Bindings ########################
|
||||
# Change prefix to -> (Ctrl + a)
|
||||
set-option -g prefix C-a
|
||||
unbind-key C-a
|
||||
bind-key C-a send-prefix
|
||||
|
||||
# Use Shift-arrow keys to switch panes
|
||||
bind -n S-Left select-pane -L
|
||||
bind -n S-Right select-pane -R
|
||||
bind -n S-Up select-pane -U
|
||||
bind -n S-Down select-pane -D
|
||||
|
||||
# Alt arrow to switch windows
|
||||
bind -n M-Left previous-window
|
||||
bind -n M-Right next-window
|
||||
|
||||
# Set easier window split keys
|
||||
bind-key v split-window -h
|
||||
bind-key h split-window -v
|
||||
|
||||
# Easy config reload
|
||||
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
|
||||
######################## Key Bindings ########################
|
||||
|
||||
|
||||
|
||||
######################## Windows ########################
|
||||
# Start window numbers at 1 to match keyboard order with tmux window order
|
||||
set -g base-index 1
|
||||
set-window-option -g pane-base-index 1
|
||||
|
||||
# Renumber windows sequentially after closing any of them
|
||||
set -g renumber-windows on
|
||||
######################## Windows ########################
|
||||
|
||||
|
||||
|
||||
######################## Colors ########################
|
||||
# improve colors
|
||||
set -g default-terminal 'screen-256color'
|
||||
|
||||
# Soften status bar color from harsh green to light gray
|
||||
set -g status-style bg='#666666',fg='#aaaaaa'
|
||||
|
||||
######################## Colors ########################
|
||||
|
||||
|
||||
|
||||
######################## Other Features ########################
|
||||
# Increase scrollback lines
|
||||
set -g history-limit 10000
|
||||
|
||||
# Mouse mode
|
||||
setw -g mouse on
|
||||
|
||||
# Restore tmux-sessions -> https://github.com/tmux-plugins/tmux-resurrect
|
||||
run-shell ~/downloads/softwares/tmux-resurrect/resurrect.tmux ######################## Other Features ########################
|
||||
2812
common/.vim/autoload/plug.vim
Normal file
2812
common/.vim/autoload/plug.vim
Normal file
File diff suppressed because it is too large
Load Diff
97
common/.vimrc
Normal file
97
common/.vimrc
Normal file
@@ -0,0 +1,97 @@
|
||||
" Show line numbers
|
||||
set number
|
||||
|
||||
" This enables relative line numbering mode. With both number and
|
||||
" relativenumber enabled, the current line shows the true line number, while
|
||||
" all other lines (above and below) are numbered relative to the current line.
|
||||
" This is useful because you can tell, at a glance, what count is needed to
|
||||
" jump up or down to a particular line, by {count}k to go up or {count}j to go
|
||||
" down.
|
||||
set relativenumber
|
||||
|
||||
" Wrap text
|
||||
set wrap
|
||||
|
||||
" Encoding
|
||||
set encoding=utf-8
|
||||
|
||||
" Status bar
|
||||
set laststatus=2
|
||||
|
||||
" Vim is based on Vi. Setting `nocompatible` switches from the default
|
||||
" Vi-compatibility mode and enables useful Vim functionality. This
|
||||
" configuration option turns out not to be necessary for the file named
|
||||
" '~/.vimrc', because Vim automatically enters nocompatible mode if that file
|
||||
" is present. But we're including it here just in case this config file is
|
||||
" loaded some other way (e.g. saved as `foo`, and then Vim started with
|
||||
" `vim -u foo`).
|
||||
set nocompatible
|
||||
|
||||
" Turn on syntax highlighting.
|
||||
syntax on
|
||||
|
||||
" Highlight matching pairs of [] {} ()
|
||||
set showmatch
|
||||
|
||||
" Disable the default Vim startup message.
|
||||
set shortmess+=I
|
||||
|
||||
" The backspace key has slightly unintuitive behavior by default. For example,
|
||||
" by default, you can't backspace before the insertion point set with 'i'.
|
||||
" This configuration makes backspace behave more reasonably, in that you can
|
||||
" backspace over anything.
|
||||
set backspace=indent,eol,start
|
||||
|
||||
" By default, Vim doesn't let you hide a buffer (i.e. have a buffer that isn't
|
||||
" shown in any window) that has unsaved changes. This is to prevent you from "
|
||||
" forgetting about unsaved changes and then quitting e.g. via `:qa!`. We find
|
||||
" hidden buffers helpful enough to disable this protection. See `:help hidden`
|
||||
" for more information on this.
|
||||
set hidden
|
||||
|
||||
" This setting makes search case-insensitive when all characters in the string
|
||||
" being searched are lowercase. However, the search becomes case-sensitive if
|
||||
" it contains any capital letters. This makes searching more convenient.
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
" Enable searching as you type, rather than waiting till you press enter.
|
||||
set incsearch
|
||||
|
||||
" Highlight search pattern
|
||||
set hlsearch
|
||||
|
||||
" Unbind some useless/annoying default key bindings.
|
||||
nmap Q <Nop> " 'Q' in normal mode enters Ex mode. You almost never want this.
|
||||
|
||||
" Disable audible bell because it's annoying.
|
||||
set noerrorbells visualbell t_vb=
|
||||
|
||||
" Enable mouse support. You should avoid relying on this too much, but it can
|
||||
" sometimes be convenient.
|
||||
set mouse+=a
|
||||
|
||||
" Try to prevent bad habits like using the arrow keys for movement. This is
|
||||
" not the only possible bad habit. For example, holding down the h/j/k/l keys
|
||||
" for movement, rather than using more efficient movement commands, is also a
|
||||
" bad habit. The former is enforceable through a .vimrc, while we don't know
|
||||
" how to prevent the latter.
|
||||
" Do this in normal mode...
|
||||
nnoremap <Left> :echoe "Use h"<CR>
|
||||
nnoremap <Right> :echoe "Use l"<CR>
|
||||
nnoremap <Up> :echoe "Use k"<CR>
|
||||
nnoremap <Down> :echoe "Use j"<CR>
|
||||
" ...and in insert mode
|
||||
inoremap <Left> <ESC>:echoe "Use h"<CR>
|
||||
inoremap <Right> <ESC>:echoe "Use l"<CR>
|
||||
inoremap <Up> <ESC>:echoe "Use k"<CR>
|
||||
inoremap <Down> <ESC>:echoe "Use j"<CR>
|
||||
|
||||
" Center the cursor when doing 1/2 page down and page up
|
||||
nnoremap <C-d> <C-d>zz
|
||||
nnoremap <C-u> <C-u>zz
|
||||
|
||||
" Call the .vimrc.plug file
|
||||
if filereadable(expand("~/.vimrc.plug"))
|
||||
source ~/.vimrc.plug
|
||||
endif
|
||||
24
common/.vimrc.plug
Normal file
24
common/.vimrc.plug
Normal file
@@ -0,0 +1,24 @@
|
||||
call plug#begin('~/.vim/plugged')
|
||||
|
||||
"Fugitive Vim Github Wrapper
|
||||
Plug 'tpope/vim-fugitive'
|
||||
|
||||
" Surround Plugin
|
||||
Plug 'tpope/vim-surround'
|
||||
|
||||
" Sensible options
|
||||
Plug 'tpope/vim-sensible'
|
||||
|
||||
" Highlight Yank
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
|
||||
" Paragraph Motion
|
||||
Plug 'dbakker/vim-paragraph-motion'
|
||||
|
||||
" Quick Scope
|
||||
" Plug 'unblevable/quick-scope'
|
||||
|
||||
" Paragraph Motion
|
||||
Plug 'dbakker/vim-paragraph-motion'
|
||||
|
||||
call plug#end()
|
||||
120
common/.zshrc
Normal file
120
common/.zshrc
Normal file
@@ -0,0 +1,120 @@
|
||||
# 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
|
||||
|
||||
# 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="/home/pratik/.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="robbyrussell"
|
||||
POWERLEVEL9K_MODE='awesome-fontconfig'
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# 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 automatically update without prompting.
|
||||
# DISABLE_UPDATE_PROMPT="true"
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS="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"
|
||||
|
||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# see 'man strftime' for details.
|
||||
HIST_STAMPS="dd.mm.yyyy"
|
||||
|
||||
# Standard plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
plugins=(
|
||||
git
|
||||
history
|
||||
per-directory-history
|
||||
perms
|
||||
sudo
|
||||
systemd
|
||||
# zsh-syntax-highlighting
|
||||
# exercism
|
||||
)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
##############Pratik POWERLEVEL9K Configs####################################
|
||||
POWERLEVEL9K_INSTANT_PROMPT=off
|
||||
|
||||
POWERLEVEL9K_SHORTEN_DIR_LENGTH=4
|
||||
# POWERLEVEL9K_SHORTEN_STRATEGY="None"
|
||||
POWERLEVEL9K_TIME_FORMAT="%D{%H:%M:%S %a}"
|
||||
POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=0
|
||||
POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=6
|
||||
|
||||
POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
|
||||
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon user ssh dir_writable dir background_jobs docker_machine command_execution_time time newline history status root_indicator)
|
||||
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=()
|
||||
|
||||
##############Pratik POWERLEVEL9K Configs END################################
|
||||
|
||||
setopt +o nomatch
|
||||
|
||||
# Higher History
|
||||
export HISTSIZE=10000000
|
||||
export SAVEHIST=10000000
|
||||
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
|
||||
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
|
||||
setopt SHARE_HISTORY # Share history between all sessions.
|
||||
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
|
||||
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
|
||||
setopt HIST_IGNORE_SPACE # Don't add commands that start with whitespace to history
|
||||
|
||||
##############Bring all the alias and setup scripts################################
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
# Setup path and export variables
|
||||
[[ ! -f ~/.env ]] || source ~/.env
|
||||
[[ ! -f ~/.set_path ]] || source ~/.set_path
|
||||
[[ ! -f "$HOME/.cargo/env" ]] || source "$HOME/.cargo/env"
|
||||
PATH=$(pyenv root)/shims:$PATH
|
||||
|
||||
# Aliases
|
||||
[[ ! -f ~/.aliases ]] || source ~/.aliases
|
||||
[[ ! -f ~/.mac_aliases ]] || source ~/.mac_aliases
|
||||
[[ ! -f ~/.neon_aliases ]] || source ~/.neon_aliases
|
||||
[[ ! -f ~/.aliases_personal ]] || source ~/.aliases_personal
|
||||
|
||||
# nvm Setup
|
||||
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
[[ ! -f ~/.config/exercism/exercism_completion.bash ]] || source ~/.config/exercism/exercism_completion.bash
|
||||
|
||||
eval "$(ssh-agent -s)"
|
||||
ulimit -n 10240
|
||||
Reference in New Issue
Block a user