nvim: modernize outdated functions
This commit is contained in:
parent
821165fea0
commit
d1e0aa51d0
2 changed files with 2 additions and 3 deletions
|
@ -17,7 +17,7 @@ return {
|
|||
local cmdline = [[which plantuml | xargs cat | grep plantuml.jar]]
|
||||
local regex = [[\v\s['"]?(\S+/plantuml\.jar)]]
|
||||
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
|
||||
end
|
||||
end,
|
||||
|
|
|
@ -28,8 +28,7 @@ end
|
|||
M.execute_lines = function(first, last)
|
||||
first = first or vim.fn.line(".")
|
||||
last = last or first
|
||||
---@diagnostic disable-next-line: param-type-mismatch
|
||||
local code = vim.fn.join(vim.fn.getline(first, last), "\n")
|
||||
local code = vim.iter(vim.fn.getline(first, last)):join("\n")
|
||||
loadstring(code)()
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue