Fix nvim plugins

This commit is contained in:
Geoffrey Frogeye 2022-11-04 17:46:44 +01:00
parent 0d86e537d1
commit f86c4d1882
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
2 changed files with 42 additions and 5 deletions

View file

@ -29,10 +29,10 @@ local on_attach = function(client, bufnr)
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
-- buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
-- buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '[e', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', ']e', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
-- buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float(0, {scope="cursor"})<CR>', opts)
buf_set_keymap('n', '[e', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', ']e', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
-- buf_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap("n", "<space>f", "<cmd>lua vim.lsp.buf.formatting()<CR>", opts)
buf_set_keymap("v", "<space>f", "<cmd>lua vim.lsp.buf.range_formatting()<CR><Esc>", opts)

View file

@ -5,7 +5,44 @@
#}
lua <<EOF
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained",
ensure_installed = {
"bash",
"bibtex",
"c",
"cmake",
"comment",
"cpp",
"css",
"diff",
"dockerfile",
"dot",
"git_rebase",
"gitattributes",
"gitignore",
"go",
"help",
"html",
"http",
"java",
"javascript",
"json",
"latex",
"llvm",
"lua",
"make",
"markdown",
"markdown_inline",
"perl",
"php",
"python",
"regex",
"ruby",
"scss",
"sql",
"verilog",
"vim",
"yaml",
},
ignore_install = {},
highlight = {
enable = true,