Compare commits

..

4 commits

Author SHA1 Message Date
fefcf59feb
feat(tmux): remove plugins 2023-04-18 20:42:37 +02:00
aa81970f82
chore: remove unused tools 2023-04-18 20:39:55 +02:00
445d3c04f5
fix(nvim): cmdheight 1 2023-04-18 20:37:21 +02:00
8adfa35d3c
feat: use Operator Mono font 2023-04-18 20:20:18 +02:00
8 changed files with 16 additions and 318 deletions

View file

@ -1,32 +0,0 @@
#window:
# decorations: none
font:
normal:
family: FiraCode Nerd Font Mono
colors:
primary:
background: '0xfafafa'
foreground: '0x383a42'
normal:
black: '0x383a42'
red: '0xe45649'
green: '0x50a14f'
yellow: '0xc18401'
blue: '0x0184bc'
magenta: '0xa626a4'
cyan: '0x0997b3'
white: '0xfafafa'
bright:
black: '0x383a42'
red: '0xe45649'
green: '0x50a14f'
yellow: '0xc18401'
blue: '0x0184bc'
magenta: '0xa626a4'
cyan: '0x0997b3'
white: '0xfafafa'

View file

@ -1,7 +1,7 @@
[user] [user]
name = Tine Jozelj name = Tine Jozelj
email = tine@tjo.space email = tine@tjo.space
signingkey = /home/tine/.ssh/id_ecdsa.pub signingkey = /home/tine/.ssh/id_ed25519.pub
[commit] [commit]
gpgsign = true gpgsign = true

View file

@ -23,7 +23,6 @@ then
git \ git \
bat \ bat \
difftastic \ difftastic \
vim \
neovim \ neovim \
zsh \ zsh \
tmux \ tmux \
@ -37,7 +36,6 @@ then
sudo apt install -y \ sudo apt install -y \
git \ git \
bat \ bat \
vim \
neovim \ neovim \
zsh \ zsh \
tmux \ tmux \
@ -63,6 +61,14 @@ fi
echo "== Switching shell to ZSH" echo "== Switching shell to ZSH"
sudo chsh $USER --shell $(which zsh) sudo chsh $USER --shell $(which zsh)
echo "== Installing fonts"
HOME_FONTS_DIR="${HOME_DIR}/.local/fonts"
mkdir -p ${HOME_FONTS_DIR}
# Clone from private repo :(
rm -rf ${HOME_FONTS_DIR}/dotfiles-fonts
git clone --depth 1 git@github.com:mentos1386/dotfiles-fonts.git ${HOME_FONTS_DIR}/dotfiles-fonts
fc-cache
echo "== Copying configuration files..." echo "== Copying configuration files..."
# GIT # GIT
workspace_backup .gitconfig workspace_backup .gitconfig
@ -88,10 +94,6 @@ workspace_link zsh/zshrc .zshrc
workspace_backup .bin workspace_backup .bin
workspace_link bin .bin workspace_link bin .bin
# ALACRITTY
workspace_backup .alacritty.yml
workspace_link alacritty/alacritty.yml .alacritty.yml
# KITTY # KITTY
workspace_backup .config/kitty/kitty.conf workspace_backup .config/kitty/kitty.conf
workspace_link kitty/kitty.conf .config/kitty/kitty.conf workspace_link kitty/kitty.conf .config/kitty/kitty.conf
@ -100,12 +102,6 @@ workspace_link kitty/kitty.conf .config/kitty/kitty.conf
workspace_backup .config/bat/config workspace_backup .config/bat/config
workspace_link bat/config .config/bat/config workspace_link bat/config .config/bat/config
# VIM
workspace_backup .vimrc
workspace_link vim/vimrc .vimrc
workspace_backup .vim/coc-settings.json
workspace_link vim/coc-settings.json .vim/coc-settings.json
# NEOVIM # NEOVIM
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

View file

@ -1,4 +1,8 @@
font_family FiraCode Nerd Font Mono font_family Operator Mono Book Nerd Font
bold_font Operator Mono Medium Nerd Font
italic_font Operator Mono Book Italic Nerd Font
bold_italic_font Operator Mono Medium Italic Nerd Font
disable_ligatures never disable_ligatures never
wayland_titlebar_color system wayland_titlebar_color system

