nvim: modernize outdated functions

This commit is contained in:
Fernando Schauenburg 2025-07-01 21:56:31 +02:00
parent 821165fea0
commit d1e0aa51d0
2 changed files with 2 additions and 3 deletions

View file

@ -17,7 +17,7 @@ return {
local cmdline = [[which plantuml | xargs cat | grep plantuml.jar]] local cmdline = [[which plantuml | xargs cat | grep plantuml.jar]]
local regex = [[\v\s['"]?(\S+/plantuml\.jar)]] local regex = [[\v\s['"]?(\S+/plantuml\.jar)]]
local jar = vim.fn.matchlist(vim.fn.system(cmdline), regex)[2] local jar = vim.fn.matchlist(vim.fn.system(cmdline), regex)[2]
if jar and vim.loop.fs_stat(jar) then if jar and vim.uv.fs_stat(jar) then
vim.g["plantuml_previewer#plantuml_jar_path"] = jar vim.g["plantuml_previewer#plantuml_jar_path"] = jar
end end
end, end,

View file

@ -28,8 +28,7 @@ end
M.execute_lines = function(first, last) M.execute_lines = function(first, last)
first = first or vim.fn.line(".") first = first or vim.fn.line(".")
last = last or first last = last or first
---@diagnostic disable-next-line: param-type-mismatch local code = vim.iter(vim.fn.getline(first, last)):join("\n")
local code = vim.fn.join(vim.fn.getline(first, last), "\n")
loadstring(code)() loadstring(code)()
end end