|
@@ -1 +1,48 @@
|
|
|
+syntax on
|
|
|
+filetype plugin indent on
|
|
|
+
|
|
|
+" Plugins
|
|
|
+call plug#begin('~/.vim/plugged')
|
|
|
+ Plug 'chriskempson/base16-vim'
|
|
|
+ Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " We recommend updating the parsers on update
|
|
|
+ Plug 'neovim/nvim-lspconfig'
|
|
|
+ Plug 'nvim-lua/completion-nvim'
|
|
|
+ Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
|
|
+call plug#end()
|
|
|
+
|
|
|
+" General vim configurations
|
|
|
set relativenumber
|
|
|
+set colorcolumn=80
|
|
|
+set updatetime=50
|
|
|
+set tabstop=4 softtabstop=4
|
|
|
+set expandtab
|
|
|
+set smartindent
|
|
|
+set completeopt=menuone,noinsert,noselect
|
|
|
+
|
|
|
+" Lsp configuration for multiple languages
|
|
|
+lua require'lspconfig'.rust_analyzer.setup({})
|
|
|
+lua require'lspconfig'.gopls.setup{on_attach=require'completion'.on_attach}
|
|
|
+lua require'lspconfig'.bashls.setup{}
|
|
|
+lua require'lspconfig'.jsonls.setup{}
|
|
|
+lua require'lspconfig'.jedi_language_server.setup{}
|
|
|
+
|
|
|
+" Use <Tab> and <S-Tab> to navigate through popup menu
|
|
|
+inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
|
+inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|
|
+
|
|
|
+
|
|
|
+" Avoid showing message extra message when using completion
|
|
|
+set shortmess+=c
|
|
|
+
|
|
|
+" Theme settings
|
|
|
+" https://github.com/kaicataldo/material.vim
|
|
|
+if (has('termguicolors'))
|
|
|
+ set termguicolors
|
|
|
+endif
|
|
|
+let g:material_theme_style = 'darker'
|
|
|
+colorscheme material
|
|
|
+
|
|
|
+
|
|
|
+" Tree-sitter config
|
|
|
+lua require'nvim-treesitter.configs'.setup { highlight = { enable = true } }
|
|
|
+
|