Compare commits

...

11 Commits

Author SHA1 Message Date
99d14f5f6b tmux: Remove leftover setting 2022-07-02 12:38:43 +02:00
cc1ebcfd86 vim: Remove YouCompleteMe
It's just too much hassle with all the compiling and random errors after
updates.
2022-07-02 12:38:09 +02:00
8205d867a0 vim: Remove all that pseudo-IDE stuff 2022-07-02 12:38:09 +02:00
971ce13043 tmux: Remove unused keybinds 2022-07-02 12:38:09 +02:00
f9355f7b9c tmux: Do not use abbreviated keybinds 2022-07-02 12:38:09 +02:00
f384a8a1b6 tmux: Split settings and keybinds 2022-07-02 12:33:15 +02:00
fd3f5c4bd6 tmux: Standardize set-option calls 2022-07-02 12:33:15 +02:00
c54278cc7c tmux: Do not use abbreviated commands 2022-07-02 12:29:30 +02:00
8209b459d8 tmux: Fix error on old (<3.3) versions 2022-07-02 12:19:47 +02:00
86d55197cb Add semver shell helpers 2022-07-02 12:05:12 +02:00
50932f8faa tmux: Fix color code 2022-07-02 11:47:11 +02:00
4 changed files with 77 additions and 151 deletions

View File

@@ -1,80 +1,76 @@
set -g default-command "${SHELL}"
set-option -g default-command "${SHELL}"
# This *has* to be set to something with `screen-`, do not set this bindly
# to $TERM, e.g. "alacritty"!
set -g default-terminal "screen-256color"
set-option -g default-terminal "screen-256color"
set -g set-titles on
set -g set-titles-string '#S'
setw -g automatic-rename
set-option -g set-titles on
set-option -g set-titles-string '#S'
set-option -g automatic-rename
set -g prefix C-a
unbind C-b
bind C-a send-prefix
set-option -g escape-time 0
set-option -g aggressive-resize on
unbind C-j
set-option -g mouse on
set -s escape-time 0
set-window-option -g aggressive-resize on
set -g mouse on
set -g mode-keys vi
set-option -g mode-keys vi
set-option -g renumber-windows on
bind-key k confirm kill-window
bind-key K confirm kill-server
set-option -g bell-action any
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
set-option -g history-limit 50000
set -g bell-action any
set-option -g base-index 1
set-option -g pane-base-index 1
set -g history-limit 50000
set -g base-index 1
set-window-option -g pane-base-index 1
set -g status-position bottom
set -g status-justify left
set-option -g status-position bottom
set-option -g status-justify left
# https://wiki.archlinux.org/title/tmux#256_colors
set -ga terminal-overrides ",alacritty:Tc"
set-option -g -a terminal-overrides ",alacritty:Tc"
setw -g pane-border-status bottom
setw -g pane-border-format ''
set-option -g pane-border-status bottom
set-option -g pane-border-format ''
set-option -g -q pane-border-lines double;
set-option -g -q pane-border-indicators colour;
setw -g pane-border-lines double
setw -g pane-border-style "fg=#555555"
setw -g pane-active-border-style "fg=#e5b567"
setw -g pane-border-indicators colour
set-option -g pane-border-style "fg=#555555"
set-option -g pane-active-border-style "fg=#e5b567"
set-option -g status-style bg=default
set-window-option -g window-status-format ' #I: #W #F '
set-window-option -g window-status-current-format ' #I: #W #F '
set-window-option -g window-status-current-style "bg=#e5b567,fg=black"
set-option -g window-status-format ' #I: #W #F '
set-option -g window-status-current-format ' #I: #W #F '
set-option -g window-status-current-style "bg=#e5b567,fg=black"
set-window-option -g monitor-activity on
set-window-option -g visual-activity off
set-window-option -g window-status-activity-style "bg=#ff77777,fg=black"
set-option -g monitor-activity on
set-option -g visual-activity off
set-option -g window-status-activity-style "bg=#ff7777,fg=black"
set-window-option -g automatic-rename on
set-window-option -g automatic-rename-format '#{pane_current_command}'
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{pane_current_command}'
set-window-option -g window-status-separator ' '
set-option -g window-status-separator ' '
set -g status-left " #[bg=#6c99bb,fg=#2e2e2e] #{session_name} #[bg=default] "
set -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=default] "
set -g status-left-length 100
set-option -g status-left " #[bg=#6c99bb,fg=#2e2e2e] #{session_name} #[bg=default] "
set-option -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=default] "
set-option -g status-left-length 100
set -g message-style "bg=#CCCCCC,fg=#555555"
set-option -g message-style "bg=#CCCCCC,fg=#555555"
# Use C-a as the prefix
set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# vertical = | in this case
unbind %
unbind '"'
unbind-key %
unbind-key '"'
bind-key s split-window -v -c "#{pane_current_path}"
bind-key v split-window -h -c "#{pane_current_path}"
@@ -87,10 +83,4 @@ bind-key -n S-down new-window
bind-key -n S-left prev
bind-key -n S-right next
bind-key -n C-F1 command-prompt "split-window -h 'exec man %%'"
bind-key -n C-F2 split-window -h "exec htop"
bind-key -n C-F3 set-option status
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf sourced"
bind P paste-buffer

