Created
August 26, 2020 09:43
-
-
Save jonathanknowles/d9ff5e9cdf2818539b77bf99fe345b89 to your computer and use it in GitHub Desktop.
Neovim Configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" auto-install vim-plug | |
if empty(glob('~/.config/nvim/autoload/plug.vim')) | |
silent !curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall | |
endif | |
call plug#begin('~/.config/nvim/plugged') | |
Plug 'junegunn/vim-easy-align' | |
Plug 'neomake/neomake' | |
Plug 'autozimu/LanguageClient-neovim', { | |
\ 'branch': 'next', | |
\ 'do': './install.sh', | |
\ } | |
Plug 'ctrlpvim/ctrlp.vim' | |
call plug#end() | |
let g:LanguageClient_serverCommands = { 'haskell': ['hie-wrapper'], 'lhaskell': ['hie-wrapper'] } | |
autocmd Filetype haskell setlocal ts=2 sw=2 expandtab | |
let g:netrw_banner = 0 | |
let g:netrw_browse_split = 2 | |
let g:netrw_winsize = 20 | |
let mapleader = "," | |
let &colorcolumn=join(range(81,999),",") | |
highlight ColorColumn ctermbg=235 guibg=#2c2d27 | |
" {{{ Whitespace settings | |
set nowrap " don't wrap lines | |
set tabstop=2 " a tab is two spaces | |
set shiftwidth=2 " an autoindent (with <<) is two spaces | |
set expandtab " use spaces, not tabs | |
set backspace=indent,eol,start " backspace through everything in insert mode | |
set list " Show invisible characters using listchars | |
set listchars="" " Reset the listchars | |
set listchars=tab:›\ " show tabs as lsaquos | |
set listchars+=trail:· " show trailing spaces as dots | |
set listchars+=nbsp:· " show trailing non-breaking-spaces as dots | |
set listchars+=extends:❯ " The character in the last column when the line continues right | |
set listchars+=precedes:❮ " The character in the first column when the line continues left | |
" }}} | |
" Colours | |
hi Search cterm=NONE ctermfg=white ctermbg=darkblue | |
augroup whiteSpace | |
autocmd! | |
" Before writing a buffer, remove trailing spaces, while respecting the | |
" cursor position. | |
autocmd BufWritePre * kz|:%s/\s\+$//e|'z | |
augroup end | |
nnoremap <F5> :call LanguageClient_contextMenu()<CR> | |
map <Leader>t :call LanguageClient#textDocument_hover()<CR> | |
map <Leader>g :call LanguageClient#textDocument_definition()<CR> | |
map <Leader>r :call LanguageClient#textDocument_rename()<CR> | |
map <Leader>f :call LanguageClient#textDocument_formatting()<CR> | |
map <Leader>b :call LanguageClient#textDocument_references()<CR> | |
map <Leader>a :call LanguageClient#textDocument_codeAction()<CR> | |
map <Leader>s :call LanguageClient#textDocument_documentSymbol()<CR> | |
hi link ALEError Error | |
hi Warning term=underline cterm=underline ctermfg=Yellow gui=undercurl guisp=Gold | |
hi link ALEWarning Warning | |
hi link ALEInfo SpellCap | |
set tags=tags;/,codex.tags;/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment