diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-12-02 16:45:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 16:45:39 +0100 |
commit | 07e6296520fc83b1fdb287b5173494cdd0e9136f (patch) | |
tree | 9844003e550f161a5d563a726fc759fa1a84d22a /runtime/lua/vim/fs.lua | |
parent | 731432342058c1c4340fc3cc4782b5fcd4a756a0 (diff) | |
parent | e40df8b1bc6a7832c7707696b374b19642dfd596 (diff) | |
download | rneovim-07e6296520fc83b1fdb287b5173494cdd0e9136f.tar.gz rneovim-07e6296520fc83b1fdb287b5173494cdd0e9136f.tar.bz2 rneovim-07e6296520fc83b1fdb287b5173494cdd0e9136f.zip |
Merge pull request #21154 from clason/vimdoc-injections
feat(help): highlighted codeblocks
Diffstat (limited to 'runtime/lua/vim/fs.lua')
-rw-r--r-- | runtime/lua/vim/fs.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/runtime/lua/vim/fs.lua b/runtime/lua/vim/fs.lua index 8ea7f26575..fdf3d29e94 100644 --- a/runtime/lua/vim/fs.lua +++ b/runtime/lua/vim/fs.lua @@ -5,7 +5,7 @@ local iswin = vim.loop.os_uname().sysname == 'Windows_NT' --- Iterate over all the parents of the given file or directory. --- --- Example: ---- <pre> +--- <pre>lua --- local root_dir --- for dir in vim.fs.parents(vim.api.nvim_buf_get_name(0)) do --- if vim.fn.isdirectory(dir .. "/.git") == 1 then @@ -119,8 +119,7 @@ end --- - limit (number, default 1): Stop the search after --- finding this many matches. Use `math.huge` to --- place no limit on the number of matches. ---- ----@return (table) The normalized paths |vim.fs.normalize()| of all matching files or directories +---@return (table) Normalized paths |vim.fs.normalize()| of all matching files or directories function M.find(names, opts) opts = opts or {} vim.validate({ @@ -235,15 +234,15 @@ end --- variables are also expanded. --- --- Examples: ---- <pre> +--- <pre>lua --- vim.fs.normalize('C:\\Users\\jdoe') ---- => 'C:/Users/jdoe' +--- --> 'C:/Users/jdoe' --- --- vim.fs.normalize('~/src/neovim') ---- => '/home/jdoe/src/neovim' +--- --> '/home/jdoe/src/neovim' --- --- vim.fs.normalize('$XDG_CONFIG_HOME/nvim/init.vim') ---- => '/Users/jdoe/.config/nvim/init.vim' +--- --> '/Users/jdoe/.config/nvim/init.vim' --- </pre> --- ---@param path (string) Path to normalize |