feat: finally solve ordering for cmp
This commit is contained in:
parent
1507a66da0
commit
1f2ee194f2
4 changed files with 61 additions and 49 deletions
|
|
@ -46,7 +46,7 @@ return {
|
|||
name = "bashdb",
|
||||
}
|
||||
|
||||
local rust_dap = vim.fn.getcwd()
|
||||
local rust_dap = Get_git_root().cwd
|
||||
local filename = ""
|
||||
for w in rust_dap:gmatch("([^/]+)") do
|
||||
filename = w
|
||||
|
|
@ -61,8 +61,26 @@ return {
|
|||
end,
|
||||
--program = '${fileDirname}/${fileBasenameNoExtension}',
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = true,
|
||||
terminal = "integrated",
|
||||
initCommands = function()
|
||||
-- Find out where to look for the pretty printer Python module
|
||||
local rustc_sysroot = vim.fn.trim(vim.fn.system("rustc --print sysroot"))
|
||||
|
||||
local script_import = 'command script import "' .. rustc_sysroot .. '/lib/rustlib/etc/lldb_lookup.py"'
|
||||
local commands_file = rustc_sysroot .. "/lib/rustlib/etc/lldb_commands"
|
||||
|
||||
local commands = {}
|
||||
local file = io.open(commands_file, "r")
|
||||
if file then
|
||||
for line in file:lines() do
|
||||
table.insert(commands, line)
|
||||
end
|
||||
file:close()
|
||||
end
|
||||
table.insert(commands, 1, script_import)
|
||||
|
||||
return commands
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
@ -72,10 +90,9 @@ return {
|
|||
type = "lldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/build/", "file")
|
||||
return vim.fn.input("Path to executable: ", Get_git_root().cwd .. "/build/", "file")
|
||||
end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = true,
|
||||
terminal = "integrated",
|
||||
},
|
||||
}
|
||||
|
|
@ -253,4 +270,3 @@ return {
|
|||
end,
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue