Skip to content

Commit 9c79507

Browse files
authored
Merge pull request #1 from Suida/main
Use codelldb directly as mason has removed get_install_path
2 parents 8127351 + dfff41b commit 9c79507

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lua/dap-lldb.lua

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,6 @@ local function require_dap()
2323
return dap
2424
end
2525

26-
local function find_codelldb()
27-
local ok, registry = pcall(require, "mason-registry")
28-
29-
if ok and registry.is_installed("codelldb") then
30-
local pkg = registry.get_package("codelldb")
31-
return table.concat({ pkg:get_install_path(), "extension", "adapter", "codelldb" }, sep)
32-
end
33-
34-
return nil
35-
end
36-
3726
local function compiler_error(input)
3827
local _, json = pcall(vim.fn.json_decode, input)
3928

@@ -220,7 +209,7 @@ function M.setup(opts)
220209
opts = type(opts) == "table" and opts or {}
221210

222211
local dap = require_dap()
223-
local codelldb = opts.codelldb_path or find_codelldb() or "codelldb"
212+
local codelldb = opts.codelldb_path or "codelldb"
224213

225214
dap.adapters.lldb = {
226215
type = "server",

0 commit comments

Comments
 (0)