|
|
|
""" General
|
|
|
|
syntax enable
|
|
|
|
set nocompatible | filetype indent plugin on | syn on
|
|
|
|
set backspace=indent,eol,start
|
|
|
|
|
|
|
|
set ruler " show current line and column
|
|
|
|
set nu rnu " show line numbers
|
|
|
|
set cc=75 " show column ruler
|
|
|
|
set ts=4
|
|
|
|
set shiftwidth=4
|
|
|
|
set expandtab
|
|
|
|
|
|
|
|
""" Colors
|
|
|
|
syntax on
|
|
|
|
colorscheme nord " !nord plugin required
|
|
|
|
|
|
|
|
""" Finding files
|
|
|
|
set path+=** " Provides tab-completion for all file-related tasks
|
|
|
|
set wildmenu " Display all mathing files when we tab complete
|
|
|
|
|
|
|
|
""" Tags
|
|
|
|
command! Mktags !ctags -R .
|
|
|
|
|
|
|
|
""" file browsing
|
|
|
|
let g:netrw_banner=0 " disable annoying banner
|
|
|
|
let g:netrw_browse_split=4 " open in prior window
|
|
|
|
let g:netrw_altv=1 " open splits to the right
|
|
|
|
let g:netrw_liststyle=3 " tree view
|
|
|
|
let g:netrw_list_hide=netrw_gitignore#Hide()
|
|
|
|
|
|
|
|
"" typo
|
|
|
|
setlocal spell
|
|
|
|
set spelllang=en
|
|
|
|
inoremap <C-l> <c-g>u<Esc>[s1z=`]a<c-g>u
|
|
|
|
|
|
|
|
""" Plugins
|
|
|
|
lua require('plugins')
|
|
|
|
lua require('lualine').setup{}
|
|
|
|
|
|
|
|
"" Snippets
|
|
|
|
imap <expr> <Tab> snippy#can_expand_or_advance() ? '<Plug>(snippy-expand-or-advance)' : '<Tab>'
|
|
|
|
imap <expr> <S-Tab> snippy#can_jump(-1) ? '<Plug>(snippy-previous)' : '<S-Tab>'
|
|
|
|
smap <expr> <Tab> snippy#can_jump(1) ? '<Plug>(snippy-next)' : '<Tab>'
|
|
|
|
smap <expr> <S-Tab> snippy#can_jump(-1) ? '<Plug>(snippy-previous)' : '<S-Tab>'
|
|
|
|
xmap <Tab> <Plug>(snippy-cut-text)
|
|
|
|
|
|
|
|
"" LaTeX
|
|
|
|
let g:tex_flavor='latex'
|
|
|
|
let g:vimtex_view_method='zathura'
|
|
|
|
let g:vimtex_quickfix_mode=0
|
|
|
|
let g:vimtex_syntax_conceal = {
|
|
|
|
\ 'accents': 1,
|
|
|
|
\ 'cites': 1,
|
|
|
|
\ 'fancy': 1,
|
|
|
|
\ 'greek': 1,
|
|
|
|
\ 'math_bounds': 1,
|
|
|
|
\ 'math_delimiters': 1,
|
|
|
|
\ 'math_fracs': 1,
|
|
|
|
\ 'math_super_sub': 1,
|
|
|
|
\ 'math_symbols': 1,
|
|
|
|
\ 'sections': 1,
|
|
|
|
\ 'styles': 1,
|
|
|
|
\}
|
|
|
|
set conceallevel=2
|
|
|
|
|
|
|
|
"" LSP
|
|
|
|
"" See: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
|
|
|
lua << EOF
|
|
|
|
local lsp = require('lspconfig')
|
|
|
|
|
|
|
|
lsp.clangd.setup {
|
|
|
|
filetypes = { "c", "cpp", "cxx" }
|
|
|
|
}
|
|
|
|
|
|
|
|
lsp.eslint.setup{}
|
|
|
|
|
|
|
|
lsp.sumneko_lua.setup {
|
|
|
|
settings = {
|
|
|
|
Lua = {
|
|
|
|
runtime = {
|
|
|
|
version = 'LuaJIT',
|
|
|
|
},
|
|
|
|
diagnostics = {
|
|
|
|
globals = {'vim'},
|
|
|
|
},
|
|
|
|
workspace = {
|
|
|
|
library = vim.api.nvim_get_runtime_file("", true),
|
|
|
|
},
|
|
|
|
telemetry = {
|
|
|
|
enable = false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
EOF
|