summaryrefslogtreecommitdiff
path: root/dot_config/nvim/lua/plugins/rustaceanvim.lua
diff options
context:
space:
mode:
authorSakamoto <me@sakamoto.network>2026-05-12 18:31:15 -0500
committerSakamoto <me@sakamoto.network>2026-05-12 18:31:15 -0500
commita623fed63460d6d810605ce1ce858a58a5b222f7 (patch)
tree2129e72acc82deaf624630ec271942000eae0aeb /dot_config/nvim/lua/plugins/rustaceanvim.lua
downloaddotfiles-a623fed63460d6d810605ce1ce858a58a5b222f7.tar.xz
dotfiles-a623fed63460d6d810605ce1ce858a58a5b222f7.zip
init
Diffstat (limited to 'dot_config/nvim/lua/plugins/rustaceanvim.lua')
-rw-r--r--dot_config/nvim/lua/plugins/rustaceanvim.lua30
1 files changed, 30 insertions, 0 deletions
diff --git a/dot_config/nvim/lua/plugins/rustaceanvim.lua b/dot_config/nvim/lua/plugins/rustaceanvim.lua
new file mode 100644
index 0000000..72f1de5
--- /dev/null
+++ b/dot_config/nvim/lua/plugins/rustaceanvim.lua
@@ -0,0 +1,30 @@
+return {
+ "mrcjkb/rustaceanvim",
+ version = "^5", -- Recommended
+ lazy = false, -- This plugin is already lazy
+ config = function()
+ vim.g.rustaceanvim = function()
+ -- Update this path
+ local extension_path = "/usr/lib/codelldb/"
+ local codelldb_path = extension_path .. "adapter/codelldb"
+ local liblldb_path = extension_path .. "lldb/lib/liblldb"
+ local this_os = vim.uv.os_uname().sysname
+
+ -- The path is different on Windows
+ if this_os:find("Windows") then
+ codelldb_path = extension_path .. "adapter\\codelldb.exe"
+ liblldb_path = extension_path .. "lldb\\bin\\liblldb.dll"
+ else
+ -- The liblldb extension is .so for Linux and .dylib for MacOS
+ liblldb_path = liblldb_path .. (this_os == "Linux" and ".so" or ".dylib")
+ end
+
+ local cfg = require("rustaceanvim.config")
+ return {
+ dap = {
+ adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path),
+ },
+ }
+ end
+ end,
+}