236 lines
5.6 KiB
VimL
236 lines
5.6 KiB
VimL
let plug_install = 0
|
|
let autoload_plug_path = stdpath('config') . '/autoload/plug.vim'
|
|
|
|
if !filereadable(autoload_plug_path)
|
|
silent exe '!curl -fL --create-dirs -o ' . autoload_plug_path .
|
|
\ ' https://raw.github.com/junegunn/vim-plug/master/plug.vim'
|
|
execute 'source ' . fnameescape(autoload_plug_path)
|
|
let plug_install = 1
|
|
endif
|
|
unlet autoload_plug_path
|
|
|
|
call plug#begin('~/.config/nvim/plugins')
|
|
|
|
" Code development helpers {{{
|
|
Plug 'neovim/nvim-lspconfig'
|
|
"Plug 'ray-x/lsp_signature.nvim'
|
|
Plug 'RRethy/vim-illuminate'
|
|
|
|
" main one
|
|
Plug 'ms-jpq/coq_nvim', {'branch': 'coq'}
|
|
" 9000+ Snippets
|
|
Plug 'ms-jpq/coq.artifacts', {'branch': 'artifacts'}
|
|
Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'}
|
|
|
|
"Plug 'dbeniamine/cheat.sh-vim'
|
|
Plug 'puremourning/vimspector'
|
|
"Plug 'vim-test/vim-test'
|
|
Plug 'lukas-reineke/indent-blankline.nvim'
|
|
Plug 'liuchengxu/vista.vim'
|
|
|
|
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
|
|
Plug 'nvim-treesitter/playground'
|
|
Plug 'p00f/nvim-ts-rainbow'
|
|
Plug 'nvim-treesitter/nvim-treesitter-textobjects'
|
|
Plug 'romgrk/nvim-treesitter-context'
|
|
|
|
Plug 'cdelledonne/vim-cmake'
|
|
|
|
Plug 'andymass/vim-matchup'
|
|
" }}}
|
|
|
|
" Completion {{{
|
|
Plug 'hrsh7th/nvim-cmp'
|
|
Plug 'hrsh7th/cmp-nvim-lsp'
|
|
Plug 'hrsh7th/cmp-buffer'
|
|
Plug 'hrsh7th/cmp-path'
|
|
Plug 'hrsh7th/cmp-cmdline'
|
|
Plug 'hrsh7th/cmp-calc'
|
|
Plug 'joshzcold/cmp-jenkinsfile'
|
|
Plug 'petertriho/cmp-git'
|
|
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
|
|
Plug 'quangnguyen30192/cmp-nvim-ultisnips'
|
|
" }}}
|
|
|
|
" Files switch, jump and grep-like tools {{{
|
|
Plug 'kyazdani42/nvim-web-devicons' " for file icons
|
|
Plug 'kyazdani42/nvim-tree.lua'
|
|
Plug 'derekwyatt/vim-fswitch'
|
|
"Plug 'junegunn/fzf' | Plug 'junegunn/fzf.vim'
|
|
Plug 'nvim-lua/popup.nvim'
|
|
Plug 'nvim-lua/plenary.nvim'
|
|
Plug 'nvim-telescope/telescope.nvim'
|
|
Plug 'fhill2/telescope-ultisnips.nvim'
|
|
Plug 'inside/vim-search-pulse'
|
|
Plug 'wellle/targets.vim'
|
|
"Plug 'voldikss/vim-floaterm'
|
|
"Plug 'kevinhwang91/nvim-hlslens'
|
|
"Plug 'camspiers/lens.vim'
|
|
"Plug 'karb94/neoscroll.nvim'
|
|
" }}}
|
|
|
|
" Git integration {{{
|
|
Plug 'tpope/vim-fugitive'
|
|
Plug 'APZelos/blamer.nvim'
|
|
Plug 'lewis6991/gitsigns.nvim'
|
|
" }}}
|
|
|
|
" Support for random filetypes {{{
|
|
"Plug 'weirongxu/plantuml-previewer.vim' |
|
|
Plug 'kergoth/vim-bitbake' " Bitbake templates and syntax
|
|
Plug 'aklt/plantuml-syntax'
|
|
Plug 'iamcco/markdown-preview.nvim', { 'do': { -> mkdp#util#install() }, 'for': ['markdown', 'vim-plug']}
|
|
"Plug 'vim-pandoc/vim-pandoc'
|
|
Plug 'chrisbra/csv.vim'
|
|
" }}}
|
|
|
|
" Other plugins (external tools, etc) {{{
|
|
"Plug 'MortenStabenau/matlab-vim'
|
|
Plug 'junegunn/goyo.vim'
|
|
Plug 'lukas-reineke/virt-column.nvim'
|
|
"Plug 'jez/vim-superman' "vman application
|
|
Plug 'glacambre/firenvim'
|
|
"Plug 'JMcKiern/vim-shoot'
|
|
Plug 'mrjones2014/legendary.nvim'
|
|
" }}}
|
|
|
|
" Note taking {{{
|
|
Plug 'vimwiki/vimwiki'
|
|
Plug 'michal-h21/vimwiki-sync'
|
|
"Plug 'michal-h21/vim-zettel'
|
|
" }}}
|
|
|
|
" Colorschemes {{{
|
|
Plug 'vim-airline/vim-airline' | Plug 'vim-airline/vim-airline-themes'
|
|
"Plug 'jaredgorski/spacecamp'
|
|
"Plug 'lifepillar/vim-gruvbox8'
|
|
Plug 'dylanaraps/wal'
|
|
"Plug 'tanvirtin/monokai.nvim'
|
|
Plug 'marko-cerovac/material.nvim'
|
|
" }}}
|
|
"
|
|
call plug#end()
|
|
|
|
set termguicolors
|
|
set shell=bash
|
|
|
|
if plug_install
|
|
PlugInstall --sync
|
|
endif
|
|
unlet plug_install
|
|
|
|
set number
|
|
set clipboard+=unnamedplus
|
|
|
|
set noshowmode
|
|
set laststatus=2
|
|
|
|
lua << EOF
|
|
require("virt-column").setup { }
|
|
EOF
|
|
set colorcolumn=80
|
|
|
|
set background=dark
|
|
"colorscheme wal
|
|
let g:material_style = "deep ocean"
|
|
colorscheme material
|
|
"highlight MatchParen cterm=underline ctermbg=black ctermfg=NONE
|
|
"highlight VirtColumn ctermfg=DarkGrey ctermbg=NONE
|
|
set listchars=tab:▸\ ,trail:¬
|
|
set list
|
|
"hi clear SpellBad
|
|
"hi SpellBad cterm=underline
|
|
|
|
set tabstop=2
|
|
set shiftwidth=2
|
|
set softtabstop=2
|
|
|
|
set expandtab
|
|
|
|
set ignorecase
|
|
set smartcase
|
|
|
|
set gdefault
|
|
|
|
set textwidth=80
|
|
set formatoptions+=t
|
|
set scrolloff=10
|
|
|
|
set inccommand="split"
|
|
|
|
set lazyredraw
|
|
|
|
" space one line, home,end globally increase/decrease
|
|
nnoremap <Home> zc
|
|
nnoremap <End> zo
|
|
|
|
" Ctags {{{
|
|
if isdirectory($HOME . '/.cache/nvim/tags') == 0
|
|
:silent !mkdir -p ~/.cache/nvim/tags > /dev/null 2>&1
|
|
endif
|
|
let g:gutentags_cache_dir='~/.cache/nvim/tags'
|
|
"let g:gutentags_ctags_extra_args=['--fields=+l']
|
|
|
|
if isdirectory($HOME . '/.cache/nvim/undo') == 0
|
|
:silent !mkdir -p ~/.cache/nvim/undo > /dev/null 2>&1
|
|
endif
|
|
set undodir=~/.cache/nvim/undo/
|
|
set undofile
|
|
|
|
"let mapleader = "\\"
|
|
nmap <space> <leader>
|
|
|
|
inoremap jj <ESC>
|
|
inoremap jk <ESC>
|
|
inoremap :w<CR> <Esc>:w<CR>
|
|
nnoremap Q <cmd>q
|
|
|
|
" Reselect visual block after incrementing/decrementing
|
|
vnoremap <c-a> <c-a>gv
|
|
vnoremap <c-x> <c-x>gv
|
|
|
|
nnoremap <leader>2 <esc>:set tabstop=2 softtabstop=2 shiftwidth=2<cr>
|
|
nnoremap <leader>4 <esc>:set tabstop=4 softtabstop=4 shiftwidth=4<cr>
|
|
nnoremap <leader>8 <esc>:set tabstop=8 softtabstop=8 shiftwidth=8<cr>
|
|
|
|
nnoremap <leader><space> :nohlsearch<cr>
|
|
|
|
" TextEdit might fail if hidden is not set.
|
|
set hidden
|
|
|
|
" Some servers have issues with backup files, see #649.
|
|
set nobackup
|
|
set nowritebackup
|
|
|
|
" Give more space for displaying messages.
|
|
set cmdheight=2
|
|
|
|
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
|
" delays and poor user experience.
|
|
set updatetime=300
|
|
|
|
" Don't pass messages to |ins-completion-menu|.
|
|
set shortmess+=c
|
|
set shortmess-=F
|
|
|
|
set signcolumn=number
|
|
|
|
set wildmode=longest,list,full
|
|
|
|
match Error /\s\+$\|DU\cPA/
|
|
|
|
setglobal virtualedit=block
|
|
setglobal shiftround
|
|
|
|
let g:vimwiki_list = [{'path': '~/vimwiki/',
|
|
\ 'syntax': 'markdown', 'ext': '.md'}]
|
|
|
|
let g:blamer_enabled = 1
|
|
let g:blamer_show_in_insert_modes = 0
|
|
let g:blamer_template = '<committer> <committer-time> <summary>'
|
|
let g:blamer_date_format = '%Y-%m-%d'
|
|
let g:blamer_relative_time = 0
|
|
"highlight Blamer guifg=lightgrey
|
|
|
|
"packadd termdebug
|