nvim: Add remote launch option for rust
This commit is contained in:
parent
3e351df241
commit
d3f8b0dc54
1 changed files with 24 additions and 3 deletions
|
@ -5,9 +5,9 @@ dapui.setup({})
|
|||
|
||||
dap.adapters.codelldb = {
|
||||
type = 'server',
|
||||
host = '127.0.0.1',
|
||||
port = "${port}",
|
||||
executable = {
|
||||
-- Change this to your path!
|
||||
command = '/usr/bin/codelldb',
|
||||
args = {"--port", "${port}"},
|
||||
}
|
||||
|
@ -15,17 +15,38 @@ dap.adapters.codelldb = {
|
|||
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
name = "Launch file",
|
||||
name = "Remote Launch",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
args = {
|
||||
"platform select remote-linux", -- For example: 'remote-linux', 'remote-macosx', 'remote-android', etc.
|
||||
"platform connect connect://localhost:13000",
|
||||
},
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
attachCommands = {
|
||||
"platform select remote-linux",
|
||||
"platform connect connect://localhost:13000",
|
||||
},
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
},
|
||||
}
|
||||
|
||||
-- dap.configurations.rust = {
|
||||
-- {
|
||||
-- name = "Launch file",
|
||||
-- type = "codelldb",
|
||||
-- request = "launch",
|
||||
-- program = function()
|
||||
-- return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
-- end,
|
||||
-- cwd = '${workspaceFolder}',
|
||||
-- stopOnEntry = false,
|
||||
-- },
|
||||
-- }
|
||||
|
||||
vim.keymap.set('n', '<Leader>dc', function() dap.continue() end)
|
||||
vim.keymap.set('n', '<F10>', function() dap.step_over() end)
|
||||
vim.keymap.set('n', '<F11>', function() dap.step_into() end)
|
||||
|
|
Loading…
Add table
Reference in a new issue