diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 15:00:41 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 15:00:41 -0700 |
commit | 7a7f497b483cd65e340064f23ed1c73425ecba0a (patch) | |
tree | d5c99ea22a1e10300d06165f8ac96df6b0dc59e1 /runtime/lua/vim/secure.lua | |
parent | 1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (diff) | |
parent | ade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff) | |
download | rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.gz rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.bz2 rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.zip |
Merge remote-tracking branch 'upstream/master' into aucmd_textputpost
Diffstat (limited to 'runtime/lua/vim/secure.lua')
-rw-r--r-- | runtime/lua/vim/secure.lua | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/runtime/lua/vim/secure.lua b/runtime/lua/vim/secure.lua index d29c356af3..3992eef78a 100644 --- a/runtime/lua/vim/secure.lua +++ b/runtime/lua/vim/secure.lua @@ -108,22 +108,25 @@ function M.read(path) return contents end ----@class vim.trust.opts ----@field action string ----@field path? string ----@field bufnr? integer +--- @class vim.trust.opts +--- @inlinedoc +--- +--- - `'allow'` to add a file to the trust database and trust it, +--- - `'deny'` to add a file to the trust database and deny it, +--- - `'remove'` to remove file from the trust database +--- @field action 'allow'|'deny'|'remove' +--- +--- Path to a file to update. Mutually exclusive with {bufnr}. +--- Cannot be used when {action} is "allow". +--- @field path? string +--- Buffer number to update. Mutually exclusive with {path}. +--- @field bufnr? integer --- Manage the trust database. --- --- The trust database is located at |$XDG_STATE_HOME|/nvim/trust. --- ----@param opts (table): ---- - action (string): "allow" to add a file to the trust database and trust it, ---- "deny" to add a file to the trust database and deny it, ---- "remove" to remove file from the trust database ---- - path (string|nil): Path to a file to update. Mutually exclusive with {bufnr}. ---- Cannot be used when {action} is "allow". ---- - bufnr (number|nil): Buffer number to update. Mutually exclusive with {path}. +---@param opts? vim.trust.opts ---@return boolean success true if operation was successful ---@return string msg full path if operation was successful, else error message function M.trust(opts) |