Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,40 +14,40 @@ return {
},

{
'mrcjkb/rustaceanvim',
version = '^5', -- Recommended
"mrcjkb/rustaceanvim",
version = "^5", -- Recommended
lazy = false, -- This plugin is already lazy
ft = "rust",
config = function ()
local mason_registry = require('mason-registry')
local codelldb = mason_registry.get_package("codelldb")
local extension_path = codelldb:get_install_path() .. "/extension/"
config = function()
local mason_path = vim.fn.stdpath "data" .. "/mason"
local extension_path = mason_path .. "/packages/codelldb/extension/"
local codelldb_path = extension_path .. "adapter/codelldb"
local liblldb_path = extension_path.. "lldb/lib/liblldb.dylib"
-- If you are on Linux, replace the line above with the line below:
-- local liblldb_path = extension_path .. "lldb/lib/liblldb.so"
local cfg = require('rustaceanvim.config')
local liblldb_path = extension_path .. "lldb/lib/liblldb.dylib"

-- If you are on Linux, replace the line above with the line below:
-- local liblldb_path = extension_path .. "lldb/lib/liblldb.so"
local cfg = require "rustaceanvim.config"

vim.g.rustaceanvim = {
dap = {
adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path),
},
}
end
end,
},

{
'rust-lang/rust.vim',
"rust-lang/rust.vim",
ft = "rust",
init = function ()
init = function()
vim.g.rustfmt_autosave = 1
end
end,
},

{
'mfussenegger/nvim-dap',
"mfussenegger/nvim-dap",
config = function()
local dap, dapui = require("dap"), require("dapui")
local dap, dapui = require "dap", require "dapui"
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
Expand All @@ -60,32 +60,32 @@ return {
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
end,
end,
},

{
'rcarriga/nvim-dap-ui',
dependencies = {"mfussenegger/nvim-dap", "nvim-neotest/nvim-nio"},
"rcarriga/nvim-dap-ui",
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
config = function()
require("dapui").setup()
end,
require("dapui").setup()
end,
},

{
'saecki/crates.nvim',
ft = {"toml"},
"saecki/crates.nvim",
ft = { "toml" },
config = function()
require("crates").setup {
completion = {
cmp = {
enabled = true
enabled = true,
},
},
}
require('cmp').setup.buffer({
sources = { { name = "crates" }}
})
end
require("cmp").setup.buffer {
sources = { { name = "crates" } },
}
end,
},

-- {
Expand Down