Merge branch 'master' of github.com:andrejusk/dotfiles

This commit is contained in:
Andrejus
2020-11-09 18:27:02 +00:00
14 changed files with 441 additions and 250 deletions

View File

@@ -1,4 +1,4 @@
from ubuntu:bionic as install
FROM ubuntu:bionic as install
# Install sudo and make, git since built-in is skipped
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

View File

@@ -2,8 +2,8 @@
Collection of experimental dotfiles and supporting install scripts.
Tested on and compatible with:
* Ubuntu 18.04
* Ubuntu 20.04
- Ubuntu 20.04
## Install
@@ -13,17 +13,19 @@ Tested on and compatible with:
Shell: 🐟 fish (+ fisher)
Editor: nvim (+ vim-plug)
Editor: neovim (+ vim-plug)
Tools:
* aws
* docker (+ docker-compose)
* firebase
* terraform
* screenfetch
- aws, gcloud, firebase
- docker (+ docker-compose)
- kubectl
- terraform
- screenfetch
Languages:
* java
* js (nvm, node yarn, nvm)
* python (+ poetry, pyenv)
* ruby
- java
- js (nvm, node, yarn)
- python (pyenv, poetry)
- ruby

View File

@@ -1,12 +1,12 @@
# ---------------------------------------------------------------------------- #
# Cross-shell (only import if environment has been setup)
# ---------------------------------------------------------------------------- #
if begin; test -e ~/.bash_profile; and type -q bass; end
bass source ~/.bash_profile
if status --is-interactive
# Cross-shell setup
if begin; test -e ~/.bash_profile; and type -q bax; end
bax "source ~/.bash_profile"
end
# Fish specific
set fish_greeting
if type -q base16-seti
base16-seti
end
end
# ---------------------------------------------------------------------------- #
# Fish specific
# ---------------------------------------------------------------------------- #
set fish_greeting
base16-seti

View File

@@ -1,5 +1,8 @@
fishpkg/fish-prompt-mono
acomagu/fish-async-prompt
matchai/fish-mock
edc/bass
tomyun/base16-fish
gazorby/fish-abbreviation-tips
oh-my-fish/plugin-license
matchai/fish-mock
jorgebucaran/fish-bax
jethrokuan/z
joseluisq/gitnow

View File

@@ -1,23 +1,31 @@
" ============================================================================ "
" === EDITING OPTIONS === "
" ============================================================================ "
"
" Leader key <SPACE>
let g:mapleader=' '
" Use posix-compliant shell
set shell=sh
" Enable syntax highlighting
syntax enable
filetype on
filetype plugin on
" Hides buffers instead of closing them
set hidden
" do not wrap long lines by default
set nowrap
" default encoding
set encoding=utf-8
set fileencoding=utf-8
set fileformat=unix
filetype on
filetype plugin on
syntax on
" Leader key <SPACE>
let g:mapleader=' '
" Yank and paste with the system clipboard
set clipboard=
" Hides buffers instead of closing them
set hidden
set clipboard=unnamedplus
" et = expandtab (spaces instead of tabs)
" ts = tabstop (the number of spaces that a tab equates to)
@@ -25,25 +33,36 @@ set hidden
" -- or de-indenting -- a line)
" sts = softtabstop (the number of spaces to use when expanding tabs)
set et sts=4 sw=4 ts=4
set showtabline=4
set foldenable
set foldmethod=indent
set foldlevel=99
set conceallevel=1
set conceallevel=0
set number
set relativenumber
" do not wrap long lines by default
set nowrap
" two lines for command line
set cmdheight=2
set scrolloff=10
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience.
set updatetime=300
set updatetime=100
set timeoutlen=300
" Don't pass messages to |ins-completion-menu|.
set shortmess=atT
" Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
if has("patch-8.1.1564")
" Recently vim can merge signcolumn and number column into one
set signcolumn=number
else
set signcolumn=yes
endif
" coc.nvim recommendations
set nobackup
set nowritebackup
" Don't pass messages to |ins-completion-menu|.
set shortmess+=c
@@ -61,8 +80,14 @@ endif
" === UI === "
" ============================================================================ "
" Support italics
hi Comment cterm=italic
" Enable true color support
set termguicolors
if (has("termguicolors"))
set termguicolors
hi LineNr ctermbg=NONE guibg=NONE
endif
" Set preview window to appear at bottom and right
set splitbelow
@@ -74,33 +99,25 @@ set noshowmode
" Set floating window to be slightly transparent
set winbl=10
" ============================================================================ "
" === MISC. === "
" ============================================================================ "
" Enable ruler
set ruler
set number
set relativenumber
" Automaticaly close nvim if NERDTree is only thing left open
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" Pop-up menu
set pumheight=10
" === Search === "
" ignore case when searching
set ignorecase
" two lines for command line
set cmdheight=2
" no visual bell
set visualbell t_vb=
" if the search string has an upper case letter in it, the search will be case sensitive
set smartcase
" Enable spellcheck for markdown files
autocmd BufRead,BufNewFile *.md setlocal spell
" Redraw on resize
autocmd VimResized * redraw!
" Set backups
if has('persistent_undo')
set undofile
set undolevels=3000
set undoreload=10000
endif
set backupdir=$XDG_DATA_HOME/nvim/backup " Don't put backups in current dir
set backup
set noswapfile
" Some servers have issues with backup files, see #649.
" set nobackup
" set nowritebackup
" Redraw on writing buffer
autocmd BufWritePost * redraw!

