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

120 lines
3.8 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
2021-04-06 23:06:59 -07:00
Plug 'autozimu/LanguageClient-neovim', {'branch': '0.1.159', '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
2021-04-06 23:06:59 -07:00
Plug 'LnL7/vim-nix'
Plug 'whonore/Coqtail'
2020-09-04 23:01:51 -07:00
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'
2021-04-06 23:06:59 -07:00
Plug 'elixir-editors/vim-elixir'
Plug 'guersam/vim-j'
Plug 'wlangstroth/vim-racket'
Plug 'derekelkins/agda-vim'
Plug 'ftorres16/spice.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'
2021-04-06 23:06:59 -07:00
Plug 'luochen1990/rainbow'
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.
2021-04-06 23:06:59 -07:00
set hidden
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
2021-04-06 23:06:59 -07:00
autocmd BufNewFile,BufRead *.cir set filetype=spice " LTSpice is Spice
2019-03-13 17:25:58 -07:00
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
" Settings for Rainbow
2021-04-06 23:06:59 -07:00
let g:rainbow_active = 1
2020-09-04 23:01:51 -07:00
" Settings for Limelight
2020-09-04 23:01:51 -07:00
let g:limelight_conceal_ctermfg = 8
" Settings for Vim's LaTeX plugin
2020-09-04 23:01:51 -07:00
let g:tex_flavor = 'latex'
" Settings for deoplete
let g:deoplete#enable_at_startup = 1
" Settings for UltiSnips
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-k>"
let g:UltiSnipsJumpBackwardTrigger="<c-j>"
" Settings for FZF
let g:fzf_action = { 'enter': 'tab drop' }
" Settings for Neovide
let g:neovide_cursor_vfx_mode="ripple"
colorscheme nord
2020-09-04 23:01:51 -07:00
" Language Client settings
2021-04-06 23:06:59 -07:00
let g:LanguageClient_selectionUI = "fzf"
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 = {
2021-04-06 23:06:59 -07:00
\ 'haskell': ['haskell-language-server-wrapper', '--lsp'],
\ 'rust': ['rls'],
\ 'c': ['clangd'],
\ 'crystal': ['/home/vanilla/software/crystalline/crystalline'],
\ 'cpp': ['clangd'],
\ 'javascript': ['javascript-typescript-stdio'],
\ 'elm': ['elm-language-server', '--stdio'],
\ 'python': ['python', '-m', 'pyls'],
\ 'elixir': ['/home/vanilla/software/elixir-ls/language_server.sh']
\ }
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'],
2021-04-06 23:06:59 -07:00
\ 'crystal': ['.git'],
2019-06-20 20:14:20 -07:00
\ 'elm': ['elm.json'],
\ }
2021-04-06 23:06:59 -07:00
nmap <c-e> :Files<CR>
nmap <silent>K <Plug>(lcn-menu)
nmap <silent>M <Plug>(lcn-explain-error)
nmap <silent>? <Plug>(lcn-hover)
2020-06-01 15:20:27 -07:00
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
2021-04-06 23:06:59 -07:00
function! g:CoqtailHighlight()
hi default link CoqtailChecked Visual
hi default link CoqtailSent PmenuSel
endfunction