mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
lua: Add vim.opt and fix scopes of vim.o (#13479)
* lua: Add vim.opt * fixup: cleaning * fixup: comments * ty clason * fixup: comments * this is the last commit. period.
This commit is contained in:
@@ -20,5 +20,12 @@ function F.npcall(fn, ...)
|
||||
return F.ok_or_nil(pcall(fn, ...))
|
||||
end
|
||||
|
||||
--- Wrap a function to return nil if it fails, otherwise the value
|
||||
function F.nil_wrap(fn)
|
||||
return function(...)
|
||||
return F.npcall(fn, ...)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
return F
|
||||
|
||||
Reference in New Issue
Block a user