View File

@@ -1,15 +1,113 @@
{
"suggest.echodocSupport": true,
"python.jediEnabled": false,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"languageserver": {
"terraform": {
"command": "terraform-ls",
"args": ["serve"],
"filetypes": ["tf", "terraform"],
"initializationOptions": {},
"settings": {}
}
"coc.preferences.formatOnSaveFiletypes": [
"css",
"dockerfile",
"html",
"javascript",
"javascriptreact",
"json",
"make",
"markdown",
"perl",
"python",
"sh",
"svg",
"toml",
"typescript",
"typescriptreact",
"vim",
"xml",
"yaml"
],
"coc.preferences.extensionUpdateCheck": "daily",
"list.source.files.args": ["--hidden", "--files"],
"suggest.echodocSupport": true,
"python.pythonPath": "python3",
"python.jediEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": false,
"languageserver": {
"terraform": {
"command": "terraform-ls",
"args": ["serve"],
"filetypes": ["tf", "terraform"],
"initializationOptions": {},
"settings": {}
}
},
"explorer.width": 30,
"explorer.file.root.template": "[icon] [git] [hidden & 1][root]",
"explorer.icon.enableNerdfont": true,
"explorer.previewAction.onHover": false,
"explorer.icon.enableVimDevicons": false,
"explorer.file.showHiddenFiles": true,
"explorer.file.autoReveal": true,
"explorer.keyMappings.global": {
"i": false,
"gk": "expandablePrev",
"gj": "expandableNext",
"*": "toggleSelection",
"<tab>": "actionMenu",
"h": "collapse",
"l": ["expandable?", "expand", "open"],
"J": ["toggleSelection", "nodeNext"],
"K": ["toggleSelection", "nodePrev"],
"gl": "expandRecursive",
"gh": "collapseRecursive",
"o": ["expanded?", "collapse", "expand"],
"<cr>": ["expandable?", "cd", "open"],
"e": "open",
"s": "open:split",
"v": "open:vsplit",
"t": "open:tab",
"<bs>": "gotoParent",
"gp": "preview:labeling",
"y": "copyFilepath",
"Y": "copyFilename",
"c": "copyFile",
"x": "cutFile",
"p": "pasteFile",
"d": "delete",
"D": "deleteForever",
"a": "addFile",
"A": "addDirectory",
"r": "rename",
".": "toggleHidden",
"R": "refresh",
"?": "help",
"q": "quit",
"<esc>": "esc",
"X": "systemExecute",
"gd": "listDrive",
"f": "search",
"F": "searchRecursive",
"gf": "gotoSource:file",
"gb": "gotoSource:buffer",
"[[": "sourcePrev",
"]]": "sourceNext",
"[d": "diagnosticPrev",
"]d": "diagnosticNext",
"[c": "gitPrev",
"]c": "gitNext",
"<<": "gitStage",
">>": "gitUnstage"
}
}

View File

@@ -1,4 +1,4 @@
" No arrow keys
" Disable arrow keys
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
@@ -9,6 +9,25 @@ inoremap <Left> <NOP>
inoremap <Right> <NOP>
" Disable manual and ex mode
nnoremap <F1> <nop>
nnoremap Q <nop>
" Quick escape
inoremap jk <Esc>
inoremap kj <Esc>
" Quick save
nnoremap <C-s> :w<CR>
" Better tabbing
vnoremap < <gv
vnoremap > >gv
" Quick window switching
" Ctrl-[hjkl]
nnoremap <silent> <C-h> <C-w>h
@@ -17,6 +36,20 @@ nnoremap <silent> <C-k> <C-w>k
nnoremap <silent> <C-l> <C-w>l
" Quick window resizing
" Alt-[hjkl]
nnoremap <silent> <M-j> :resize -2<CR>
nnoremap <silent> <M-k> :resize +2<CR>
nnoremap <silent> <M-h> :vertical resize -2<CR>
nnoremap <silent> <M-l> :vertical resize +2<CR>
" Quicker omni complete nav
" Ctrl-[jk]
inoremap <expr> <c-j> ("\<C-n>")
inoremap <expr> <c-k> ("\<C-p>")
" Distraction free typing
" <l>l - Toggle Goyo and Limelight
nnoremap <silent> <leader>l :Goyo<cr>
@@ -39,11 +72,11 @@ nnoremap <silent> <leader>f :Rg<cr>
nnoremap <silent> <leader>; :Buffers<cr>
" NERDTree
" <l>e - Toggle NERDTree on/off
" <l>E - Open current file location in NERDTree
nnoremap <silent> <leader>e :NERDTreeToggle<cr>
nnoremap <silent> <leader>E :NERDTreeFind<cr>
" coc.nvim explorer
" <l>e - Toggle explorer on/off
" <l>E - Open current file location
nmap <silent> <leader>e :CocCommand explorer<cr>
nmap <silent> <leader>E :CocCommand explorer --reveal expand('<sfile>')<cr>
" coc.nvim
@@ -54,15 +87,16 @@ nnoremap <silent> <leader>E :NERDTreeFind<cr>
" <l>j - Jump to implementation of current symbol
" <l>s - Fuzzy search current project symbols
" <l>n - Symbol renaming
" <l>y - Format selected code
nnoremap <silent> <C-n> <Plug>(coc-diagnostic-prev)
nnoremap <silent> <C-p> <Plug>(coc-diagnostic-next)
nnoremap <silent> <leader>d <Plug>(coc-definition)
nnoremap <silent> <leader>r <Plug>(coc-references)
nnoremap <silent> <leader>j <Plug>(coc-implementation)
nnoremap <silent> <leader>s :<C-u>CocList -I -N --top symbols<cr>
nnoremap <silent> <leader>n <Plug>(coc-rename)
nnoremap <silent> <leader>y <Plug>(coc-format-selected)
" <l>k - Symbol renaming
nmap <silent> <C-n> <Plug>(coc-diagnostic-prev)
nmap <silent> <C-p> <Plug>(coc-diagnostic-next)
" broken d
nmap <silent> <leader>d <Plug>(coc-definition)
nmap <silent> <leader>r <Plug>(coc-references)
" broken j
nmap <silent> <leader>j <Plug>(coc-implementation)
nmap <silent> <leader>s :<C-u>CocList -I -N --top symbols<cr>
nmap <silent> <leader>n <Plug>(coc-rename)
" Search shorcuts
@@ -72,14 +106,6 @@ nnoremap <leader>h :%s///<left><left>
nnoremap <silent> <leader>/ :nohlsearch<cr>
" Easy-motion shortcut
" <l>w - move to word bi-directionally
" <l>W{char} - move to {char}
nnoremap <silent> <leader>w <Plug>(easymotion-bd-w)
nnoremap <silent> <leader>W <Plug>(easymotion-bd-f)
" use <tab> for trigger completion and navigate to next complete item
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
@@ -122,5 +148,3 @@ augroup mygroup
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end

View File

@@ -2,28 +2,21 @@
set background=dark
colorscheme base16-seti
" Coc.nvim
" Close preview window when completion is done.
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
" Disable deprecated python2 provider
let g:loaded_python_provider = 0
" Call method on window enter
augroup WindowManagement
autocmd!
autocmd WinEnter * call Handle_Win_Enter()
augroup END
" " Call method on window enter
" augroup WindowManagement
" autocmd!
" autocmd WinEnter * call Handle_Win_Enter()
" augroup END
" Change highlight group of preview window when open
function! Handle_Win_Enter()
if &previewwindow
setlocal winhighlight=Normal:MarkdownError
endif
endfunction
" Reload icons after init source
if exists('g:loaded_webdevicons')
call webdevicons#refresh()
endif
" " Change highlight group of preview window when open
" function! Handle_Win_Enter()
" if &previewwindow
" setlocal winhighlight=Normal:MarkdownError
" endif
" endfunction

View File

@@ -9,74 +9,53 @@ Plug 'chriskempson/base16-vim'
" dev icons
Plug 'ryanoasis/vim-devicons'
" {{{
let g:webdevicons_enable_nerdtree = 1
let g:webdevicons_conceal_nerdtree_brackets = 1
let g:webdevicons_enable_airline_tabline = 1
let g:webdevicons_enable_airline_statusline = 1
let g:webdevicons_enable_startify = 1
" }}}
" explorer sidebar
Plug 'scrooloose/nerdtree'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
" {{{
" Show hidden files/directories
let g:NERDTreeShowHidden = 1
" Remove bookmarks and help text from NERDTree
let g:NERDTreeMinimalUI = 1
let g:NERDTreeMinimalMenu = 1
" Remove icons for expandable/expanded directories
let g:NERDTreeDirArrowExpandable = ''
let g:NERDTreeDirArrowCollapsible = ''
" Hide certain files and directories from NERDTree
let g:NERDTreeIgnore = ['\.git$[[dir]]']
" }}}
" status line
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" {{{
" Theme
let g:airline_theme = 'base16_seti'
" Enable extensions
let g:airline_extensions = ['branch', 'coc', 'hunks']
" Do not draw separators for empty sections (only for the active window) >
let g:airline_skip_empty_sections = 1
" Smartly uniquify buffers names with similar filename, suppressing common parts of paths.
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
" Custom setup that removes filetype/whitespace from default vim airline bar
" let g:airline#extensions#default#layout = [['a', 'b', 'c'], ['x', 'z', 'warning', 'error']]
let g:airline#extensions#default#layout = [['a', 'b', 'c'], ['x', 'z', 'warning', 'error']]
" Customize vim airline per filetype
" 'nerdtree' - Hide nerdtree status line
" 'list' - Only show file type plus current line number out of total
let g:airline_filetype_overrides = {
\ 'coc-explorer': [ 'CoC Explorer', '' ],
\ 'coc-explorer': [ ' Explore', '' ],
\ 'fugitive': ['fugitive', '%{airline#util#wrap(airline#extensions#branch#get_head(),80)}'],
\ 'help': [ 'Help', '%f' ],
\ 'startify': [ 'startify', '' ],
\ 'vim-plug': [ 'Plugins', '' ],
\ 'nerdtree': [ get(g:, 'NERDTreeStatusline', ''), '' ],
\ 'list': [ '%y', '%l/%L'],
\ }
" Enable powerline fonts
let g:airline_powerline_fonts = 1
let g:airline_left_sep = ''
let g:airline_right_sep = ''
let g:airline_right_alt_sep = ''
" Enable caching of syntax highlighting groups
let g:airline_highlighting_cache = 1
" }}}
" Print function signatures in echo area
Plug 'Shougo/echodoc.vim'
" {{{
" Enable echodoc on startup
let g:echodoc#enable_at_startup = 1
" Enable tabline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'
" }}}
" start screen
@@ -90,20 +69,46 @@ Plug 'junegunn/limelight.vim'
Plug 'kkoomen/vim-doge'
" auto-close plugins
Plug 'rstacruz/vim-closer'
Plug 'tpope/vim-endwise'
" better motion
Plug 'easymotion/vim-easymotion'
Plug 'tpope/vim-surround'
Plug 'svermeulen/vim-subversive'
Plug 'godlygeek/tabular'
" easier commentary
Plug 'tpope/vim-commentary'
" easier alignment
Plug 'godlygeek/tabular'
" extra visual feedback
Plug 'junegunn/rainbow_parentheses.vim'
" {{{
let g:rainbow_active = 1
let g:rainbow#pairs = [['(', ')'], ['[', ']'], ['{', '}']]
let g:rainbow_conf = {'guis': ['bold']}
" }}}
Plug 'unblevable/quick-scope'
" better motion
Plug 'tpope/vim-surround'
Plug 'justinmk/vim-sneak'
" {{{
let g:sneak#label = 1
let g:sneak#prompt = ' '
" case insensitive
let g:sneak#use_ic_scs = 1
" move to next search if cursor hasn't moved
let g:sneak#s_next = 1
" }}}
" git tools
Plug 'mhinz/vim-signify'
" {{{
let g:signify_sign_add = '+'
let g:signify_sign_delete = '-'
let g:signify_sign_change = '~'
let g:signify_sign_show_count = 0
let g:signify_sign_show_text = 1
" }}}
Plug 'tpope/vim-fugitive'
@@ -111,44 +116,49 @@ Plug 'tpope/vim-fugitive'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
" {{{
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.9 } }
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
let g:fzf_preview_window = ['right:66%', 'ctrl-/']
let g:fzf_buffers_jump = 1
let g:fzf_commits_log_options = '--graph --color=always --format="%C(auto)%h%d %s %C(black)%C(bold)%cr"'
let $FZF_DEFAULT_OPTS="--ansi --layout reverse --margin=1,4 --preview 'batcat --color=always --style=header,grid --line-range :300 {}'"
let $FZF_DEFAULT_COMMAND = 'rg --files --ignore-case --hidden -g "!{.git,node_modules,vendor}/*"'
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, { 'options': $FZF_DEFAULT_OPTS}, <bang>0)
" }}}
Plug 'antoinemadec/coc-fzf'
Plug 'airblade/vim-rooter'
" coc
Plug 'neoclide/coc.nvim', {'do': 'yarn install --frozen-lockfile'}
" {{{
" Keep in sync with below
let g:coc_global_extensions = [
\ 'coc-css',
\ 'coc-eslint',
\ 'coc-git',
\ 'coc-html',
\ 'coc-json',
\ 'coc-prettier',
\ 'coc-python',
\ 'coc-tabnine',
\ 'coc-tsserver',
\ 'coc-yaml',
\]
\ 'coc-actions',
\ 'coc-clangd',
\ 'coc-css',
\ 'coc-docker',
\ 'coc-emmet',
\ 'coc-emoji',
\ 'coc-eslint',
\ 'coc-explorer',
\ 'coc-fish',
\ 'coc-fzf-preview',
\ 'coc-git',
\ 'coc-go',
\ 'coc-groovy',
\ 'coc-highlight',
\ 'coc-html',
\ 'coc-json',
\ 'coc-lists',
\ 'coc-marketplace',
\ 'coc-perl',
\ 'coc-prettier',
\ 'coc-python',
\ 'coc-rust-analyzer',
\ 'coc-sh',
\ 'coc-snippets',
\ 'coc-svg',
\ 'coc-tabnine',
\ 'coc-toml',
\ 'coc-tsserver',
\ 'coc-vimlsp',
\ 'coc-xml',
\ 'coc-yaml',
\ ]
" }}}
Plug 'neoclide/coc-css', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-eslint', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-git', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-html', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-prettier', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-python', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-tabnine', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-yaml', {'do': 'yarn install --frozen-lockfile'}
call plug#end()

View File

@@ -1,50 +1,85 @@
if [ -z "$PROFILE_LOCK" ]; then
export PROFILE_LOCK=1
# U _____ u _ _ __ __
# \| ___"|/| \ |"| \ \ /"/u
# | _|" <| \| |> \ \ / //
# | |___ U| |\ |u /\ V /_,-.
# |_____| |_| \_| U \_/-(_/
# << >> || \\,-.//
# (__) (__)(_") (_/(__)
#
# set PATH so it includes user's private bin
export PATH="$HOME/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
# set PATH so it includes user's private bin
export PATH="$HOME/bin:$PATH"
export PATH="$HOME/.local/bin:$PATH"
# xdg data & config
if [ -z "$XDG_DATA_HOME" ]; then
export XDG_DATA_HOME="$HOME/.local/share"
fi
mkdir -p "$XDG_DATA_HOME"
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME="$HOME/.config"
fi
mkdir -p "$XDG_CONFIG_HOME"
# xdg data & config
if [ -z "$XDG_DATA_HOME" ]; then
export XDG_DATA_HOME="$HOME/.local/share"
fi
mkdir -p "$XDG_DATA_HOME"
if [ -z "$XDG_CONFIG_HOME" ]; then
export XDG_CONFIG_HOME="$HOME/.config"
fi
mkdir -p "$XDG_CONFIG_HOME"
# workspace
if [ -z "$WORKSPACE" ]; then
export WORKSPACE="$HOME/workspace"
fi
mkdir -p "$WORKSPACE"
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
export PATH="$PYENV_ROOT/shims:$PATH"
if [ -d "$PYENV_ROOT" ]; then
[ -x "$(command -v pyenv)" ] && eval "$(pyenv init -)"
fi
# poetry
export POETRY_ROOT="$HOME/.poetry"
export PATH="$POETRY_ROOT/bin:$PATH"
# nvm
if [ -z "$NVM_DIR" ]; then
export NVM_DIR="$HOME/.nvm"
fi
mkdir -p "$NVM_DIR"
export PATH="$NVM_DIR/bin:$PATH"
# yarn
export YARN_DIR="$HOME/.yarn"
mkdir -p "$YARN_DIR"
export PATH="$YARN_DIR/bin:$PATH"
# workspace
if [ -z "$WORKSPACE" ]; then
export WORKSPACE="$HOME/workspace"
fi
mkdir -p "$WORKSPACE"
# dotfiles
if [ -z "$DOTFILES" ]; then
export DOTFILES="$HOME/.dotfiles"
fi
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
export PATH="$PYENV_ROOT/shims:$PATH"
if [ -d "$PYENV_ROOT" ]; then
[ -x "$(command -v pyenv)" ] && eval "$(pyenv init -)"
fi
# poetry
export POETRY_ROOT="$HOME/.poetry"
export PATH="$POETRY_ROOT/bin:$PATH"
# nvm
if [ -z "$NVM_DIR" ]; then
export NVM_DIR="$HOME/.nvm"
fi
mkdir -p "$NVM_DIR"
export PATH="$NVM_DIR/bin:$PATH"
# yarn
export YARN_DIR="$HOME/.yarn"
mkdir -p "$YARN_DIR"
export PATH="$YARN_DIR/bin:$PATH"
# editor
export EDITOR="nvim"
export VISUAL="nvim"
# fzf
export FZF_DEFAULT_OPTS="--reverse --margin=1,5%"
export FZF_DEFAULT_COMMAND='fdfind --type f --hidden --follow --exclude .git'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
export FZF_COMPLETION_TRIGGER='**'
# do not use fishlogin for subshells
export SHELL=/bin/sh
# _ _ _ ____
# U /"\ u |"| ___ U /"\ u / __"| u
# \/ _ \/ U | | u |_"_| \/ _ \/ <\___ \/
# / ___ \ \| |/__ | | / ___ \ u___) |
# /_/ \_\ |_____| U/| |\u /_/ \_\ |____/>>
# \\ >> // \\.-,_|___|_,-.\\ >> )( (__)
# (__) (__)(_")("_)\_)-' '-(_/(__) (__)(__)
#
alias vim='nvim'
alias vi='vim'
alias bat='batcat'
alias cat='bat'
alias j="z"

