diff --git a/init.vim b/init.vim index 2dc84d6..2ad2673 100644 --- a/init.vim +++ b/init.vim @@ -5,12 +5,17 @@ set cursorline set ts=4 sw=4 call plug#begin() +"file explorer" Plug 'preservim/nerdtree' +"status line" Plug 'itchyny/lightline.vim' +"color themes" Plug 'gilgigilgil/anderson.vim' Plug 'sainnhe/sonokai' -Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' } -Plug 'bfrg/vim-cpp-modern' +"automatic parentheses" +Plug 'jiangmiao/auto-pairs' +"syntax highlighting" +Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} call plug#end() @@ -46,3 +51,35 @@ let g:airline_powerline_fonts = 1 let g:sonokai_style = 'shusia' let g:sonokai_better_performance = 1 colorscheme sonokai + +lua << EOF +require'nvim-treesitter.configs'.setup { + -- Install parsers for languages you use + ensure_installed = { "c", "cpp", "python", "lua", "vim", "go" }, + + -- Install all maintained parsers + -- ensure_installed = "all", + + -- Syntax highlighting + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + + -- Indentation based on treesitter (experimental) + indent = { + enable = true + }, + + -- Incremental selection based on the syntax tree + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm", + }, + }, +} +EOF \ No newline at end of file