|
|
|
@ -22,7 +22,8 @@ return require('packer').startup(function()
|
|
|
|
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts) |
|
|
|
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts) |
|
|
|
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) |
|
|
|
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts) |
|
|
|
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.format({async = true})<CR>', opts) |
|
|
|
|
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'ge', '<cmd>lua vim.diagnostic.open_float()<CR>', opts) |
|
|
|
|
|
|
|
|
|
if client.resolved_capabilities.document_formatting then |
|
|
|
|
vim.api.nvim_command [[augroup Format]] |
|
|
|
@ -46,7 +47,7 @@ return require('packer').startup(function()
|
|
|
|
|
'nvim-treesitter/nvim-treesitter', |
|
|
|
|
config = function() |
|
|
|
|
require('nvim-treesitter.configs').setup { |
|
|
|
|
ensure_installed = 'maintained', |
|
|
|
|
ensure_installed = { "python", "rust" }, |
|
|
|
|
sync_install = false, |
|
|
|
|
highlight = { |
|
|
|
|
enable = true, |
|
|
|
|