View file

@ -230,7 +230,7 @@ set smartcase
set mouse=a set mouse=a
"set spell spelllang=en_us "set spell spelllang=en_us
set updatetime=300 set updatetime=300
set cmdheight=2 set cmdheight=1
set hidden set hidden
set shortmess+=c set shortmess+=c

View file

@ -71,18 +71,7 @@ set-window-option -g mode-style fg=default,bg=colour250
set-window-option -g clock-mode-colour colour75 set-window-option -g clock-mode-colour colour75
set-window-option -g clock-mode-style 24 set-window-option -g clock-mode-style 24
# Plugins # Colors
set-option -g @prefix_highlight_fg 'colour255' set-option -g @prefix_highlight_fg 'colour255'
set-option -g @prefix_highlight_bg 'colour75' set-option -g @prefix_highlight_bg 'colour75'
set-option -g @prefix_highlight_copy_mode_attr 'fg=colour255,bg=colour176' set-option -g @prefix_highlight_copy_mode_attr 'fg=colour255,bg=colour176'
## TMUX Plugins
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-strategy-vim 'session'
run '~/.tmux/plugins/tpm/tpm'

View file

@ -1,37 +0,0 @@
{
"git.addedSign.hlGroup": "GitGutterAdd",
"git.changedSign.hlGroup": "GitGutterChange",
"git.removedSign.hlGroup": "GitGutterDelete",
"git.topRemovedSign.hlGroup": "GitGutterDelete",
"git.changeRemovedSign.hlGroup": "GitGutterChangeDelete",
"languageserver": {
"terraform": {
"command": "terraform-ls",
"args": ["serve"],
"filetypes": ["terraform", "tf"],
"initializationOptions": {},
"settings": {}
}
},
"prettier.disableSuccessMessage": true,
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"json",
"graphql",
"prisma",
"terraform"
],
"tsserver.formatOnType": true,
"coc.preferences.formatOnType": true,
"yaml.schemaStore.enable": true,
"yaml.schemas": {
"kubernetes": [
"/**/kubernetes/**/*.yaml",
"/**/k8s/**/*.yaml"
],
"https://json.schemastore.org/github-workflow.json": "/.github/workflows/*.yaml"
}
}

222
vim/vimrc
View file

