se nocompatible call plug#begin('~/.vim/plugged') Plug 'tpope/vim-sensible' Plug 'ntpeters/vim-better-whitespace' Plug 'nathanaelkane/vim-indent-guides' Plug 'chrisbra/Recover.vim' Plug 'Shougo/vimproc.vim' , { 'do': 'make -f make_unix.mak' } Plug 'junegunn/fzf', { 'dir': '~/.fzf' } Plug 'junegunn/fzf.vim' Plug 'ciaranm/securemodelines' Plug 'chrisbra/SudoEdit.vim' Plug 'majutsushi/tagbar' Plug 'bling/vim-airline' Plug 'tomtom/tcomment_vim' " Plug 'jalcine/cmake.vim' --slow Plug 'editorconfig/editorconfig-vim' " vim-sleuth? Plug 'kchmck/vim-coffee-script' Plug 'pangloss/vim-javascript' Plug 'mtscout6/vim-cjsx' Plug 'mxw/vim-jsx' Plug 'othree/html5.vim' Plug 'digitaltoad/vim-jade' Plug 'ledger/vim-ledger' Plug 'dag/vim2hs' " clojure Plug 'tpope/vim-leiningen' Plug 'tpope/vim-projectionist' Plug 'tpope/vim-dispatch' Plug 'tpope/vim-fireplace' Plug 'jnwhiteh/vim-golang' Plug 'Blackrush/vim-gocode' Plug 'zah/nimrod.vim' Plug 'wting/rust.vim' Plug 'cespare/vim-toml' Plug 'derekwyatt/vim-scala' Plug 'dogrover/vim-pentadactyl' Plug 'superbrothers/vim-vimperator' Plug 'idris-hackers/idris-vim' Plug 'tpope/vim-fugitive' " git integration Plug 'airblade/vim-gitgutter' Plug 'lervag/vimtex' Plug 'kana/vim-textobj-user' Plug 'kana/vim-textobj-indent' Plug 'rhysd/vim-grammarous' Plug 'tpope/vim-surround' Plug 'tpope/vim-characterize' Plug 'peterhoeg/vim-qml' Plug 'ekalinin/Dockerfile.vim' Plug 'jvoorhis/coq.vim' Plug 'LnL7/vim-nix' Plug 'urbit/hoon.vim' Plug 'ahf/twelf-syntax' Plug 'c-cube/vim-tptp' Plug 'sirtaj/vim-openscad' Plug 'nanotech/jellybeans.vim' Plug 'sonph/onehalf', { 'rtp': 'vim' } " Plug '~/dgapt', { 'rtp': 'vim' } Plug 'rickhowe/diffchar.vim' Plug 'raichoo/smt-vim' Plug 'tkztmk/vim-vala' Plug 'wlangstroth/vim-racket' Plug 'dag/vim-fish' Plug 'elixir-editors/vim-elixir' " Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } if has('nvim-0.5') Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/nvim-treesitter-textobjects' Plug 'nvim-treesitter/playground' Plug 'hrsh7th/nvim-compe' if isdirectory(expand('~/lean.nvim')) Plug '~/lean.nvim' else " Plug 'Julian/lean.nvim' Plug 'gebner/lean.nvim' endif Plug 'neovim/nvim-lspconfig' endif call plug#end() filetype plugin indent on set tw=0 expandtab ts=8 sts=2 sw=2 sm ai si set noml mls=5 " scan 5 lines for modelines syn on " enable syntax highlighting set hls " highlight search set bg=dark " dark background se foldlevel=99 set vb " turn on the "visual bell" - which is much quieter than the "audio blink" set nobackup se bs=2 set backupcopy=yes se inccommand=nosplit set mouse= set title let mapleader=" " let g:jellybeans_overrides = { \ 'background': { 'guibg': '000000' }, \ 'Normal': { 'guifg': 'ffffff' }, \} if exists('g:started_by_firenvim') set bg=light colors onehalflight else colors jellybeans endif au syntax java setl ts=4 sts=4 sw=4 au BufNewFile,BufRead *.s setl ft=tptp au BufNewFile,BufRead *.s.out setl ft=tptp au BufNewFile,BufRead *.tptp setl ft=tptp au BufNewFile,BufRead *.smt2 setl ft=smt au BufReadCmd *.epub call zip#Browse(expand("")) au BufReadCmd *.FCStd call zip#Browse(expand("")) let g:haskell_conceal = 0 call tcomment#type#Define('nix', '# %s') call tcomment#type#Define('chaskell', '-- %s') call tcomment#type#Define('vala', '// %s') call tcomment#type#Define('tptp', '%% %s') au syntax tex setl iskeyword+=: au syntax tex syn region texZone start="\\begin{clilisting}" end="\\end{clilisting}\|%stopzone\>" au syntax tex syn region texZone start="\\begin{tacticslisting}" end="\\end{tacticslisting}\|%stopzone\>" au syntax tex syn region texZone start="\\begin{tacticsoutput}" end="\\end{tacticsoutput}\|%stopzone\>" " disable annoying "file is read-only" warnings au FileChangedRO * set noreadonly nnoremap :FZF if has('nvim-0.5') lua < lua vim.lsp.buf.document_highlight() autocmd CursorMoved lua vim.lsp.buf.clear_references() augroup END ]], false) end, init_options = { semanticHighlighting = true, }, cmd = {"lean", "--server"}, }, } require('nvim-treesitter.configs').setup{ -- playground = { -- enable = true, -- disable = {}, -- updatetime = 25, -- }, -- query_linter = { -- enable = true, -- use_virtual_text = true, -- lint_events = {"BufWrite", "CursorHold"}, -- }, highlight = { enable = true }, indent = { enable = true }, textobjects = { select = { enable = true, keymaps = { ["af"] = "@function.outer", ["if"] = "@function.inner", ["ac"] = "@class.outer", ["ic"] = "@class.inner", ["aa"] = "@parameter.outer", ["ia"] = "@parameter.inner", }, }, }, } require'compe'.setup { enabled = true; autocomplete = true; debug = false; min_length = 1; preselect = 'enable'; throttle_time = 80; source_timeout = 200; incomplete_delay = 400; max_abbr_width = 100; max_kind_width = 100; max_menu_width = 100; documentation = true; source = { path = true; buffer = true; calc = true; nvim_lsp = true; nvim_lua = true; }; } EOF hi LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow hi LspReferenceText cterm=bold ctermbg=red guibg=LightYellow hi LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow hi LspDiagnosticsDefaultError cterm=bold ctermfg=Red hi LspDiagnosticsDefaultWarning cterm=bold ctermfg=Yellow hi LspDiagnosticsDefaultInformation ctermfg=Blue inoremap compe#complete() inoremap compe#confirm('') inoremap compe#close('') inoremap compe#scroll({ 'delta': +4 }) inoremap compe#scroll({ 'delta': -4 }) nnoremap gD lua vim.lsp.buf.declaration() nnoremap gd lua vim.lsp.buf.definition() nnoremap K lua vim.lsp.buf.hover() nnoremap K lua vim.lsp.diagnostic.show_line_diagnostics{show_header = false} nnoremap gi lua vim.lsp.buf.implementation() nnoremap lua vim.lsp.buf.signature_help() nnoremap wa lua vim.lsp.buf.add_workspace_folder() nnoremap wr lua vim.lsp.buf.remove_workspace_folder() nnoremap wl lua print(vim.inspect(vim.lsp.buf.list_workspace_folders())) nnoremap D lua vim.lsp.buf.type_definition() nnoremap rn lua vim.lsp.buf.rename() nnoremap ca lua vim.lsp.buf.code_action() nnoremap gr lua vim.lsp.buf.references() nnoremap e lua vim.lsp.diagnostic.show_line_diagnostics() nnoremap [d lua vim.lsp.diagnostic.goto_prev() nnoremap ]d lua vim.lsp.diagnostic.goto_next() nnoremap q lua vim.lsp.diagnostic.set_loclist() nnoremap f lua vim.lsp.buf.formatting() endif let g:tex_flavor = 'latex' let g:vimtex_compiler_progname = 'nvr' let g:vimtex_indent_enabled = 0 au syntax tex setl indentexpr= " disable vim crap: https://github.com/lervag/vimtex/issues/2007#issuecomment-808768783