View File

@@ -302,20 +302,6 @@
src: ~/.vim/autoload/plug.vim
force: true
- name: get ycm version before update
shell: |
if ! [[ -d ~/.local/share/nvim/plugged/YouCompleteMe ]] ; then
exit 200
fi
cd ~/.local/share/nvim/plugged/YouCompleteMe
git rev-parse HEAD
args:
executable: /bin/bash
register: ycm_before_update
changed_when: false
failed_when: ycm_before_update.rc not in (0, 200)
tags: [user-update]
- name: install vim plugins
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +PlugInstall +qall'
register: vim_plugin_install
@@ -335,30 +321,6 @@
command: sh -c 'PATH=/usr/local/go/bin:$PATH GOROOT=/usr/local/go GOPATH=/home/{{ user.name }}/.go /usr/bin/nvim --headless +GoUpdateBinaries +qall'
changed_when: false
tags: [user-update]
- name: get ycm version after update
shell: |
cd ~/.local/share/nvim/plugged/YouCompleteMe
git rev-parse HEAD
args:
executable: /bin/bash
register: ycm_after_update
changed_when: false
tags: [user-update]
- name: compile youcompleteme
shell: |
cd ~/.local/share/nvim/plugged/YouCompleteMe
python3 ./install.py
args:
executable: /bin/bash
register: ycm_compile_output
failed_when: ycm_compile_output.rc not in (0, 200)
when: >
(ycm_before_update.rc == 200)
or
(ycm_before_update.stdout != ycm_after_update.stdout)
tags: [user-update]
tags: [vim-plugins]
- block:

View File

@@ -25,7 +25,6 @@ Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'
" Plug 'sheerun/vim-polyglot'
" Plug 'freitass/todo.txt-vim'
Plug 'Valloric/YouCompleteMe'
Plug 'nathanaelkane/vim-indent-guides'
"Plugin 'Lokaltog/vim-easymotion'
@@ -73,19 +72,6 @@ Plug 'evanleck/vim-svelte', {'branch': 'main'}
Plug 'cespare/vim-toml', { 'branch': 'main' }
"Plug 'rust-lang/rust.vim'
" Plug 'autozimu/LanguageClient-neovim', {
" \ 'branch': 'next',
" \ 'do': 'bash install.sh',
" \ }
Plug 'neovim/nvim-lspconfig'
Plug 'simrat39/rust-tools.nvim'
"Plug 'dense-analysis/ale'
call plug#end()
filetype plugin indent on
@@ -372,45 +358,3 @@ let g:go_info_mode='gopls'
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
let g:rustfmt_autosave = 1
let g:LanguageClient_serverCommands = {
\ 'rust': ['rust-analyzer'],
\ }
" let g:ale_linters = {'rust': ['analyzer']}
lua <<EOF
local nvim_lsp = require'lspconfig'
local opts = {
tools = { -- rust-tools options
autoSetHints = true,
hover_with_actions = true,
inlay_hints = {
show_parameter_hints = false,
parameter_hints_prefix = "",
other_hints_prefix = "",
},
},
-- all the opts to send to nvim-lspconfig
-- these override the defaults set by rust-tools.nvim
-- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer
server = {
-- on_attach is a callback called when the language server attachs to the buffer
-- on_attach = on_attach,
settings = {
-- to enable rust-analyzer settings visit:
-- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc
["rust-analyzer"] = {
-- enable clippy on save
checkOnSave = {
command = "clippy"
},
}
}
},
}
require('rust-tools').setup(opts)
EOF

View File

@@ -214,3 +214,33 @@ kubectl_pod() {
kubectl_deployment() {
kubectl-env mycloud get -n "${1}" deployment --selector=${2} -o jsonpath='{.items[*].metadata.name}'
}
# The semver_ checks are inspired by
# https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
semver_lte() {
v1="${1}"
v2="${2}"
printf '%s\n%s' "${v1}" "${v2}" | sort --version-sort --check=silent
}
semver_lt() {
v1="${1}"
v2="${2}"
semver_lte "${v1}" "${v2}" && [[ ! "${v1}" == "${v2}" ]]
}
semver_gte() {
v1="${1}"
v2="${2}"
! semver_lt "${v1}" "${v2}"
}
semver_gt() {
v1="${1}"
v2="${2}"
! semver_lte "${v1}" "${v2}"
}