@ -1,222 +0,0 @@
" Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
endif
" Run PlugInstall if there are missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
\| endif
"""""
"--- Plugins
call plug#begin()
" General
Plug 'ojroques/vim-oscyank'
Plug 'tpope/vim-obsession'
Plug 'tmux-plugins/vim-tmux-focus-events'
" Look
Plug 'vim-airline/vim-airline'
Plug 'sonph/onehalf', { 'rtp': 'vim' }
Plug 'Yggdroot/indentLine'
" Git
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'tpope/vim-rhubarb'
" Search/Files
Plug 'preservim/nerdtree'
Plug 'ctrlpvim/ctrlp.vim'
" Ignore/Edit files
Plug 'vim-scripts/gitignore'
" Languages
Plug 'pantharshit00/vim-prisma'
Plug 'fatih/vim-go'
Plug 'pangloss/vim-javascript'
Plug 'leafgarland/typescript-vim'
Plug 'peitalin/vim-jsx-typescript'
Plug 'styled-components/vim-styled-components', { 'branch': 'main' }
Plug 'jparise/vim-graphql'
Plug 'kevinoid/vim-jsonc'
" protobuf with buf
Plug 'dense-analysis/ale'
Plug 'bufbuild/vim-buf'
let g:ale_linters = {
\ 'proto': ['buf-lint',],
\}
let g:ale_lint_on_text_changed = 'never'
let g:ale_linters_explicit = 1
" Code helpers
Plug 'neoclide/coc.nvim', {'branch': 'release'}
call plug#end()
"""""
"--- CodeServer Configurations
let g:coc_global_extensions = [
\ 'coc-tsserver',
\ 'coc-prettier',
\ 'coc-yaml',
\ 'coc-json',
\ 'coc-git',
\ 'coc-pyright',
\ 'coc-pairs',
\ 'coc-prisma',
\ 'coc-sh',
\ ]
if isdirectory('./node_modules') && isdirectory('./node_modules/prettier')
let g:coc_global_extensions += ['coc-prettier']
endif
if isdirectory('./node_modules') && isdirectory('./node_modules/eslint')
let g:coc_global_extensions += ['coc-eslint']
endif
" Diagnostic list
nnoremap <silent> <space>d :<C-u>CocList diagnostics<cr>
" Symbols list
nnoremap <silent> <space>s :<C-u>CocList -I symbols<cr>
" Code actions
nmap <leader>do <Plug>(coc-codeaction)
" Rename current world
nmap <leader>rn <Plug>(coc-rename)
" Use K to show documentation in preview window.
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
if (index(['vim','help'], &filetype) >= 0)
execute 'h '.expand('<cword>')
elseif (coc#rpc#ready())
call CocActionAsync('doHover')
else
execute '!' . &keywordprg . " " . expand('<cword>')
endif
endfunction
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" GoTo code navigation.
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)
"""""
"--- TMUX/Clipboard fixes
set t_Co=256
set t_ut=
" Set Vim-specific sequences for RGB colors
" Fixes 'termguicolors' usage in vim+tmux
" :h xterm-true-color
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
" Enables 24-bit RGB color in the terminal
if has('termguicolors')
if empty($COLORTERM) || $COLORTERM =~# 'truecolor\|24bit'
set termguicolors
endif
endif
" Use system clipboard to get buffers synced between TMUX and VIM
if has('clipboard') && has('vim_starting')
" set clipboard& clipboard+=unnamedplus
set clipboard& clipboard^=unnamed,unnamedplus
endif
if exists('##TextYankPost')
augroup BlinkClipboardIntegration
autocmd!
autocmd TextYankPost * if v:event.operator is 'y' && v:event.regname is '' | execute 'OSCYankReg "' | endif
augroup END
endif
"""""
"--- VIM Configuration
set encoding=UTF-8
set autoread " will re-read opened file if changed externaly
set autowrite
set splitright
set splitbelow
set autoindent
set tabstop=2
set shiftwidth=2
set expandtab
set noswapfile
set nobackup
set nowritebackup
set incsearch " search as you type
set ignorecase
set smartcase
set mouse=a
set ttymouse=sgr
set spell spelllang=en_us
set updatetime=300
set cmdheight=1
set hidden
set shortmess+=c
"""""
"- Custom commands
command! -nargs=0 Prettier :CocCommand prettier.formatFile
"""""
"- CtrlP
let g:ctrlp_max_files=0
let g:ctrlp_max_depth=40
let g:ctrlp_show_hidden=1
let g:ctrlp_custom_ignore = {
\ 'dir': '\.git$\|\.yardoc\|node_modules\|tmp$\|dist$',
\ 'file': '\.so$\|\.dat$|\.DS_Store$'
\ }
""""""
"- NERDTree
let NERDTreeShowHidden=1
let NERDTreeIgnore=['\.git$[[dir]]', 'node_modules$[[dir]]']
let NERDTreeRespectWildIgnore=1
let NERDTreeStatusline="NERDTree"
let NERDTreeMinimalUI=1
let NERDTreeCascadeSingleChildDir=1
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-f> :NERDTreeFind<CR>
nnoremap <leader>f 1z= " fix spelling
map <C-t> :call NERDTreeToggleAndRefresh()<CR>
function NERDTreeToggleAndRefresh()
:NERDTreeToggle
if g:NERDTree.IsOpen()
:NERDTreeRefreshRoot
endif
endfunction
"""""
"- Keybindings
nnoremap <SPACE> <Nop>
let mapleader = " "
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
"""""
"- Visuals
set noshowmode
set number
set cursorline
set hlsearch " highlight all results
set signcolumn=yes " always show git diff column
colorscheme onehalflight
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline_symbols.branch = ''
let g:airline_symbols.dirty=' '
let g:airline_symbols.linenr = '☰ '
let g:airline_symbols.maxlinenr = ' '
let g:airline_left_sep=''
let g:airline_right_sep=''
let g:airline_detect_spell=0
let g:airline#extensions#coc#enabled = 1
let g:airline#parts#ffenc#skip_expected_string='utf-8[unix]'
let g:airline_theme = 'onehalflight'