Bash debug adapter, adjust diffopt
This commit is contained in:
parent
443d2b8b94
commit
2486dba138
28
init.lua
28
init.lua
|
@ -49,6 +49,7 @@ opt.fillchars = { -- Characters to fill certain types of empty space
|
||||||
diff = ' ',
|
diff = ' ',
|
||||||
fold = ' ',
|
fold = ' ',
|
||||||
}
|
}
|
||||||
|
opt.diffopt:append({'indent-heuristic', 'algorithm:histogram'})
|
||||||
|
|
||||||
o.tabstop = 4 -- A physical tab is 4 characters wide
|
o.tabstop = 4 -- A physical tab is 4 characters wide
|
||||||
o.shiftwidth = 4 -- A unit of indentention is 4 levels wide
|
o.shiftwidth = 4 -- A unit of indentention is 4 levels wide
|
||||||
|
@ -294,8 +295,8 @@ require'packer'.startup(function(use)
|
||||||
local null_ls = require'null-ls'
|
local null_ls = require'null-ls'
|
||||||
null_ls.setup {
|
null_ls.setup {
|
||||||
sources = {
|
sources = {
|
||||||
|
null_ls.builtins.diagnostics.zsh,
|
||||||
null_ls.builtins.code_actions.shellcheck,
|
null_ls.builtins.code_actions.shellcheck,
|
||||||
null_ls.builtins.diagnostics.shellcheck,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end}
|
end}
|
||||||
|
@ -323,6 +324,10 @@ require'packer'.startup(function(use)
|
||||||
args = {'--port', '${port}'},
|
args = {'--port', '${port}'},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
dap.adapters.sh = {
|
||||||
|
type = 'executable',
|
||||||
|
command = vim.fn.stdpath('data') .. '/mason/packages/bash-debug-adapter/bash-debug-adapter'
|
||||||
|
}
|
||||||
dap.configurations.cpp = {
|
dap.configurations.cpp = {
|
||||||
{
|
{
|
||||||
name = 'Launch file',
|
name = 'Launch file',
|
||||||
|
@ -336,7 +341,26 @@ require'packer'.startup(function(use)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
dap.configurations.rust = dap.configurations.cpp
|
dap.configurations.rust = dap.configurations.cpp
|
||||||
dap.configurations.c = dap.configurations.c
|
dap.configurations.c = dap.configurations.cpp
|
||||||
|
dap.configurations.sh = {
|
||||||
|
{
|
||||||
|
name = 'Bash debugger',
|
||||||
|
type = 'sh',
|
||||||
|
request = 'launch',
|
||||||
|
program = '${file}',
|
||||||
|
cwd = '${fileDirname}',
|
||||||
|
pathBashdb = vim.fn.stdpath('data') .. '/mason/packages/bash-debug-adapter/extension/bashdb_dir/bashdb',
|
||||||
|
pathBashdbLib = vim.fn.stdpath('data') .. '/mason/packages/bash-debug-adapter/extension/bashdb_dir',
|
||||||
|
pathBash = 'bash',
|
||||||
|
pathCat = 'cat',
|
||||||
|
pathMkfifo = 'mkfifo',
|
||||||
|
pathPkill = 'pkill',
|
||||||
|
env = {},
|
||||||
|
args = function ()
|
||||||
|
return vim.fn.split(vim.fn.input('Arguments: ', '', 'file'))
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
local function conditional_breakpoint()
|
local function conditional_breakpoint()
|
||||||
vim.ui.input({prompt = 'Breakpoint condition'}, function(condition)
|
vim.ui.input({prompt = 'Breakpoint condition'}, function(condition)
|
||||||
if not condition then return end
|
if not condition then return end
|
||||||
|
|
Loading…
Reference in a new issue