182 lines
5.3 KiB
VimL
182 lines
5.3 KiB
VimL
call plug#begin('~/.config/nvim/plugged')
|
|
" Language Tools
|
|
Plug 'hrsh7th/nvim-compe'
|
|
Plug 'neovim/nvim-lspconfig'
|
|
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
|
|
Plug 'junegunn/fzf.vim'
|
|
Plug 'SirVer/ultisnips'
|
|
Plug 'luochen1990/rainbow'
|
|
" Plug 'enomsg/vim-haskellConcealPlus' " This one isn't always good.
|
|
|
|
" Languages
|
|
Plug 'evanleck/vim-svelte'
|
|
Plug 'LnL7/vim-nix'
|
|
Plug 'whonore/Coqtail'
|
|
Plug 'wlangstroth/vim-racket'
|
|
Plug 'lervag/vimtex'
|
|
Plug 'idris-hackers/idris-vim'
|
|
Plug 'rhysd/vim-crystal'
|
|
Plug 'elmcast/elm-vim'
|
|
Plug 'ap/vim-css-color'
|
|
Plug 'vim-scripts/avrasm.vim'
|
|
Plug 'idris-hackers/idris-vim'
|
|
Plug 'elixir-editors/vim-elixir'
|
|
Plug 'guersam/vim-j'
|
|
Plug 'wlangstroth/vim-racket'
|
|
Plug 'derekelkins/agda-vim'
|
|
Plug 'ftorres16/spice.vim'
|
|
Plug 'vmware/differential-datalog', {'rtp': 'tools/vim'}
|
|
Plug 'FStarLang/VimFStar', {'for': 'fstar'}
|
|
Plug 'purescript-contrib/purescript-vim'
|
|
" Plug '~/Documents/software/chapel/highlight/vim'
|
|
" Plug 'ashinkarov/nvim-agda'
|
|
|
|
" Themes
|
|
Plug 'arcticicestudio/nord-vim'
|
|
|
|
" Editing Tools
|
|
Plug 'junegunn/goyo.vim'
|
|
Plug 'iamcco/markdown-preview.vim'
|
|
Plug 'junegunn/limelight.vim'
|
|
Plug 'luochen1990/rainbow'
|
|
Plug 'simrat39/symbols-outline.nvim'
|
|
Plug 'folke/todo-comments.nvim'
|
|
|
|
" Misc
|
|
Plug 'uga-rosa/utf8.nvim'
|
|
Plug 'nvim-lua/plenary.nvim'
|
|
Plug 'airblade/vim-gitgutter'
|
|
Plug 'f-person/git-blame.nvim'
|
|
Plug 'wakatime/vim-wakatime'
|
|
call plug#end()
|
|
|
|
set exrc " Execute local vimscripts
|
|
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
|
|
set guifont=Iosevka:h35 " Use Ioeska in frontends.
|
|
set hidden
|
|
|
|
autocmd ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
|
|
autocmd ColorScheme * highlight Comment ctermfg=green
|
|
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/ " Highlight trailing whitespace
|
|
autocmd BufRead,BufNewFile *.v set filetype=coq " Coq is not Verilog
|
|
autocmd BufNewFile,BufRead *.cir set filetype=spice " LTSpice is Spice
|
|
autocmd BufRead,BufNewFile *.dl set filetype=dl " Datalog is Datalog
|
|
autocmd FileType crystal setlocal shiftwidth=2 " Crystal likes 2-wide indent
|
|
autocmd FileType cpp setlocal shiftwidth=2 " Chapel has two-wide indents
|
|
autocmd BufRead,BufNewFile *.ast set filetype=ast " AST files are from Chapel.
|
|
|
|
" Settings for Rainbow
|
|
let g:rainbow_active = 1
|
|
|
|
" Settings for Limelight
|
|
let g:limelight_conceal_ctermfg = 8
|
|
|
|
" Settings for Vim's LaTeX plugin
|
|
let g:tex_flavor = 'latex'
|
|
let g:vimtex_quickfix_open_on_warning = 0
|
|
let g:vimtex_view_general_viewer = 'okular'
|
|
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
|
|
|
|
" 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
|
|
|
|
lua require('lspconfig').hls.setup{}
|
|
lua require('lspconfig').rls.setup{}
|
|
lua require('lspconfig').clangd.setup{}
|
|
lua require('lspconfig').tsserver.setup{}
|
|
lua require('lspconfig').elmls.setup{}
|
|
lua require('lspconfig').pylsp.setup{}
|
|
lua require('lspconfig').purescriptls.setup{}
|
|
lua require('lspconfig').pyright.setup{}
|
|
|
|
" All these language servers can be used for symbols-outline
|
|
lua require("symbols-outline").setup()
|
|
|
|
" nmap <silent>K <Plug>(lcn-menu)
|
|
nmap <silent>M <cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>
|
|
nmap <silent>? <cmd>lua vim.lsp.buf.hover()<CR>
|
|
nmap <silent>K <cmd>lua vim.lsp.buf.rename()<CR>
|
|
nmap <silent><space>d <cmd>lua vim.lsp.buf.definition()<CR>
|
|
nmap <silent><space>D <cmd>lua vim.lsp.buf.declaration()<CR>
|
|
nmap <silent><space>i <cmd>lua vim.lsp.buf.implementation()<CR>
|
|
nmap <silent><space>r <cmd>lua vim.lsp.buf.references()<CR>
|
|
|
|
" Ctrl-e to open file in new tab (or jump to it)
|
|
nmap <c-e> :Files<CR>
|
|
|
|
" Autocompletion
|
|
set completeopt=menuone,noselect
|
|
let g:compe = {}
|
|
let g:compe.enabled = v:true
|
|
let g:compe.source = {
|
|
\ 'path': v:true,
|
|
\ 'buffer': v:true,
|
|
\ 'nvim_lsp': v:true,
|
|
\ }
|
|
|
|
" Highlight 80th column
|
|
let &colorcolumn="80,".join(range(120,999),",")
|
|
|
|
" Racket settings
|
|
au BufReadPost *.rkt,*.rktl set filetype=racket
|
|
au filetype racket set lisp
|
|
au filetype racket set autoindent
|
|
|
|
" Coq Settings
|
|
function! g:CoqtailHighlight()
|
|
hi default link CoqtailChecked Visual
|
|
hi default link CoqtailSent PmenuSel
|
|
endfunction
|
|
|
|
lua << EOF
|
|
require("todo-comments").setup {
|
|
search = { command = "ag", },
|
|
}
|
|
EOF
|
|
|
|
lua << EOF
|
|
local lspconfig = require 'lspconfig'
|
|
local configs = require 'lspconfig.configs'
|
|
local util = require 'lspconfig.util'
|
|
|
|
configs.chplcheck = {
|
|
default_config = {
|
|
cmd = {"chplcheck", "--lsp", "--enable-rule", "UnusedFormal", "--enable-rule", "UnusedLoopIndex"},
|
|
filetypes = {'chpl'},
|
|
autostart = true,
|
|
single_file_support = true,
|
|
root_dir = util.find_git_ancestor,
|
|
settings = {},
|
|
},
|
|
}
|
|
|
|
configs.chpllsp = {
|
|
default_config = {
|
|
cmd = {"/Users/daniel.fedorin/Documents/software/chapel/tools/chpl-language-server/chpl-language-server", "--resolver"},
|
|
filetypes = {'chpl'},
|
|
autostart = true,
|
|
single_file_support = true,
|
|
root_dir = util.find_git_ancestor,
|
|
settings = {},
|
|
},
|
|
}
|
|
|
|
lspconfig.chplcheck.setup{}
|
|
lspconfig.chpllsp.setup{}
|
|
vim.cmd("autocmd BufRead,BufNewFile *.chpl set filetype=chpl")
|
|
EOF
|