add nvim treesitter

This commit is contained in:
Jidbo 2021-09-05 21:42:53 +02:00
parent 906acb2658
commit d9f1170230
Signed by untrusted user: jidbo
GPG key ID: 54C320BF0E44C5CA
3 changed files with 25 additions and 8 deletions

View file

@ -35,10 +35,10 @@ nnoremap <leader>p :Neoformat<CR>
" lsp mappings " lsp mappings
imap <silent> <c-p> <Plug>(completion_trigger) imap <silent> <c-p> <Plug>(completion_trigger)
nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR> nnoremap <silent> gd <cmd>lua vim.lsp.buf.definition()<CR>
nnoremap <silent> gh <cmd>lua vim.lsp.buf.hover()<CR> nnoremap <silent> gh <cmd>lua vim.lsp.buf.hover()<CR>
nnoremap <silent> gH <cmd>lua vim.lsp.buf.code_action()<CR> nnoremap <silent> gH <cmd>lua vim.lsp.buf.code_action()<CR>
nnoremap <silent> gD <cmd>lua vim.lsp.buf.implementation()<CR> nnoremap <silent> gD <cmd>lua vim.lsp.buf.implementation()<CR>
nnoremap <silent> gs <cmd>lua vim.lsp.buf.signature_help()<CR> nnoremap <silent> gs <cmd>lua vim.lsp.buf.signature_help()<CR>
nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR> nnoremap <silent> gr <cmd>lua vim.lsp.buf.references()<CR>
nnoremap <silent> gR <cmd>lua vim.lsp.buf.rename()<CR> nnoremap <silent> gR <cmd>lua vim.lsp.buf.rename()<CR>

View file

@ -101,7 +101,7 @@ let g:goyo_linenr = 0
lua require'lspconfig'.tsserver.setup{ on_attach=require'completion'.on_attach } lua require'lspconfig'.tsserver.setup{ on_attach=require'completion'.on_attach }
lua require'lspconfig'.intelephense.setup{ on_attach=require'completion'.on_attach } lua require'lspconfig'.intelephense.setup{ on_attach=require'completion'.on_attach }
lua require'lspconfig'.vuels.setup{ on_attach=require'completion'.on_attach } lua require'lspconfig'.vuels.setup{ on_attach=require'completion'.on_attach }
lua require'lspconfig'.pyls.setup{ on_attach=require'completion'.on_attach } lua require'lspconfig'.pylsp.setup{ on_attach=require'completion'.on_attach }
lua require'lspconfig'.texlab.setup{ on_attach=require'completion'.on_attach } lua require'lspconfig'.texlab.setup{ on_attach=require'completion'.on_attach }
lua <<EOF lua <<EOF
lspconfig = require "lspconfig" lspconfig = require "lspconfig"
@ -130,3 +130,16 @@ let g:user_emmet_leader_key='<C-i>'
" ========================= " =========================
" autocmd Filetype tex LanguageToolSetUp " autocmd Filetype tex LanguageToolSetUp
let g:languagetool_cmd='/usr/bin/languagetool' let g:languagetool_cmd='/usr/bin/languagetool'
" TREESITTER
" lua <<EOF
" require'nvim-treesitter.configs'.setup {
" ensure_installed = "maintained",
" highlight = {
" enable = true,
" },
" indent = {
" enable = true
" },
" }
" EOF

View file

@ -71,6 +71,10 @@ Plug 'nvim-lua/completion-nvim'
" Autoformatter " Autoformatter
Plug 'sbdchd/neoformat' Plug 'sbdchd/neoformat'
" treesitter
" Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
" Plug 'nvim-treesitter/playground'
" disable latex before loading " disable latex before loading
let g:polyglot_disabled = ["latex"] let g:polyglot_disabled = ["latex"]
Plug 'sheerun/vim-polyglot' Plug 'sheerun/vim-polyglot'