nvim: run a formatted and update autocmds to new 0.7 api
This commit is contained in:
@ -1,32 +1,32 @@
|
||||
local dap = require('dap')
|
||||
local dap = require("dap")
|
||||
|
||||
--
|
||||
-- python
|
||||
--
|
||||
|
||||
dap.adapters.python = {
|
||||
type = 'executable';
|
||||
command = 'python';
|
||||
args = { '-m', 'debugpy.adapter' };
|
||||
type = "executable",
|
||||
command = "python",
|
||||
args = { "-m", "debugpy.adapter" },
|
||||
}
|
||||
|
||||
dap.configurations.python = {
|
||||
{
|
||||
type = 'python';
|
||||
request = 'launch';
|
||||
name = "Launch file";
|
||||
type = "python",
|
||||
request = "launch",
|
||||
name = "Launch file",
|
||||
|
||||
program = "${file}";
|
||||
program = "${file}",
|
||||
pythonPath = function()
|
||||
local cwd = vim.fn.getcwd()
|
||||
if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then
|
||||
return cwd .. '/venv/bin/python'
|
||||
elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
|
||||
return cwd .. '/.venv/bin/python'
|
||||
if vim.fn.executable(cwd .. "/venv/bin/python") == 1 then
|
||||
return cwd .. "/venv/bin/python"
|
||||
elseif vim.fn.executable(cwd .. "/.venv/bin/python") == 1 then
|
||||
return cwd .. "/.venv/bin/python"
|
||||
else
|
||||
return '/usr/bin/python'
|
||||
return "/usr/bin/python"
|
||||
end
|
||||
end;
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@ -35,9 +35,9 @@ dap.configurations.python = {
|
||||
--
|
||||
|
||||
dap.adapters.lldb = {
|
||||
type = 'executable',
|
||||
command = '/usr/bin/lldb-vscode',
|
||||
name = "lldb"
|
||||
type = "executable",
|
||||
command = "/usr/bin/lldb-vscode",
|
||||
name = "lldb",
|
||||
}
|
||||
|
||||
dap.configurations.c = {
|
||||
@ -46,9 +46,9 @@ dap.configurations.c = {
|
||||
type = "lldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user