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:
|
If:
|
||||||
PathMatch: '.*\.(c|h)'
|
PathMatch: '.*\.(c|h)'
|
||||||
CompileFlags:
|
CompileFlags:
|
||||||
Add: [ -std=c20 ]
|
Add: [ -std=c99 ]
|
||||||
|
|
||||||
---
|
---
|
||||||
If:
|
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
|
-- Copy and paste from clipboard
|
||||||
map({ 'n', 'v' }, '<leader>y', '"+y')
|
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>')
|
||||||
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
|
-- Remap <M-BS> to remove last word
|
||||||
map('i', '<M-BS>', '<C-w>')
|
map('i', '<M-BS>', '<C-w>')
|
||||||
|
|
||||||
|
-- Move lines quickly
|
||||||
map('n', '<C-M-k>', ':m-2<CR>', { silent = true })
|
map('n', '<C-M-k>', ':m-2<CR>', { silent = true })
|
||||||
map('n', '<C-M-j>', ':m+1<CR>', { silent = true })
|
map('n', '<C-M-j>', ':m+1<CR>', { silent = true })
|
||||||
|
|
|
@ -10,6 +10,7 @@ local servers = {
|
||||||
pyright = {},
|
pyright = {},
|
||||||
rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
ts_ls = {},
|
ts_ls = {},
|
||||||
|
ruby_lsp = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.lsp.set_log_level("debug")
|
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>ef", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>" },
|
||||||
{ "<leader>cs", "<cmd>Trouble symbols toggle focus=false<cr>" },
|
{ "<leader>cs", "<cmd>Trouble symbols toggle focus=false<cr>" },
|
||||||
{ "<leader>cl", "<cmd>Trouble lsp toggle focus=false win.position=right<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_TELEPHONE="en_US.UTF-8"
|
||||||
LC_TIME="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
|
# default configs
|
||||||
ANDROID_HOME="${HOME}/.local/share/android"
|
ANDROID_HOME="${HOME}/.local/share/android"
|
||||||
|
BAT_THEME="TwoDark"
|
||||||
EDITOR="/usr/bin/nvim"
|
EDITOR="/usr/bin/nvim"
|
||||||
GNUPGHOME='~/.local/share/gnupg'
|
GNUPGHOME='~/.local/share/gnupg'
|
||||||
GOPATH="${HOME}/.local/share/go"
|
GOPATH="${HOME}/.local/share/go"
|
||||||
GPG_TTY="$(tty)"
|
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'"
|
MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
||||||
MANROFFOPT="-c"
|
MANROFFOPT="-c"
|
||||||
MTR_OPTIONS="-t"
|
MTR_OPTIONS="-t"
|
||||||
SSH_ASKPASS="${HOME}/.local/bin/scripts/pinentry-askpass"
|
SSH_ASKPASS="${HOME}/.local/bin/scripts/pinentry-askpass"
|
||||||
SUDO_ASKPASS="${HOME}/.local/bin/scripts/dmenu-askpass"
|
SUDO_ASKPASS="${HOME}/.local/bin/scripts/dmenu-askpass"
|
||||||
|
GRADLE_USER_HOME="${HOME}/.local/share/gradle"
|
||||||
|
|
||||||
set +a
|
set +a
|
||||||
|
|
|
@ -54,7 +54,7 @@ alias ls="lsd --color=auto"
|
||||||
alias l="ls -lh"
|
alias l="ls -lh"
|
||||||
alias la="ls -lah"
|
alias la="ls -lah"
|
||||||
alias ll="ls -lh"
|
alias ll="ls -lh"
|
||||||
alias lt="ls -lt"
|
alias lt="ls --color=always --icon=always -lt"
|
||||||
|
|
||||||
# set bat as help pager
|
# set bat as help pager
|
||||||
alias -g -- --help='--help 2>&1 | bat --language=help --style=plain'
|
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 cal="ncal -b"
|
||||||
alias .e="source .env"
|
alias .e="source .env"
|
||||||
alias vimu="vim -u /dev/null"
|
alias vimu="vim -u /dev/null"
|
||||||
|
alias reswap="sudo swapoff /swapfile && sudo swapon /swapfile"
|
||||||
|
|
||||||
# function aliases
|
# function aliases
|
||||||
bl() { brightnessctl set "$1"% > /dev/null; }
|
bl() { brightnessctl set "$1"% > /dev/null; }
|
||||||
nosw() { alacritty --class 'noswallow' -e "$@"; }; compdef _command nosw
|
nosw() { alacritty --class 'noswallow' -e "$@"; }; compdef _command nosw
|
||||||
t() { taskell "${1:-${HOME}/.taskell.md}"; }
|
t() { taskell "${1:-${HOME}/.taskell.md}"; }
|
||||||
vims() { filepath="$(type "$1" | rev | cut -d ' ' -f 1 | rev)"; [ $? -eq 0 ] && vim "${filepath}"; }; compdef _command vims
|
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
|
||||||
compdef -a '_git; _git-commit' gdc # todo
|
compdef -a '_git; _git-commit' gdc # todo
|
||||||
|
@ -104,25 +106,37 @@ compdef '_files -g "*.md"' md
|
||||||
|
|
||||||
# git aliases
|
# git aliases
|
||||||
gl() { git log --decorate "$@" | bat }; compdef '_git; _git-log' gl
|
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 ga="git add"
|
||||||
alias gb="git branch"
|
alias gb="git branch"
|
||||||
alias gc="git commit"
|
alias gc="git commit"
|
||||||
alias gca="git commit --amend --no-edit"
|
alias gca="git commit --amend --no-edit"
|
||||||
alias gck="git checkout"
|
alias gck="git checkout"
|
||||||
alias gcl="git clone"
|
alias gcl="git clone"
|
||||||
|
alias gcn="git clean"
|
||||||
|
alias gcp="git cherry-pick"
|
||||||
alias gd="git diff"
|
alias gd="git diff"
|
||||||
alias gds="gd --staged"
|
alias gds="gd --staged"
|
||||||
alias gf="git fetch"
|
alias gf="git fetch"
|
||||||
alias gi="git init"
|
alias gi="git init"
|
||||||
|
alias gla="gl --all"
|
||||||
alias gm="git merge"
|
alias gm="git merge"
|
||||||
alias gp="git push"
|
alias gp="git push"
|
||||||
|
alias gpo="git push origin"
|
||||||
alias gpu="git pull"
|
alias gpu="git pull"
|
||||||
alias gr="git restore"
|
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 grs="git restore --staged"
|
||||||
alias grt="git reset"
|
alias grt="git reset"
|
||||||
alias gs="git status"
|
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
|
# docker aliases
|
||||||
alias dc="docker compose"
|
alias dc="docker compose"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[core]
|
[core]
|
||||||
pager = LESS="-Rz3" delta
|
pager = delta
|
||||||
[user]
|
[user]
|
||||||
email = me@wzray.com
|
email = me@wzray.com
|
||||||
name = Arthur K.
|
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