modulo treesitter para highlight

This commit is contained in:
serxoz 2021-09-13 13:09:32 +02:00
parent a195fc5982
commit ec8eeb526a
1 changed files with 34 additions and 4 deletions

View File

@ -55,8 +55,8 @@ nnoremap N Nzzzv
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')
let g:vim_bootstrap_langs = "go,html,javascript,python"
let g:vim_bootstrap_editor = "nvim" " nvim or vim
" let g:vim_bootstrap_langs = "go,html,javascript,python"
" let g:vim_bootstrap_editor = "nvim" " nvim or vim
if !filereadable(vimplug_exists)
if !executable("curl")
@ -77,12 +77,21 @@ call plug#begin(expand('~/.config/nvim/plugged'))
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" INSTALACIÓN DE PLUGGINS
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
call plug#begin('~/.vim/plugged') " comienzo instalación de pluggins
" Gestor de archivos
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
" Comentar lineas
Plug 'tpope/vim-commentary'
" Neovim Tree shitter - Sintaxis highlight
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
"" NERDTree configuration
call plug#end() " fin de la instalción de pluggins
" NERDTree configuration
let g:NERDTreeChDirMode=2
let g:NERDTreeIgnore=['\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__']
let g:NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$']
@ -94,6 +103,28 @@ set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*.db,*.sqlite
nnoremap <silent> <F2> :NERDTreeFind<CR>
nnoremap <silent> <F3> :NERDTreeToggle<CR>
" Treesitter config
" :TSInstall python
" :TSInstall rust
" :TSInstall javascript
" :TSInstall c
lua <<EOF
require'nvim-treesitter.configs'.setup {
-- one of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = {
"python", "javascript", "rust", "c", "html", "css"
},
indent = { enable = true },
highlight = {
enable = true,
-- disable = { "c", "rust" }, -- lista de lenguajes desactivados
},
incremental_selection = { enable = true },
textobjects = { enable = true }
}
EOF
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Mapeos
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@ -111,7 +142,6 @@ nnoremap <silent> <S-t> :tabnew<CR>
" POR HACER
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" lsp
" treesitter
" sistema para buscar: telescope, harpoon, fuzzyfinder, grep...
"
" desde que puse la config de nerdtree no fuciona vim-commentary... :S