dotfiles/nvim/.config/nvim/init.vim

93 lines
3.1 KiB
VimL
Raw Normal View History

2018-07-19 22:59:13 -07:00
call plug#begin('~/.config/nvim/plugged')
2020-06-01 15:20:27 -07:00
" Language Tools
Plug 'roxma/nvim-yarp' " For language client
Plug 'ncm2/ncm2' " For language client
2018-07-19 22:59:13 -07:00
Plug 'autozimu/LanguageClient-neovim', {'branch': 'next', 'do': 'bash install.sh' }
2019-04-22 22:11:05 -07:00
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
2020-05-06 00:34:55 -07:00
Plug 'SirVer/ultisnips'
2020-09-04 23:01:51 -07:00
Plug 'luochen1990/rainbow'
" Plug 'enomsg/vim-haskellConcealPlus' " This one isn't always good.
2018-07-19 22:59:13 -07:00
2020-06-01 15:20:27 -07:00
" Languages
2020-09-04 23:01:51 -07:00
Plug 'whonore/Coqtail'
Plug 'wlangstroth/vim-racket'
2019-04-22 22:11:05 -07:00
Plug 'lervag/vimtex'
2020-05-06 00:34:55 -07:00
Plug 'idris-hackers/idris-vim'
2018-07-19 22:59:13 -07:00
Plug 'rhysd/vim-crystal'
Plug 'elmcast/elm-vim'
2019-01-11 21:11:20 -08:00
Plug 'ap/vim-css-color'
2019-03-13 17:25:06 -07:00
Plug 'vim-scripts/avrasm.vim'
2020-06-01 15:20:27 -07:00
Plug 'idris-hackers/idris-vim'
2018-07-19 22:59:13 -07:00
2020-06-01 15:20:27 -07:00
" Themes
2018-07-19 22:59:13 -07:00
Plug 'arcticicestudio/nord-vim'
2020-06-01 15:20:27 -07:00
" Editing Tools
2020-05-06 00:41:32 -07:00
Plug 'junegunn/goyo.vim'
2018-10-12 13:34:53 -07:00
Plug 'iamcco/markdown-preview.vim'
2020-05-06 00:41:32 -07:00
Plug 'junegunn/limelight.vim'
2018-07-19 22:59:13 -07:00
call plug#end()
2019-04-22 22:11:05 -07:00
set exrc " Execute local vimscripts
2019-01-11 21:11:20 -08:00
set shiftwidth=4 " Make indents 4 chars wide
set expandtab " Expand tabs into spaces
set number " Set line numbers
set mouse=a " Allow mouse
set signcolumn=yes " Always show extra column
2020-09-04 23:01:51 -07:00
set guifont=Iosevka " Use Ioeska in frontends.
2019-01-11 21:11:20 -08:00
autocmd BufEnter * call ncm2#enable_for_buffer() " Enable ncm2 for all buffers
2019-03-13 17:25:58 -07:00
autocmd BufRead,BufNewFile *.v set filetype=coq " Coq is not Verilog
autocmd FileType crystal setlocal shiftwidth=2 " Crystal likes 2-wide indent
2019-01-11 21:11:20 -08:00
2019-03-13 17:25:58 -07:00
set completeopt=noinsert,menuone
2018-07-19 22:59:13 -07:00
2020-09-04 23:01:51 -07:00
colorscheme nord
let g:limelight_conceal_ctermfg = 8
let g:tex_flavor = 'latex'
" Language Client settings
let g:rainbow_active = 1
2020-06-01 15:20:27 -07:00
let g:LanguageClient_hasSnippetSupport = 0
2018-07-19 22:59:13 -07:00
let g:LanguageClient_serverCommands = {
2020-06-01 15:20:27 -07:00
\ 'haskell': ['ghcide', '--lsp'],
2018-07-19 22:59:13 -07:00
\ 'rust': ['rustup', 'run', 'stable', 'rls'],
\ 'c': ['clangd'],
2018-07-19 22:59:13 -07:00
\ 'crystal': ['scry'],
\ 'cpp': ['clangd'],
2019-06-20 20:14:20 -07:00
\ 'javascript': ['javascript-typescript-stdio'],
\ 'elm': ['elm-language-server', '--stdio'],
\ 'python': ['python', '-m', 'pyls']
2018-07-19 22:59:13 -07:00
\ }
let g:deoplete#enable_at_startup = 1
let g:LanguageClient_diagnosticsDisplay = {
\ 1: {"name": "Error","texthl": "ALEError","signText": ">>","signTexthl": "ALEErrorSign",},
\ 2: {"name": "Warning","texthl": "ALEWarning","signText": ">>","signTexthl": "ALEWarningSign",},
\ 3: {"name": "Information","texthl": "ALEInfo","signText": ">>","signTexthl": "ALEInfoSign",},
\ 4: {"name": "Hint","texthl": "ALEInfo","signText": ">>","signTexthl": "ALEInfoSign",},}
let g:LanguageClient_rootMarkers = {
\ 'haskell': ['.git'],
2019-06-20 20:14:20 -07:00
\ 'elm': ['elm.json'],
\ }
2020-09-04 23:01:51 -07:00
nmap M :call LanguageClient#explainErrorAtPoint()<CR>
nmap K :call LanguageClient_contextMenu()<CR>
nmap ? :call LanguageClient#textDocument_hover()<CR>
2020-09-04 23:01:51 -07:00
" UltiSnips settings
2020-05-06 00:34:55 -07:00
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-k>"
let g:UltiSnipsJumpBackwardTrigger="<c-j>"
2020-09-04 23:01:51 -07:00
" Racket settings
au BufReadPost *.rkt,*.rktl set filetype=racket
au filetype racket set lisp
au filetype racket set autoindent
2020-06-01 15:20:27 -07:00
2020-09-04 23:01:51 -07:00
" Coq Settings
function! g:CoqtailHighlight()
hi def link CoqtailChecked Visual
hi def link CoqtailSent PmenuSel
endfunction