summaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/autocompletion.lua4
-rw-r--r--lua/plugins/crates.lua9
-rw-r--r--lua/plugins/lspconfig.lua5
-rw-r--r--lua/plugins/rust.lua10
-rw-r--r--lua/plugins/treesitter.lua1
5 files changed, 28 insertions, 1 deletions
diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua
index 85bdbcc..ead5e69 100644
--- a/lua/plugins/autocompletion.lua
+++ b/lua/plugins/autocompletion.lua
@@ -8,7 +8,8 @@ return {
'hrsh7th/cmp-cmdline',
'hrsh7th/cmp-nvim-lua',
-- Snippet Engine & its associated nvim-cmp source
- { 'L3MON4D3/LuaSnip',
+ {
+ 'L3MON4D3/LuaSnip',
version = "v2.*",
dependencies = 'rafamadriz/friendly-snippets',
build = "make install_jsregexp",
@@ -62,6 +63,7 @@ return {
{ name = 'nvim_lua' },
{ name = 'path' },
{ name = 'buffer' },
+ { name = 'crates' },
}),
})
end,
diff --git a/lua/plugins/crates.lua b/lua/plugins/crates.lua
new file mode 100644
index 0000000..e0c46be
--- /dev/null
+++ b/lua/plugins/crates.lua
@@ -0,0 +1,9 @@
+return {
+ 'Saecki/crates.nvim',
+ ft = { 'rust', 'toml' },
+ config = function(_, opts)
+ local crates = require('crates')
+ crates.setup(opts)
+ crates.show()
+ end
+}
diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua
index c01e575..d4526f3 100644
--- a/lua/plugins/lspconfig.lua
+++ b/lua/plugins/lspconfig.lua
@@ -10,6 +10,11 @@ local servers = {
gofumpt = true
},
},
+ rust_analyzer = {
+ cargo = {
+ allFeatures = true,
+ },
+ },
-- jedi_language_server = {},
pyright = {},
lua_ls = {
diff --git a/lua/plugins/rust.lua b/lua/plugins/rust.lua
new file mode 100644
index 0000000..e4bc53f
--- /dev/null
+++ b/lua/plugins/rust.lua
@@ -0,0 +1,10 @@
+return {
+ -- For debugging capabilities, need to change the config
+ -- from lspconfig into it's own thing, for more:
+ -- https://www.youtube.com/watch?v=mh_EJhH49Ms
+ 'rust-lang/rust.vim',
+ ft = 'rust',
+ init = function()
+ vim.g.rustfmt_autosave = 1
+ end
+}
diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua
index 3d7a48e..a942921 100644
--- a/lua/plugins/treesitter.lua
+++ b/lua/plugins/treesitter.lua
@@ -24,6 +24,7 @@ return {
'sql',
'gdscript',
'godot_resource',
+ 'rust',
},
auto_install = false,
highlight = { enable = true },