-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinit.vim
57 lines (49 loc) · 1.48 KB
/
init.vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
call plug#begin('~/.vim/plugged')
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'scrooloose/nerdtree'
Plug 'neovim/nvim-lspconfig'
Plug 'altercation/vim-colors-solarized'
Plug 'morhetz/gruvbox'
call plug#end()
lua << EOF
local lspconfig = require('lspconfig')
require 'lspconfig'.clangd.setup{
cmd = { "clangd", "--background-index", "--clang-tidy" },
handlers = {
["textDocument/publishDiagnostics"] = vim.lsp.with(
vim.lsp.diagnostic.on_publish_diagnostics, {
-- Disable virtual_text
virtual_text = false
}
),
},
}
EOF
let g:airline_powerline_fonts = 1
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
let g:livepreview_previewer = 'open -a Preview'
set rtp+=/opt/homebrew/opt/fzf
set backspace=indent,eol,start
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
autocmd Filetype tex setl updatetime=1
let &t_SI = "\e[6 q"
let &t_EI = "\e[2 q"
syntax enable
colorscheme gruvbox
set number
set showcmd
set relativenumber
set autoindent
set autowrite
set smartindent
set expandtab
set shiftwidth=2
set tabstop=2
set softtabstop=2
highlight Normal ctermbg=None
highlight LineNr ctermfg=DarkGrey
map <C-b> :<C-U>!g++ -O2 -DLOCAL -std=c++20 -Wall -Wextra -Wshadow -Wformat=2 -Wfloat-equal -Wconversion -Wshift-overflow -Wno-unused-result -Wno-sign-conversion %:r.cpp -o %:r<CR>
map <C-r> :<C-U>!./%:r<CR>