mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
feat: add vim.secure.read()
This function accepts a path to a file and prompts the user if the file is trusted. If the user confirms that the file is trusted, the contents of the file are returned. The user's decision is stored in a trust database at $XDG_STATE_HOME/nvim/trust. When this function is invoked with a path that is already marked as trusted in the trust database, the user is not prompted for a response.
This commit is contained in:
@@ -131,6 +131,7 @@ CONFIG = {
|
||||
'filetype.lua',
|
||||
'keymap.lua',
|
||||
'fs.lua',
|
||||
'secure.lua',
|
||||
],
|
||||
'files': [
|
||||
'runtime/lua/vim/_editor.lua',
|
||||
@@ -140,6 +141,7 @@ CONFIG = {
|
||||
'runtime/lua/vim/filetype.lua',
|
||||
'runtime/lua/vim/keymap.lua',
|
||||
'runtime/lua/vim/fs.lua',
|
||||
'runtime/lua/vim/secure.lua',
|
||||
],
|
||||
'file_patterns': '*.lua',
|
||||
'fn_name_prefix': '',
|
||||
@@ -166,6 +168,7 @@ CONFIG = {
|
||||
'filetype': 'vim.filetype',
|
||||
'keymap': 'vim.keymap',
|
||||
'fs': 'vim.fs',
|
||||
'secure': 'vim.secure',
|
||||
},
|
||||
'append_only': [
|
||||
'shared.lua',
|
||||
|
Reference in New Issue
Block a user