lk jasdfksdaklasdfkljklj sadfk jkl
This commit is contained in:
parent
0c9b0016c6
commit
da50f04f9d
11 changed files with 137 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
If:
|
||||
PathMatch: '.*\.(c|h)'
|
||||
CompileFlags:
|
||||
Add: [ -std=c20 ]
|
||||
Add: [ -std=c99 ]
|
||||
|
||||
---
|
||||
If:
|
||||
|
|
72
.config/ideavim/ideavimrc
Normal file
72
.config/ideavim/ideavimrc
Normal file
|
@ -0,0 +1,72 @@
|
|||
" --- Links to remember
|
||||
" Plugins: https://jb.gg/ideavim-plugins
|
||||
" IDE actions: https://jb.gg/abva4t
|
||||
map <Space> <Nop>
|
||||
let mapleader = " "
|
||||
set showmode
|
||||
set showcmd
|
||||
set scrolloff=0
|
||||
|
||||
" Line numbers
|
||||
set number
|
||||
set relativenumber
|
||||
|
||||
" Navigation between lines
|
||||
noremap j gj
|
||||
noremap k gk
|
||||
|
||||
" Search
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set incsearch
|
||||
set hlsearch
|
||||
|
||||
" Quickly play macros
|
||||
nnoremap Q @q
|
||||
|
||||
" Switch buffers
|
||||
nnoremap <A-u> :bp<CR>
|
||||
nnoremap <A-i> :bn<CR>
|
||||
|
||||
" Switch panes
|
||||
nnoremap <A-h> <C-w>h
|
||||
nnoremap <A-j> <C-w>j
|
||||
nnoremap <A-k> <C-w>k
|
||||
nnoremap <A-l> <C-w>l
|
||||
|
||||
" yank/paste with system clipboard
|
||||
nnoremap <leader>y \"+y
|
||||
nnoremap <leader>Y \"+Y
|
||||
vnoremap <leader>y \"+y
|
||||
vnoremap <leader>Y \"+Y
|
||||
nnoremap <leader>p \"+p
|
||||
nnoremap <leader>P \"+P
|
||||
vnoremap <leader>p \"+p
|
||||
vnoremap <leader>P \"+P
|
||||
|
||||
" General mappings
|
||||
map <C-l> :nohls<CR>
|
||||
map <C-q> :q<CR>
|
||||
map <C-m> :NERDTreeToggle<CR>
|
||||
nmap <C-M-k> :m-2<CR>
|
||||
nmap <C-M-j> :m+1<CR>
|
||||
|
||||
let g:NERDTreeMapQuit="<C-m>"
|
||||
|
||||
" IDE actions
|
||||
nmap <leader>F <Action>(ReformatCode)
|
||||
nmap <leader>i <Action>(ShowHoverInfo)
|
||||
nmap <leader>of <Action>(RecentFiles)
|
||||
nmap <leader>? <Action>(FindInPath)
|
||||
nmap <leader>sf <Action>(GotoFile)
|
||||
nmap <leader>af <Action>(GotoFile)
|
||||
nmap <leader>rn <Action>(RenameElement)
|
||||
nmap <leader>ru <Action>(Run)
|
||||
|
||||
|
||||
" Plugins
|
||||
Plug 'machakann/vim-highlightedyank'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'preservim/nerdtree'
|
||||
set peekaboo
|
|
@ -23,6 +23,7 @@ map({ 'n', 'v' }, 'j', 'v:count == 0 ? "gj" : "j"', { expr = true, silent = true
|
|||
|
||||
-- Copy and paste from clipboard
|
||||
map({ 'n', 'v' }, '<leader>y', '"+y')
|
||||
map({ 'n', 'v' }, '<leader>Y', '"+Y')
|
||||
map({ 'n', 'v' }, '<leader>p', '"+p<ESC>')
|
||||
map({ 'n', 'v' }, '<leader>P', '"+P<ESC>')
|
||||
|
||||
|
@ -45,5 +46,6 @@ map('n', '<M-p>', ':cp<CR>', { silent = true })
|
|||
-- Remap <M-BS> to remove last word
|
||||
map('i', '<M-BS>', '<C-w>')
|
||||
|
||||
-- Move lines quickly
|
||||
map('n', '<C-M-k>', ':m-2<CR>', { silent = true })
|
||||
map('n', '<C-M-j>', ':m+1<CR>', { silent = true })
|
||||
|
|
|
@ -10,6 +10,7 @@ local servers = {
|
|||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
ts_ls = {},
|
||||
ruby_lsp = {},
|
||||
}
|
||||
|
||||
vim.lsp.set_log_level("debug")
|
||||
|
|
3
.config/nvim/lua/lsp/jdtls.lua
Normal file
3
.config/nvim/lua/lsp/jdtls.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
return {
|
||||
root_dir = vim.fs.dirname(vim.fs.find({'gradlew', '.git', 'mvnw'}, { upward = true })[1]),
|
||||
}
|
|
@ -7,5 +7,6 @@ return {
|
|||
{ "<leader>ef", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>" },
|
||||
{ "<leader>cs", "<cmd>Trouble symbols toggle focus=false<cr>" },
|
||||
{ "<leader>cl", "<cmd>Trouble lsp toggle focus=false win.position=right<cr>" },
|
||||
{ "<leader>el", "<cmd>Trouble qflist toggle<cr>" },
|
||||
},
|
||||
}
|
||||
|
|
|
@ -20,16 +20,26 @@ LC_PAPER="en_US.UTF-8"
|
|||
LC_TELEPHONE="en_US.UTF-8"
|
||||
LC_TIME="en_US.UTF-8"
|
||||
|
||||
# xdg dirs
|
||||
XDG_DATA_HOME="${HOME}/.local/share"
|
||||
XDG_CONFIG_HOME="${HOME}/.config"
|
||||
XDG_STATE_HOME="${HOME}/.local/state"
|
||||
XDG_CACHE_HOME="${HOME}/.cache"
|
||||
|
||||
# default configs
|
||||
ANDROID_HOME="${HOME}/.local/share/android"
|
||||
BAT_THEME="TwoDark"
|
||||
EDITOR="/usr/bin/nvim"
|
||||
GNUPGHOME='~/.local/share/gnupg'
|
||||
GOPATH="${HOME}/.local/share/go"
|
||||
GPG_TTY="$(tty)"
|
||||
JAVA_HOME="/usr/lib/jvm/java-23-openjdk"
|
||||
LESS="--wheel-lines 3 --mouse"
|
||||
MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||
MANROFFOPT="-c"
|
||||
MTR_OPTIONS="-t"
|
||||
SSH_ASKPASS="${HOME}/.local/bin/scripts/pinentry-askpass"
|
||||
SUDO_ASKPASS="${HOME}/.local/bin/scripts/dmenu-askpass"
|
||||
GRADLE_USER_HOME="${HOME}/.local/share/gradle"
|
||||
|
||||
set +a
|
||||
|
|
|
@ -54,7 +54,7 @@ alias ls="lsd --color=auto"
|
|||
alias l="ls -lh"
|
||||
alias la="ls -lah"
|
||||
alias ll="ls -lh"
|
||||
alias lt="ls -lt"
|
||||
alias lt="ls --color=always --icon=always -lt"
|
||||
|
||||
# set bat as help pager
|
||||
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
|
||||
|
@ -91,12 +91,14 @@ alias wt="watch --color -d -cn 0.1 "
|
|||
alias cal="ncal -b"
|
||||
alias .e="source .env"
|
||||
alias vimu="vim -u /dev/null"
|
||||
alias reswap="sudo swapoff /swapfile && sudo swapon /swapfile"
|
||||
|
||||
# function aliases
|
||||
bl() { brightnessctl set "$1"% > /dev/null; }
|
||||
nosw() { alacritty --class 'noswallow' -e "$@"; }; compdef _command nosw
|
||||
t() { taskell "${1:-${HOME}/.taskell.md}"; }
|
||||
vims() { filepath="$(type "$1" | rev | cut -d ' ' -f 1 | rev)"; [ $? -eq 0 ] && vim "${filepath}"; }; compdef _command vims
|
||||
tl() { tree -C "$@" | bat }; compdef _tree tl
|
||||
|
||||
# compdef
|
||||
compdef -a '_git; _git-commit' gdc # todo
|
||||
|
@ -104,25 +106,37 @@ compdef '_files -g "*.md"' md
|
|||
|
||||
# git aliases
|
||||
gl() { git log --decorate "$@" | bat }; compdef '_git; _git-log' gl
|
||||
gus() { git branch --set-upstream-to="${1:?}/${2:?}" "${2:?}"}; compdef '_git; _git-push' gus
|
||||
alias ga="git add"
|
||||
alias gb="git branch"
|
||||
alias gc="git commit"
|
||||
alias gca="git commit --amend --no-edit"
|
||||
alias gck="git checkout"
|
||||
alias gcl="git clone"
|
||||
alias gcn="git clean"
|
||||
alias gcp="git cherry-pick"
|
||||
alias gd="git diff"
|
||||
alias gds="gd --staged"
|
||||
alias gf="git fetch"
|
||||
alias gi="git init"
|
||||
alias gla="gl --all"
|
||||
alias gm="git merge"
|
||||
alias gp="git push"
|
||||
alias gpo="git push origin"
|
||||
alias gpu="git pull"
|
||||
alias gr="git restore"
|
||||
alias grb="git rebase"
|
||||
alias grj="git rebase"
|
||||
alias grjc="git rebase --continue"
|
||||
alias grjs="git rebase --cancel"
|
||||
alias grm="git remote"
|
||||
alias grs="git restore --staged"
|
||||
alias grt="git reset"
|
||||
alias gs="git status"
|
||||
alias gswc="git switch -c"
|
||||
alias gsc="git switch -c"
|
||||
alias gsh="git show"
|
||||
alias gsp="git stash pop"
|
||||
alias gsj="git stash"
|
||||
alias gt="git tag"
|
||||
|
||||
# docker aliases
|
||||
alias dc="docker compose"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[core]
|
||||
pager = LESS="-Rz3" delta
|
||||
pager = delta
|
||||
[user]
|
||||
email = me@wzray.com
|
||||
name = Arthur K.
|
||||
|
|
16
.local/bin/scripts/adbp
Executable file
16
.local/bin/scripts/adbp
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
base_prefix="$(ip route | grep -o '10.16[[:digit:]]' | head -1)"
|
||||
|
||||
if [ -n "$1" ]; then
|
||||
phone_ip="$1"
|
||||
elif [ -n "$base_prefix" ]; then
|
||||
phone_ip="$base_prefix.8.3"
|
||||
else
|
||||
echo "Phone IP unknown!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ssh -p 8022 u0_a343@"$phone_ip" 'su -c setprop service.adb.tcp.port 5555 && su -c stop adbd && su -c start adbd'
|
||||
sleep 0.1
|
||||
adb connect "$phone_ip"
|
13
.local/bin/scripts/gor
Executable file
13
.local/bin/scripts/gor
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
url="$(git remote get-url "${1:-origin}")"
|
||||
|
||||
if [[ "$url" =~ ^https?:\/\/ ]]; then
|
||||
echo "$url"
|
||||
elif [[ "$url" =~ ^[a-zA-Z0-9_-]+@([a-zA-Z0-9_.-]+):(.*) ]]; then
|
||||
url="https://${BASH_REMATCH[1]}/${BASH_REMATCH[2]}"
|
||||
url="${url%.git}"
|
||||
xdg-open "$url"
|
||||
else
|
||||
echo "TODO: $url"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue