Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeCollierRentalcars committed Jan 18, 2019
1 parent bf3dda4 commit b2f09d5
Show file tree
Hide file tree
Showing 4 changed files with 393 additions and 0 deletions.
213 changes: 213 additions & 0 deletions neovim/init.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')

" visual plugins
Plug 'sheerun/vim-wombat-scheme'
" Show parameter doc.
Plug 'Shougo/echodoc.vim'

"Search
Plug 'wincent/ferret'

" editorconfig
Plug 'editorconfig/editorconfig-vim'

" Dev icons
Plug 'ryanoasis/vim-devicons'

" Or, if using Vim-Plug
Plug 'reasonml-editor/vim-reason-plus'

" Coment out yo
Plug 'tpope/vim-commentary'

" Linter
Plug 'w0rp/ale'

" elixir plugins
Plug 'slashmili/alchemist.vim', {'for': 'elixir'}
Plug 'elixir-lang/vim-elixir', {'for': 'elixir'}
Plug 'mattreduce/vim-mix', {'for': 'elixir'}

" Rust plugins
Plug 'sebastianmarkow/deoplete-rust', {'for': 'rust'}

" Elm plugins
Plug 'elmcast/elm-vim', {'for': 'elm'}
Plug 'pbogut/deoplete-elm', {'for': 'elm'}

" Scala
Plug 'derekwyatt/vim-scala', {'for': 'scala'}

" Kotlin
Plug 'udalov/kotlin-vim', {'for': 'kotlin'}

" functionality plugins
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug '/usr/local/opt/fzf'
Plug 'mbbill/undotree'
Plug 'tpope/vim-surround'

" Git
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-fugitive'
Plug 'shumphrey/fugitive-gitlab.vim'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'airblade/vim-gitgutter'

" Tmux linking plugins
Plug 'christoomey/vim-tmux-navigator'
Plug 'roxma/vim-tmux-clipboard'
Plug 'tmux-plugins/vim-tmux-focus-events'

" Distraction free
Plug 'junegunn/goyo.vim'

" Language client
Plug 'natebosch/vim-lsc'

" Tsx
Plug 'ianks/vim-tsx'
Plug 'leafgarland/typescript-vim'

" Numbers
Plug 'myusuf3/numbers.vim'

" End plug system
call plug#end()

" Enable deoplete (my favourite autocomplete)
let g:deoplete#enable_at_startup = 1

" Enable persistent undo
if has("persistent_undo")
set undodir=~/.undodir/
set undofile
endif

" File Types
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript

" Vim stuff
syntax on
filetype plugin indent on
set hlsearch
set smartcase
set number
set relativenumber
set cursorline
set t_Co=256
if has("nvim")
set termguicolors
endif
colorscheme wombat


" Ale (linter)
let g:ale_lint_on_text_changed = 'never'
let g:ale_sign_column_always = 1
let g:ale_lint_on_enter = 1
let g:ale_sign_error = 'X'
let g:ale_sign_warning = '!'
let g:ale_echo_msg_error_str = ''
let g:ale_echo_msg_warning_str = ''
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'

set hidden
set foldmethod=syntax
set foldlevelstart=20

" Language server
let g:lsc_enable_autocomplete = v:false
let g:lsc_server_commands = {
\ 'reason': 'ocaml-language-server --stdio',
\ 'scala': 'metals-vim',
\ 'ocaml': 'ocaml-language-server --stdio',
\ 'javascript': 'javascript-typescript-stdio',
\ 'typescript': 'javascript-typescript-stdio',
\ 'rust': '~/.cargo/bin/rustup run nigthly rls',
\ 'python': '/usr/local/bin/pyls',
\ 'scss': 'css-languageserver --stdio',
\ 'css': 'css-languageserver --stdio',
\ }

" language server defaults are:
let g:lsc_auto_map = {
\ 'GoToDefinition': '<C-]>',
\ 'FindReferences': 'gr',
\ 'NextReference': '<C-n>',
\ 'PreviousReference': '<C-p>',
\ 'FindImplementations': 'gI',
\ 'FindCodeActions': 'ga',
\ 'DocumentSymbol': 'go',
\ 'WorkspaceSymbol': 'gS',
\ 'ShowHover': 'v:true',
\ 'SignatureHelp': '<C-m>',
\ 'Completion': 'completefunc',
\}

" Nerd Tree Git Symbols
let g:NERDTreeIndicatorMapCustom = {
\ "Modified" : "",
\ "Staged" : "",
\ "Untracked" : "",
\ "Renamed" : "",
\ "Unmerged" : "",
\ "Deleted" : "",
\ "Dirty" : "",
\ "Clean" : "",
\ 'Ignored' : '',
\ "Unknown" : ""
\ }

" have a colour column
let &colorcolumn=join(range(92,200),",")

" Dev icons extentions
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols = {} " needed
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['ex'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['exs'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['pot'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['lock'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['re'] = ''
let g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols['conf'] = ''

" Disable Arrow keys in Escape mode
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
" Disable Arrow keys in Insert mode
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
" Nerd tree bindings
map <C-n> :NERDTreeToggle<CR>
map <F5> :UndotreeToggle<cr>
nmap <F8> :TagbarToggle<CR>
" Always draw the signcolumn.
set signcolumn=yes
set cmdheight=2

" Indentation
filetype plugin indent on
set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab

let g:elm_format_autosave = 0

" make e and E bit more sound
set sidescroll=1
set sidescrolloff=3

" Preview replacement commands live
:set inccommand=nosplit

" For gbrowse in gitlab
let g:fugitive_gitlab_domains = ['https://scm.server.traveljigsaw.com']
118 changes: 118 additions & 0 deletions tmux/.tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# enable system clipboard for macosx
set-option -g default-command "reattach-to-user-namespace -l $SHELL"

# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

# Autosave
set -g @continuum-restore 'on'

# Start window numbering at 1
set -g base-index 1
setw -g pane-base-index 1

# Act like Vim
set-window-option -g mode-keys vi
list-keys -T copy-mode-vi
bind-key -T copy-mode-vi 'v' send -X begin-selection # Begin selection in copy mode.
bind-key -T copy-mode-vi 'C-v' send -X rectangle-toggle # Begin selection in copy mode.
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
bind P paste-buffer
set -g mouse on

bind-key b set-window-option synchronize-panes

bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R

# Vim splits
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
bind-key -T copy-mode-vi C-h select-pane -L
bind-key -T copy-mode-vi C-j select-pane -D
bind-key -T copy-mode-vi C-k select-pane -U
bind-key -T copy-mode-vi C-l select-pane -R
bind-key -T copy-mode-vi C-\ select-pane -l

# Share paste-buffer with vim
set -g focus-events on

# Status line
# Highlight active window
set-window-option -g window-status-current-fg colour2

# Set background window
set -g status-bg colour0
set -g status-fg white

# Shows computer name, turns yellow when prefix is used
set -g status-left-length 80
set -g status-left "#[bg=black]#{?client_prefix,#[fg=yellow],#[fg=red]} _ "

set -g status-right-length 80
set -g status-right "#[fg=green]#[bg=black]#[fg=red] #{battery_icon} #{battery_percentage} | %a %d-%m-%y | %h | %H:%M:%S "

# Reload tmux conf
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"

set -g @batt_charged_icon ""
set -g @batt_charging_icon ""
set -g @batt_attached_icon ""
set -g @batt_full_charge_icon ""
set -g @batt_high_charge_icon ""
set -g @batt_medium_charge_icon ""
set -g @batt_low_charge_icon ""

# Give 256 colours
set -g default-terminal "screen-256color"

# Stop tmux waiting for escape seqeuence
set -s escape-time 0

# Refresh left and right more often
set -g status-interval 5
set -g display-time 4000
set -g history-limit 50000
# setw -g aggressive-resize on

#set inactive/active window styles
set -g window-style 'fg=colour247,bg=colour236'
set -g window-active-style 'fg=white,bg=black'

# set the pane border colors
set -g pane-border-fg colour250
set -g pane-border-bg colour236
set -g pane-active-border-fg green
set -g pane-active-border-bg colour236

# search
set -g @open-B 'https://www.google.com/search?q='

# Renumber windows
set-option -g renumber-windows on
setw -g xterm-keys on

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-urlview'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'jbnicolai/tmux-fpp'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
61 changes: 61 additions & 0 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH=/Users/collierl/.oh-my-zsh

# Set's the zsh theme to agnoster
export TERM='screen-256color'

# Elite hackor vim mode
bindkey -v

# Sources zsh
source $ZSH/oh-my-zsh.sh

# Add's auto suggestions and auto jump
[ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh

# Set the default edtior
export EDITOR="nvim"

# Set maven home
export M2_HOME="/Users/collierl"

# Cargo path
export PATH="$HOME/.cargo/bin:$PATH"

# Fuzzy search
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# tabtab source for yarn package
export ZPLUG_HOME=/usr/local/opt/zplug
source $ZPLUG_HOME/init.zsh

zplug "zsh-users/zsh-autosuggestions"

# Supports oh-my-zsh plugins and the like
zplug 'LukeCollier/zsh-theme', as:theme
zplug "plugins/git", from:oh-my-zsh
zplug "plugins/osx", from:oh-my-zsh
zplug "plugins/zsh-256color", from:oh-my-zsh
zplug "g-plane/zsh-yarn-autocompletions", hook-build:"./zplug.zsh", defer:2
zplug "zsh-users/zsh-syntax-highlighting", defer:2

# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi

# Then, source plugins and add commands to $PATH
zplug load # --verbose

ZSH_THEME="collier"

export NVM_DIR="$HOME/.nvm"
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" # This loads nvm bash_completion

1 change: 1 addition & 0 deletions zsh/theme
Submodule theme added at 6bfc02

0 comments on commit b2f09d5

Please sign in to comment.