[chore] nvim: run lua-ls formatter over everything

This commit is contained in:
dogeystamp 2024-04-02 14:16:39 -04:00
parent 95fefd2304
commit c423d2a5f8
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
4 changed files with 49 additions and 47 deletions

View File

@ -140,6 +140,7 @@ function M.compile(file)
local subdir = M.dbg_dir(file)
vim.fn.execute("make " .. subdir .. "/binary " .. "-f $XDG_CONFIG_HOME/nvim/makefile")
end
keymap("<leader>dc", M.compile)
function M.write_input(file)
@ -148,6 +149,7 @@ function M.write_input(file)
local inp_file = M.dbg_dir(file) .. "/input"
vim.fn.writefile(vim.fn.getreg("+", 1, 1), inp_file)
end
function M.run_input(file)
file = gf(file)
if not dapui.elements.console then
@ -160,9 +162,9 @@ function M.run_input(file)
let @x = join(readfile(b:nvimdbg_inp_file), "\n") .. "\n\n"
normal G"xp
]]
end)
end
keymap("<leader>rw", M.write_input)
keymap("<leader>ri", M.run_input)
@ -212,15 +214,15 @@ end
dap.configurations.python = {
{
-- dap parts
type = "python";
request = "launch";
name = "launch file";
type = "python",
request = "launch",
name = "launch file",
-- debugger parts
program = "${file}";
program = "${file}",
-- this could be smarter (e.g., try to find a virtual env)
pythonPath = function() return "/usr/bin/python" end;
console = "integratedTerminal";
pythonPath = function() return "/usr/bin/python" end,
console = "integratedTerminal",
}
}