View File

@@ -1,6 +1,7 @@
apt-transport-https
bat
curl
fdfind
git
gnupg2
jq

View File

@@ -26,7 +26,7 @@ if not_installed "fishlogin"; then
mkdir -p ~/bin
target="$HOME/bin/fishlogin"
tee -a $target << END
#!/bin/bash -l
#!/bin/bash
exec -l fish "\$@"
END
sudo chmod +x $target

View File

@@ -15,5 +15,5 @@ npm install -g neovim elm-format
sudo gem install neovim
echo "Running PlugInstall";
nvim --headless +PlugInstall +PlugUpgrade +PlugUpdate +qall
nvim --headless +PlugClean! +PlugInstall +PlugUpgrade +PlugUpdate +qall
nvim --version

View File

@@ -4,7 +4,7 @@
#
from distutils.spawn import find_executable
from typing import List
from subprocess import run, CalledProcessError
from subprocess import run
import pytest
@@ -26,7 +26,7 @@ def in_shell_path(shell: str, binary: str) -> bool:
try:
result = run(command, shell=True)
return (result.returncode == 0)
except:
except Exception:
return False
@@ -49,7 +49,9 @@ binaries: List[str] = [
"nvim",
"firebase",
"aws",
"gcloud",
"terraform",
"kubectl",
"docker",
"docker-compose",
"screenfetch",
@@ -65,13 +67,19 @@ binaries: List[str] = [
"node",
"npm",
"yarn",
"elm",
# "elm",
# language: java
"java",
# langauge: ruby
"ruby"
]
# ---------------------------------------------------------------------------- #
# Tests
# ---------------------------------------------------------------------------- #
# --------------------------------------------------------------------------- #
# Tests
# --------------------------------------------------------------------------- #
@pytest.mark.parametrize("shell", shells)
def test_shells(shell: str):
""" Assert all shells we expect are in PATH. """