Setup Rust

This commit is contained in:
Le Viet Dat 2024-06-06 08:28:17 +07:00
parent cd3ca0eb02
commit 21d6decca5
1 changed files with 21 additions and 2 deletions

View File

@ -515,7 +515,7 @@ require('lazy').setup({
-- clangd = {},
-- gopls = {},
pyright = {},
-- rust_analyzer = {},
rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
@ -638,6 +638,15 @@ require('lazy').setup({
},
},
'saadparwaiz1/cmp_luasnip',
{
'Saecki/crates.nvim',
event = { 'BufRead Cargo.toml' },
opts = {
completion = {
cmp = { enabled = true },
},
},
},
-- Adds other completion capabilities.
-- nvim-cmp does not ship with all sources by default. They are split
@ -715,6 +724,7 @@ require('lazy').setup({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'path' },
{ name = 'crates' },
},
}
end,
@ -787,6 +797,15 @@ require('lazy').setup({
-- Check out: https://github.com/echasnovski/mini.nvim
end,
},
{
'Saecki/crates.nvim',
event = { 'BufRead Cargo.toml' },
opts = {
completion = {
cmp = { enabled = true },
},
},
},
{
'Exafunction/codeium.nvim',
dependencies = {
@ -801,7 +820,7 @@ require('lazy').setup({
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' },
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc', 'ron', 'rust' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {