Compare commits
11 Commits
b2bc182e02
...
bc0a99c883
| Author | SHA1 | Date | |
|---|---|---|---|
| bc0a99c883 | |||
| 6577f26cd1 | |||
| 2787b90948 | |||
| fcf7d99318 | |||
| 1a758dd8d8 | |||
| 0adb685741 | |||
| a918636dd4 | |||
| c5c697eefd | |||
| a049d72379 | |||
| 44a1c5e6e3 | |||
| 55ab0d203b |
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -10,9 +10,6 @@
|
|||||||
[submodule "pkgbuilds/portfolio-performance-bin"]
|
[submodule "pkgbuilds/portfolio-performance-bin"]
|
||||||
path = pkgbuilds/portfolio-performance-bin
|
path = pkgbuilds/portfolio-performance-bin
|
||||||
url = https://aur.archlinux.org/portfolio-performance-bin.git
|
url = https://aur.archlinux.org/portfolio-performance-bin.git
|
||||||
[submodule "pkgbuilds/vim-plug"]
|
|
||||||
path = pkgbuilds/vim-plug
|
|
||||||
url = https://aur.archlinux.org/vim-plug.git
|
|
||||||
[submodule "pkgbuilds/terraform-ls-bin"]
|
[submodule "pkgbuilds/terraform-ls-bin"]
|
||||||
path = pkgbuilds/terraform-ls-bin
|
path = pkgbuilds/terraform-ls-bin
|
||||||
url = https://aur.archlinux.org/terraform-ls-bin.git
|
url = https://aur.archlinux.org/terraform-ls-bin.git
|
||||||
|
|||||||
@@ -12,20 +12,10 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
manage_css: true
|
manage_css: true
|
||||||
media:
|
|
||||||
extensions:
|
|
||||||
- ublock-origin
|
|
||||||
- passff
|
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
|
||||||
- i-dont-care-about-cookies
|
|
||||||
manage_css: true
|
|
||||||
bigger_font: true
|
|
||||||
mail: hannes@hkoerber.de
|
mail: hannes@hkoerber.de
|
||||||
ssh_agent: false
|
ssh_agent: false
|
||||||
gpg_agent: true
|
gpg_agent: true
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
@@ -21,7 +20,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
manage_css: true
|
manage_css: true
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
|
# Prevent failures when not battery present
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
for battery in /sys/class/power_supply/*/capacity ; do
|
for battery in /sys/class/power_supply/*/capacity ; do
|
||||||
capacity="$(< "$battery")"
|
capacity="$(< "$battery")"
|
||||||
if (( "${capacity}" < 40 )) ; then
|
if (( "${capacity}" < 40 )) ; then
|
||||||
@@ -30,7 +33,7 @@
|
|||||||
# Make sure that keys are up to date, otherwise sig checks may fail
|
# Make sure that keys are up to date, otherwise sig checks may fail
|
||||||
pacman --sync --noprogressbar --noconfirm --refresh --needed archlinux-keyring
|
pacman --sync --noprogressbar --noconfirm --refresh --needed archlinux-keyring
|
||||||
|
|
||||||
pacman --sync --noprogressbar --noconfirm --sysupgrade
|
pacman --noprogressbar --noconfirm --sysupgrade
|
||||||
|
|
||||||
- name: Install pacman autoupdate service
|
- name: Install pacman autoupdate service
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
@@ -186,7 +189,7 @@
|
|||||||
|
|
||||||
restic \
|
restic \
|
||||||
--cache-dir=/var/cache/restic/ \
|
--cache-dir=/var/cache/restic/ \
|
||||||
--repo="b2:${BUCKET_NAME}:backup" \
|
--repo="b2:${BUCKET_NAME}:hera" \
|
||||||
--password-file=/etc/restic/repopassword \
|
--password-file=/etc/restic/repopassword \
|
||||||
--verbose \
|
--verbose \
|
||||||
"${@}"
|
"${@}"
|
||||||
@@ -219,7 +222,7 @@
|
|||||||
|
|
||||||
run forget restic-cmd \
|
run forget restic-cmd \
|
||||||
forget \
|
forget \
|
||||||
--prune
|
--prune \
|
||||||
--keep-daily 30 \
|
--keep-daily 30 \
|
||||||
--keep-monthly 12 \
|
--keep-monthly 12 \
|
||||||
--keep-yearly 3
|
--keep-yearly 3
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
@@ -36,7 +35,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
manage_css: true
|
manage_css: true
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ users:
|
|||||||
default:
|
default:
|
||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
manage_css: true
|
manage_css: true
|
||||||
@@ -34,7 +33,6 @@ users:
|
|||||||
extensions:
|
extensions:
|
||||||
- ublock-origin
|
- ublock-origin
|
||||||
- passff
|
- passff
|
||||||
- privacy-badger17
|
|
||||||
- tree-style-tab
|
- tree-style-tab
|
||||||
- i-dont-care-about-cookies
|
- i-dont-care-about-cookies
|
||||||
- floccus
|
- floccus
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
empty_directories:
|
empty_directories:
|
||||||
- name: .config/nvim
|
|
||||||
- name: .config/rofi
|
- name: .config/rofi
|
||||||
- name: .config/gtk-3.0
|
- name: .config/gtk-3.0
|
||||||
- name: .config/gtk-3.0-overrides
|
- name: .config/gtk-3.0-overrides
|
||||||
@@ -47,8 +46,6 @@ dotfiles:
|
|||||||
dir: true
|
dir: true
|
||||||
- from: tmux/tmux.conf
|
- from: tmux/tmux.conf
|
||||||
to: .config/tmux/tmux.conf
|
to: .config/tmux/tmux.conf
|
||||||
- from: vim/vimrc
|
|
||||||
to: .config/nvim/init.vim
|
|
||||||
- from: x/Xresources
|
- from: x/Xresources
|
||||||
to: .config/Xresources
|
to: .config/Xresources
|
||||||
- from: x/xinitrc
|
- from: x/xinitrc
|
||||||
@@ -105,6 +102,7 @@ dotfiles:
|
|||||||
dotfiles_remove:
|
dotfiles_remove:
|
||||||
- .gitconfig
|
- .gitconfig
|
||||||
- .vimrc
|
- .vimrc
|
||||||
|
- .config/nvim/init.vim
|
||||||
- .tmux.conf
|
- .tmux.conf
|
||||||
- .i3
|
- .i3
|
||||||
- .gtkrc-2.0
|
- .gtkrc-2.0
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
sudo bash -c "pacman -Sy --needed archlinux-keyring && pacman -Syu"
|
sudo bash -c "pacman -Sy --needed archlinux-keyring && pacman -Su"
|
||||||
|
|
||||||
./update-aur-pkgs.sh
|
./update-aur-pkgs.sh
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ font-libertine:
|
|||||||
- libertinus-font
|
- libertinus-font
|
||||||
font-awesome:
|
font-awesome:
|
||||||
archlinux:
|
archlinux:
|
||||||
- ttf-font-awesome
|
- woff2-font-awesome
|
||||||
font-noto:
|
font-noto:
|
||||||
archlinux:
|
archlinux:
|
||||||
- noto-fonts
|
- noto-fonts
|
||||||
|
|||||||
Submodule pkgbuilds/claude-code updated: 71aff8b2a6...46d57c06e8
Submodule pkgbuilds/portfolio-performance-bin updated: cd85b87ff4...9ce84212ab
Submodule pkgbuilds/vim-plug deleted from 6f641d45c8
@@ -248,7 +248,6 @@
|
|||||||
curl -sSf --proto '=https' https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg | gpg --import -
|
curl -sSf --proto '=https' https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg | gpg --import -
|
||||||
|
|
||||||
- name: nodejs-intelephense
|
- name: nodejs-intelephense
|
||||||
- name: vim-plug
|
|
||||||
- name: terraform-ls-bin
|
- name: terraform-ls-bin
|
||||||
- name: grm-git
|
- name: grm-git
|
||||||
- name: screencfg-git
|
- name: screencfg-git
|
||||||
|
|||||||
@@ -62,12 +62,29 @@ readarray -d $'\0' -t packages_to_remove < <(comm --zero-terminated -13 \
|
|||||||
printf '%s\0' "${package}"
|
printf '%s\0' "${package}"
|
||||||
done)
|
done)
|
||||||
|
|
||||||
|
packages_removed=0
|
||||||
|
|
||||||
if (( "${#packages_to_remove[@]}" > 0 )) ; then
|
if (( "${#packages_to_remove[@]}" > 0 )) ; then
|
||||||
echo "found the following explicitly installed packages that are not configured:"
|
echo "found the following explicitly installed packages that are not configured:"
|
||||||
for pkg in "${packages_to_remove[@]}" ; do
|
for pkg in "${packages_to_remove[@]}" ; do
|
||||||
echo "${pkg}"
|
echo "${pkg}"
|
||||||
done
|
done
|
||||||
sudo pacman -Rcns "${packages_to_remove[@]}" "${@}" || exit $?
|
sudo pacman -Rcns "${packages_to_remove[@]}" "${@}" || exit $?
|
||||||
|
packages_removed=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
readarray -t orphans < <(pacman -Qdtq)
|
||||||
|
|
||||||
|
if (( "${#orphans[@]}" > 0 )) ; then
|
||||||
|
echo "found the following orphaned packages:"
|
||||||
|
for pkg in "${orphans[@]}" ; do
|
||||||
|
echo "${pkg}"
|
||||||
|
done
|
||||||
|
sudo pacman -Rcns "${orphans[@]}" "${@}" || exit $?
|
||||||
|
packages_removed=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( packages_removed)) ; then
|
||||||
exit 123
|
exit 123
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
14
user.yml
14
user.yml
@@ -270,20 +270,6 @@
|
|||||||
owner: "{{ user.name }}"
|
owner: "{{ user.name }}"
|
||||||
group: "{{ user.name }}"
|
group: "{{ user.name }}"
|
||||||
|
|
||||||
- name: Vim
|
|
||||||
tags:
|
|
||||||
- user:vim
|
|
||||||
block:
|
|
||||||
- name: Install vim plugins
|
|
||||||
ansible.builtin.command: nvim --headless +PlugInstall +qall
|
|
||||||
register: vim_plugin_install
|
|
||||||
changed_when: vim_plugin_install.stderr != ""
|
|
||||||
|
|
||||||
- name: Update vim plugins
|
|
||||||
ansible.builtin.command: nvim --headless +PlugUpdate +qall
|
|
||||||
register: vim_plugin_update
|
|
||||||
changed_when: vim_plugin_update.stderr != ""
|
|
||||||
|
|
||||||
- name: Firefox
|
- name: Firefox
|
||||||
tags:
|
tags:
|
||||||
- user:firefox
|
- user:firefox
|
||||||
|
|||||||
318
vim/vimrc
318
vim/vimrc
@@ -1,318 +0,0 @@
|
|||||||
set nocompatible
|
|
||||||
filetype off
|
|
||||||
call plug#begin('~/.local/share/nvim/plugged')
|
|
||||||
|
|
||||||
" === plugins ===
|
|
||||||
|
|
||||||
function! Cond(Cond, ...)
|
|
||||||
let opts = get(a:000, 0, {})
|
|
||||||
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] })
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" editing plugins
|
|
||||||
Plug 'godlygeek/tabular', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'nathanaelkane/vim-indent-guides', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'tpope/vim-commentary', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'airblade/vim-gitgutter', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
" ui
|
|
||||||
Plug 'sickill/vim-monokai', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'itchyny/lightline.vim', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
" lang integrations
|
|
||||||
Plug 'lepture/vim-jinja', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'fatih/vim-go', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'hashivim/vim-terraform', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'editorconfig/editorconfig-vim', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'rust-lang/rust.vim', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'rodjek/vim-puppet', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
" helpers
|
|
||||||
"" distraction free writing
|
|
||||||
Plug 'junegunn/limelight.vim', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'junegunn/goyo.vim', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'reedes/vim-pencil', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
"" markdown
|
|
||||||
Plug 'suan/vim-instant-markdown', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
Plug 'dense-analysis/ale', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
Plug 'neoclide/coc.nvim', Cond(!exists('g:vscode'), {'branch': 'release'})
|
|
||||||
|
|
||||||
|
|
||||||
call plug#end()
|
|
||||||
filetype plugin indent on
|
|
||||||
|
|
||||||
" == formatting ==
|
|
||||||
set tabstop=4
|
|
||||||
set smarttab
|
|
||||||
set softtabstop=4
|
|
||||||
set shiftround
|
|
||||||
set shiftwidth=4
|
|
||||||
set autoindent
|
|
||||||
set expandtab
|
|
||||||
set smartindent
|
|
||||||
set formatoptions=tcqjron
|
|
||||||
"set formatoptions=
|
|
||||||
|
|
||||||
" == ui ==
|
|
||||||
set cursorline
|
|
||||||
set showcmd
|
|
||||||
set number
|
|
||||||
set wildmode=list:longest
|
|
||||||
set lazyredraw
|
|
||||||
set wildmenu
|
|
||||||
set noshowmatch
|
|
||||||
set colorcolumn=80
|
|
||||||
set laststatus=2
|
|
||||||
set matchtime=5
|
|
||||||
set mouse=a
|
|
||||||
set mousehide
|
|
||||||
set noerrorbells
|
|
||||||
set noshowmode
|
|
||||||
set numberwidth=2
|
|
||||||
set relativenumber
|
|
||||||
set shortmess=rtiF
|
|
||||||
set ruler
|
|
||||||
set scrolloff=7
|
|
||||||
set title
|
|
||||||
set titlestring=""
|
|
||||||
set ttyfast
|
|
||||||
|
|
||||||
" == searching ==
|
|
||||||
set hlsearch
|
|
||||||
set incsearch
|
|
||||||
set gdefault
|
|
||||||
set ignorecase
|
|
||||||
set magic
|
|
||||||
set smartcase
|
|
||||||
|
|
||||||
" == folding ==
|
|
||||||
set foldenable
|
|
||||||
set foldmethod=indent
|
|
||||||
set foldnestmax=2
|
|
||||||
set foldlevelstart=2
|
|
||||||
|
|
||||||
" == backups ==
|
|
||||||
set nobackup
|
|
||||||
set backupcopy=no
|
|
||||||
set nowritebackup
|
|
||||||
|
|
||||||
" == swap ==
|
|
||||||
set swapfile
|
|
||||||
set updatecount=200
|
|
||||||
set updatetime=300
|
|
||||||
|
|
||||||
" == undo ==
|
|
||||||
set undolevels=1000
|
|
||||||
set undoreload=10000
|
|
||||||
set undodir=~/.vim/undo
|
|
||||||
set undofile
|
|
||||||
|
|
||||||
" == environment / directories ==
|
|
||||||
set autochdir
|
|
||||||
set directory=/var/tmp,/tmp
|
|
||||||
set viewdir=~/.vim/view
|
|
||||||
|
|
||||||
" == misc ==
|
|
||||||
set autoread
|
|
||||||
set confirm
|
|
||||||
set encoding=utf-8
|
|
||||||
set history=1000
|
|
||||||
set modeline
|
|
||||||
set modelines=5
|
|
||||||
set notildeop
|
|
||||||
set wildignore=*.swp,*.bak,*.pyc,*~,*.o
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
" == editing ==
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
" set esckeys
|
|
||||||
set matchpairs=(:),{:},[:],<:>
|
|
||||||
set notimeout
|
|
||||||
set ttimeout
|
|
||||||
set timeoutlen=1000
|
|
||||||
set ttimeoutlen=0
|
|
||||||
set virtualedit=block
|
|
||||||
set whichwrap=b,s
|
|
||||||
|
|
||||||
" == line breaking ==
|
|
||||||
set linebreak
|
|
||||||
set wrap
|
|
||||||
set wrapscan
|
|
||||||
|
|
||||||
" == to use guicolors in terminal ==
|
|
||||||
set termguicolors
|
|
||||||
|
|
||||||
" === keybinds ===
|
|
||||||
set signcolumn=yes
|
|
||||||
|
|
||||||
let maplocalleader = "ö"
|
|
||||||
let mapleader = "\<Space>"
|
|
||||||
" map <leader>w: w!<cr>
|
|
||||||
|
|
||||||
" nnoremap <leader>w :w<CR>
|
|
||||||
nmap <leader><leader> za
|
|
||||||
map , :
|
|
||||||
|
|
||||||
vnoremap <silent> y y`]
|
|
||||||
vnoremap <silent> p p`]
|
|
||||||
nnoremap <silent> p p`]
|
|
||||||
|
|
||||||
nnoremap <leader>, :nohlsearch<CR>
|
|
||||||
|
|
||||||
noremap gV `[v`]
|
|
||||||
|
|
||||||
map Y y$
|
|
||||||
map j gj
|
|
||||||
map k gk
|
|
||||||
|
|
||||||
|
|
||||||
map N Nzz
|
|
||||||
map n nzz
|
|
||||||
|
|
||||||
inoremap jj <ESC>
|
|
||||||
|
|
||||||
" no more ex mode
|
|
||||||
nnoremap Q <nop>
|
|
||||||
|
|
||||||
" Use // in visual mode to search for selection
|
|
||||||
" https://vim.fandom.com/wiki/Search_for_visually_selected_text
|
|
||||||
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
|
||||||
|
|
||||||
if exists('g:vscode')
|
|
||||||
xmap gc <Plug>VSCodeCommentary
|
|
||||||
nmap gc <Plug>VSCodeCommentary
|
|
||||||
omap gc <Plug>VSCodeCommentary
|
|
||||||
nmap gcc <Plug>VSCodeCommentaryLine
|
|
||||||
else
|
|
||||||
nnoremap <C-h> <C-w>h
|
|
||||||
nnoremap <C-j> <C-w>j
|
|
||||||
nnoremap <C-k> <C-w>k
|
|
||||||
nnoremap <C-l> <C-w>l
|
|
||||||
|
|
||||||
nmap <C-n> :bnext<CR>
|
|
||||||
nmap <C-p> :bprev<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>m :InstantMarkdownPreview<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>u :GundoToggle<CR>
|
|
||||||
nnoremap <leader>d :diffupdate<CR>
|
|
||||||
|
|
||||||
nmap <F9> :Goyo<CR>:TogglePencil<CR>
|
|
||||||
nmap <leader>w :Goyo<CR>:TogglePencil<CR>:set colorcolumn=<CR>
|
|
||||||
|
|
||||||
nmap <leader>c :%w !xclip -selection clipboard<CR>
|
|
||||||
nmap <leader>x :r !xclip -out -selection -clipboard<CR><CR>
|
|
||||||
|
|
||||||
nmap <leader>f :Autoformat<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>v <C-w>v<C-w>l
|
|
||||||
|
|
||||||
syntax enable
|
|
||||||
silent! colorscheme monokai
|
|
||||||
|
|
||||||
highlight Comment guifg=#64d86b
|
|
||||||
highlight SpecialComment guifg=#64d86b
|
|
||||||
highlight Todo guibg=#a9ebad
|
|
||||||
|
|
||||||
let g:lightline = {
|
|
||||||
\ 'colorscheme': 'wombat',
|
|
||||||
\ 'active': {
|
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
|
||||||
\ [ 'readonly', 'filename', 'modified', 'helloworld' ] ],
|
|
||||||
\ 'right': [ [ 'gitbranch' ],
|
|
||||||
\ [ 'lineinfo' ],
|
|
||||||
\ [ 'percent' ],
|
|
||||||
\ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ],
|
|
||||||
\ [ 'directory' ] ],
|
|
||||||
\ },
|
|
||||||
\ 'component_function': {
|
|
||||||
\ 'gitbranch': 'fugitive#head',
|
|
||||||
\ 'directory': 'LightLineFilename',
|
|
||||||
\ },
|
|
||||||
\ 'component': {
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
|
|
||||||
|
|
||||||
function! LightLineFilename()
|
|
||||||
return fnamemodify(expand('%F'), ":~:h")
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" == pencil ==
|
|
||||||
let g:pencil#textwidth = 80
|
|
||||||
let g:pencil#autoformat = 1
|
|
||||||
let g:pencil#wrapModeDefault = 'hard'
|
|
||||||
let g:pencil#map#suspend_af = 'K'
|
|
||||||
|
|
||||||
" == goyo ==
|
|
||||||
let g:goyo_width = 100
|
|
||||||
let g:goyo_height = "90%"
|
|
||||||
let g:goyo_linenr = 0
|
|
||||||
|
|
||||||
autocmd! User GoyoEnter Limelight
|
|
||||||
autocmd! User GoyoLeave Limelight!
|
|
||||||
|
|
||||||
" == limelight ==
|
|
||||||
let g:limelight_default_coefficient = 0.5
|
|
||||||
|
|
||||||
let g:ale_linters = {'rust': ['rust-analyzer']}
|
|
||||||
|
|
||||||
" === functions ===
|
|
||||||
function! DeleteTrailingWS()
|
|
||||||
exe "normal mz"
|
|
||||||
%s/\s\+$//e
|
|
||||||
exe "normal `z"
|
|
||||||
endfunction
|
|
||||||
autocmd BufWritePre * :call DeleteTrailingWS()
|
|
||||||
|
|
||||||
autocmd FileType yaml set shiftwidth=2
|
|
||||||
autocmd FileType toml set shiftwidth=2
|
|
||||||
autocmd FileType html setl shiftwidth=2
|
|
||||||
|
|
||||||
let g:instant_markdown_autostart = 0
|
|
||||||
|
|
||||||
let g:terraform_align = 1
|
|
||||||
let g:terraform_fmt_on_save=1
|
|
||||||
|
|
||||||
let g:rustfmt_autosave = 1
|
|
||||||
|
|
||||||
inoremap <silent><expr> <TAB>
|
|
||||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
|
||||||
\ CheckBackspace() ? "\<Tab>" :
|
|
||||||
\ coc#refresh()
|
|
||||||
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
|
||||||
|
|
||||||
" Make <CR> to accept selected completion item or notify coc.nvim to format
|
|
||||||
" <C-g>u breaks current undo, please make your own choice.
|
|
||||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
|
||||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
|
||||||
|
|
||||||
function! CheckBackspace() abort
|
|
||||||
let col = col('.') - 1
|
|
||||||
return !col || getline('.')[col - 1] =~# '\s'
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Use <c-space> to trigger completion.
|
|
||||||
if has('nvim')
|
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
|
||||||
else
|
|
||||||
inoremap <silent><expr> <c-@> coc#refresh()
|
|
||||||
endif
|
|
||||||
|
|
||||||
if has('nvim')
|
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
|
||||||
else
|
|
||||||
inoremap <silent><expr> <c-@> coc#refresh()
|
|
||||||
endif
|
|
||||||
|
|
||||||
" https://stackoverflow.com/a/8585343
|
|
||||||
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
|
||||||
|
|
||||||
nmap <silent> gd <Plug>(coc-definition)
|
|
||||||
nmap <silent> gy <Plug>(coc-type-definition)
|
|
||||||
nmap <silent> gi <Plug>(coc-implementation)
|
|
||||||
nmap <silent> gr <Plug>(coc-references)
|
|
||||||
endif
|
|
||||||
Reference in New Issue
Block a user