Compare commits
11 Commits
35da0e349c
...
99d14f5f6b
| Author | SHA1 | Date | |
|---|---|---|---|
| 99d14f5f6b | |||
| cc1ebcfd86 | |||
| 8205d867a0 | |||
| 971ce13043 | |||
| f9355f7b9c | |||
| f384a8a1b6 | |||
| fd3f5c4bd6 | |||
| c54278cc7c | |||
| 8209b459d8 | |||
| 86d55197cb | |||
| 50932f8faa |
104
tmux/tmux.conf
104
tmux/tmux.conf
@@ -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
|
# This *has* to be set to something with `screen-`, do not set this bindly
|
||||||
# to $TERM, e.g. "alacritty"!
|
# to $TERM, e.g. "alacritty"!
|
||||||
set -g default-terminal "screen-256color"
|
set-option -g default-terminal "screen-256color"
|
||||||
|
|
||||||
set -g set-titles on
|
set-option -g set-titles on
|
||||||
set -g set-titles-string '#S'
|
set-option -g set-titles-string '#S'
|
||||||
setw -g automatic-rename
|
set-option -g automatic-rename
|
||||||
|
|
||||||
set -g prefix C-a
|
set-option -g escape-time 0
|
||||||
unbind C-b
|
set-option -g aggressive-resize on
|
||||||
bind C-a send-prefix
|
|
||||||
|
|
||||||
unbind C-j
|
set-option -g mouse on
|
||||||
|
|
||||||
set -s escape-time 0
|
set-option -g mode-keys vi
|
||||||
set-window-option -g aggressive-resize on
|
|
||||||
|
|
||||||
set -g mouse on
|
|
||||||
|
|
||||||
set -g mode-keys vi
|
|
||||||
|
|
||||||
set-option -g renumber-windows on
|
set-option -g renumber-windows on
|
||||||
|
|
||||||
bind-key k confirm kill-window
|
set-option -g bell-action any
|
||||||
bind-key K confirm kill-server
|
|
||||||
|
|
||||||
bind h select-pane -L
|
set-option -g history-limit 50000
|
||||||
bind j select-pane -D
|
|
||||||
bind k select-pane -U
|
|
||||||
bind l select-pane -R
|
|
||||||
|
|
||||||
set -g bell-action any
|
set-option -g base-index 1
|
||||||
|
set-option -g pane-base-index 1
|
||||||
|
|
||||||
set -g history-limit 50000
|
set-option -g status-position bottom
|
||||||
|
set-option -g status-justify left
|
||||||
set -g base-index 1
|
|
||||||
set-window-option -g pane-base-index 1
|
|
||||||
|
|
||||||
set -g status-position bottom
|
|
||||||
set -g status-justify left
|
|
||||||
|
|
||||||
# https://wiki.archlinux.org/title/tmux#256_colors
|
# 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
|
set-option -g pane-border-status bottom
|
||||||
setw -g pane-border-format ''
|
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
|
set-option -g pane-border-style "fg=#555555"
|
||||||
setw -g pane-border-style "fg=#555555"
|
set-option -g pane-active-border-style "fg=#e5b567"
|
||||||
setw -g pane-active-border-style "fg=#e5b567"
|
|
||||||
setw -g pane-border-indicators colour
|
|
||||||
|
|
||||||
set-option -g status-style bg=default
|
set-option -g status-style bg=default
|
||||||
|
|
||||||
set-window-option -g window-status-format ' #I: #W #F '
|
set-option -g window-status-format ' #I: #W #F '
|
||||||
set-window-option -g window-status-current-format ' #I: #W #F '
|
set-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-current-style "bg=#e5b567,fg=black"
|
||||||
|
|
||||||
set-window-option -g monitor-activity on
|
set-option -g monitor-activity on
|
||||||
set-window-option -g visual-activity off
|
set-option -g visual-activity off
|
||||||
set-window-option -g window-status-activity-style "bg=#ff77777,fg=black"
|
set-option -g window-status-activity-style "bg=#ff7777,fg=black"
|
||||||
|
|
||||||
set-window-option -g automatic-rename on
|
set-option -g automatic-rename on
|
||||||
set-window-option -g automatic-rename-format '#{pane_current_command}'
|
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-option -g status-left " #[bg=#6c99bb,fg=#2e2e2e] #{session_name} #[bg=default] "
|
||||||
set -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=default] "
|
set-option -g status-right "#[bg=#CCCCCC,fg=#555555] #{host} #[bg=default] "
|
||||||
set -g status-left-length 100
|
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
|
# vertical = | in this case
|
||||||
unbind %
|
unbind-key %
|
||||||
unbind '"'
|
unbind-key '"'
|
||||||
bind-key s split-window -v -c "#{pane_current_path}"
|
bind-key s split-window -v -c "#{pane_current_path}"
|
||||||
bind-key v split-window -h -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-left prev
|
||||||
bind-key -n S-right next
|
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-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf sourced"
|
||||||
|
|
||||||
bind P paste-buffer
|
|
||||||
|
|||||||
38
user.yml
38
user.yml
@@ -302,20 +302,6 @@
|
|||||||
src: ~/.vim/autoload/plug.vim
|
src: ~/.vim/autoload/plug.vim
|
||||||
force: true
|
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
|
- 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'
|
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
|
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'
|
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
|
changed_when: false
|
||||||
tags: [user-update]
|
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]
|
tags: [vim-plugins]
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
|
|||||||
56
vim/vimrc
56
vim/vimrc
@@ -25,7 +25,6 @@ Plug 'junegunn/goyo.vim'
|
|||||||
Plug 'junegunn/limelight.vim'
|
Plug 'junegunn/limelight.vim'
|
||||||
" Plug 'sheerun/vim-polyglot'
|
" Plug 'sheerun/vim-polyglot'
|
||||||
" Plug 'freitass/todo.txt-vim'
|
" Plug 'freitass/todo.txt-vim'
|
||||||
Plug 'Valloric/YouCompleteMe'
|
|
||||||
Plug 'nathanaelkane/vim-indent-guides'
|
Plug 'nathanaelkane/vim-indent-guides'
|
||||||
|
|
||||||
"Plugin 'Lokaltog/vim-easymotion'
|
"Plugin 'Lokaltog/vim-easymotion'
|
||||||
@@ -73,19 +72,6 @@ Plug 'evanleck/vim-svelte', {'branch': 'main'}
|
|||||||
|
|
||||||
Plug 'cespare/vim-toml', { '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()
|
call plug#end()
|
||||||
filetype plugin indent on
|
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>
|
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
||||||
|
|
||||||
let g:rustfmt_autosave = 1
|
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
|
|
||||||
|
|||||||
@@ -214,3 +214,33 @@ kubectl_pod() {
|
|||||||
kubectl_deployment() {
|
kubectl_deployment() {
|
||||||
kubectl-env mycloud get -n "${1}" deployment --selector=${2} -o jsonpath='{.items[*].metadata.name}'
|
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}"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user