From 2e92065686f62851318150a315591c30b8306a4b Mon Sep 17 00:00:00 2001 From: Gregory Anders <8965202+gpanders@users.noreply.github.com> Date: Thu, 14 Sep 2023 08:23:01 -0500 Subject: docs: replace
 with ``` (#25136)

---
 runtime/lua/vim/fs.lua | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

(limited to 'runtime/lua/vim/fs.lua')

diff --git a/runtime/lua/vim/fs.lua b/runtime/lua/vim/fs.lua
index 7cd9e3cf04..22612a7255 100644
--- a/runtime/lua/vim/fs.lua
+++ b/runtime/lua/vim/fs.lua
@@ -5,7 +5,8 @@ local iswin = vim.uv.os_uname().sysname == 'Windows_NT'
 --- Iterate over all the parents of the given path.
 ---
 --- Example:
---- 
lua
+---
+--- ```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
@@ -17,7 +18,7 @@ local iswin = vim.uv.os_uname().sysname == 'Windows_NT'
 --- if root_dir then
 ---   print("Found git repository at", root_dir)
 --- end
---- 
+--- ``` --- ---@param start (string) Initial path. ---@return fun(_, dir: string): string? # Iterator @@ -165,7 +166,8 @@ end --- to narrow the search to find only that type. --- --- Examples: ----
lua
+---
+--- ```lua
 --- -- location of Cargo.toml from the current buffer's path
 --- local cargo = vim.fs.find('Cargo.toml', {
 ---   upward = true,
@@ -183,7 +185,7 @@ end
 --- local cpp_hpp = vim.fs.find(function(name, path)
 ---   return name:match('.*%.[ch]pp$') and path:match('[/\\\\]lib$')
 --- end, {limit = math.huge, type = 'file'})
---- 
+--- ``` --- ---@param names (string|string[]|fun(name: string, path: string): boolean) Names of the items to find. --- Must be base names, paths and globs are not supported when {names} is a string or a table. @@ -322,16 +324,17 @@ end --- variables are also expanded. --- --- Examples: ----
lua
----   vim.fs.normalize('C:\\\\Users\\\\jdoe')
----   --> 'C:/Users/jdoe'
 ---
----   vim.fs.normalize('~/src/neovim')
----   --> '/home/jdoe/src/neovim'
+--- ```lua
+--- vim.fs.normalize('C:\\\\Users\\\\jdoe')
+--- -- 'C:/Users/jdoe'
+---
+--- vim.fs.normalize('~/src/neovim')
+--- -- '/home/jdoe/src/neovim'
 ---
----   vim.fs.normalize('$XDG_CONFIG_HOME/nvim/init.vim')
----   --> '/Users/jdoe/.config/nvim/init.vim'
---- 
+--- vim.fs.normalize('$XDG_CONFIG_HOME/nvim/init.vim') +--- -- '/Users/jdoe/.config/nvim/init.vim' +--- ``` --- ---@param path (string) Path to normalize ---@param opts table|nil Options: -- cgit