[chore] nvim: run lua-ls formatter over everything
This commit is contained in:
parent
95fefd2304
commit
c423d2a5f8
@ -140,6 +140,7 @@ function M.compile(file)
|
|||||||
local subdir = M.dbg_dir(file)
|
local subdir = M.dbg_dir(file)
|
||||||
vim.fn.execute("make " .. subdir .. "/binary " .. "-f $XDG_CONFIG_HOME/nvim/makefile")
|
vim.fn.execute("make " .. subdir .. "/binary " .. "-f $XDG_CONFIG_HOME/nvim/makefile")
|
||||||
end
|
end
|
||||||
|
|
||||||
keymap("<leader>dc", M.compile)
|
keymap("<leader>dc", M.compile)
|
||||||
|
|
||||||
function M.write_input(file)
|
function M.write_input(file)
|
||||||
@ -148,6 +149,7 @@ function M.write_input(file)
|
|||||||
local inp_file = M.dbg_dir(file) .. "/input"
|
local inp_file = M.dbg_dir(file) .. "/input"
|
||||||
vim.fn.writefile(vim.fn.getreg("+", 1, 1), inp_file)
|
vim.fn.writefile(vim.fn.getreg("+", 1, 1), inp_file)
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.run_input(file)
|
function M.run_input(file)
|
||||||
file = gf(file)
|
file = gf(file)
|
||||||
if not dapui.elements.console then
|
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"
|
let @x = join(readfile(b:nvimdbg_inp_file), "\n") .. "\n\n"
|
||||||
normal G"xp
|
normal G"xp
|
||||||
]]
|
]]
|
||||||
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
keymap("<leader>rw", M.write_input)
|
keymap("<leader>rw", M.write_input)
|
||||||
keymap("<leader>ri", M.run_input)
|
keymap("<leader>ri", M.run_input)
|
||||||
|
|
||||||
@ -212,15 +214,15 @@ end
|
|||||||
dap.configurations.python = {
|
dap.configurations.python = {
|
||||||
{
|
{
|
||||||
-- dap parts
|
-- dap parts
|
||||||
type = "python";
|
type = "python",
|
||||||
request = "launch";
|
request = "launch",
|
||||||
name = "launch file";
|
name = "launch file",
|
||||||
|
|
||||||
-- debugger parts
|
-- debugger parts
|
||||||
program = "${file}";
|
program = "${file}",
|
||||||
-- this could be smarter (e.g., try to find a virtual env)
|
-- this could be smarter (e.g., try to find a virtual env)
|
||||||
pythonPath = function() return "/usr/bin/python" end;
|
pythonPath = function() return "/usr/bin/python" end,
|
||||||
console = "integratedTerminal";
|
console = "integratedTerminal",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user