2022-10-29 02:25:11 +02:00
|
|
|
require('packer').startup(function(use)
|
|
|
|
use {
|
|
|
|
'VonHeikemen/lsp-zero.nvim',
|
|
|
|
requires = {
|
|
|
|
-- LSP Support
|
|
|
|
{ 'neovim/nvim-lspconfig' },
|
|
|
|
{ 'williamboman/mason.nvim' },
|
|
|
|
{ 'williamboman/mason-lspconfig.nvim' },
|
|
|
|
|
|
|
|
-- Autocompletion
|
|
|
|
{ 'hrsh7th/nvim-cmp' },
|
|
|
|
{ 'hrsh7th/cmp-buffer' },
|
|
|
|
{ 'hrsh7th/cmp-path' },
|
|
|
|
{ 'saadparwaiz1/cmp_luasnip' },
|
|
|
|
{ 'hrsh7th/cmp-nvim-lsp' },
|
|
|
|
{ 'hrsh7th/cmp-nvim-lua' },
|
|
|
|
|
|
|
|
-- Snippets
|
|
|
|
{ 'L3MON4D3/LuaSnip' },
|
|
|
|
{ 'rafamadriz/friendly-snippets' },
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-06 13:38:09 +01:00
|
|
|
use {
|
|
|
|
'simrat39/rust-tools.nvim',
|
|
|
|
requires = {
|
|
|
|
{ 'neovim/nvim-lspconfig' },
|
|
|
|
|
|
|
|
-- Debugging
|
|
|
|
{ 'nvim-lua/plenary.nvim' },
|
|
|
|
{ 'mfussenegger/nvim-dap' },
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-10-29 02:25:11 +02:00
|
|
|
use {
|
|
|
|
'nvim-treesitter/nvim-treesitter',
|
|
|
|
run = function() require('nvim-treesitter.install').update({ with_sync = true }) end,
|
|
|
|
}
|
|
|
|
|
|
|
|
use { 'kien/ctrlp.vim' }
|
|
|
|
|
|
|
|
use { 'tpope/vim-commentary' }
|
|
|
|
use { 'tpope/vim-surround' }
|
2022-10-29 02:37:50 +02:00
|
|
|
-- repeat plugin commands using `.`
|
|
|
|
use { 'tpope/vim-repeat' }
|
|
|
|
-- autodetect indentation
|
|
|
|
use { 'tpope/vim-sleuth' }
|
2022-10-29 02:25:11 +02:00
|
|
|
|
2022-10-29 02:37:50 +02:00
|
|
|
-- git
|
|
|
|
use { 'tpope/vim-fugitive' }
|
|
|
|
use { 'airblade/vim-gitgutter' }
|
|
|
|
|
|
|
|
use { 'farmergreg/vim-lastplace' }
|
|
|
|
|
|
|
|
use { 'bronson/vim-trailing-whitespace' }
|
2022-10-29 02:25:11 +02:00
|
|
|
end)
|
|
|
|
|
|
|
|
local lsp = require('lsp-zero')
|
|
|
|
|
|
|
|
lsp.preset('recommended')
|
|
|
|
lsp.setup()
|
|
|
|
|
|
|
|
require('nvim-treesitter.configs').setup{highlight={enable=true}}
|
2022-11-06 13:38:09 +01:00
|
|
|
|
|
|
|
local rt = require("rust-tools")
|
|
|
|
|
|
|
|
rt.setup({
|
|
|
|
server = {
|
|
|
|
on_attach = function(_, bufnr)
|
|
|
|
-- Hover actions
|
|
|
|
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
|
|
|
-- Code action groups
|
|
|
|
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
|
|
|
end,
|
|
|
|
},
|
|
|
|
})
|