diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-11-23 12:31:49 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2022-12-02 16:05:00 +0100 |
commit | 0b05bd87c04f9cde5c84a062453619349e370795 (patch) | |
tree | 06acf9582bbebe0bdb0f84777c17c71aced62a97 /runtime/lua/vim/fs.lua | |
parent | 9e1187e4896bebb481a3f9595155f2a40adbc45e (diff) | |
download | rneovim-0b05bd87c04f9cde5c84a062453619349e370795.tar.gz rneovim-0b05bd87c04f9cde5c84a062453619349e370795.tar.bz2 rneovim-0b05bd87c04f9cde5c84a062453619349e370795.zip |
docs(gen): support language annotation in docstrings
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 d128c15233..acfe8821ea 100644 --- a/runtime/lua/vim/fs.lua +++ b/runtime/lua/vim/fs.lua @@ -3,7 +3,7 @@ local M = {} --- 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 @@ -98,8 +98,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({ @@ -214,15 +213,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 |