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/_meta/builtin.lua | 48 +++++++++++++++++++++------------------
 1 file changed, 26 insertions(+), 22 deletions(-)

(limited to 'runtime/lua/vim/_meta/builtin.lua')

diff --git a/runtime/lua/vim/_meta/builtin.lua b/runtime/lua/vim/_meta/builtin.lua
index d7b76a803c..0a6dd3e151 100644
--- a/runtime/lua/vim/_meta/builtin.lua
+++ b/runtime/lua/vim/_meta/builtin.lua
@@ -131,7 +131,8 @@ function vim.str_utf_pos(str) end
 --- The result can be added to {index} to get the starting byte of a character.
 ---
 --- Examples:
---- 
lua
+---
+--- ```lua
 --- -- The character 'æ' is stored as the bytes '\xc3\xa6' (using UTF-8)
 ---
 --- -- Returns 0 because the index is pointing at the first byte of a character
@@ -139,7 +140,7 @@ function vim.str_utf_pos(str) end
 ---
 --- -- Returns -1 because the index is pointing at the second byte of a character
 --- vim.str_utf_start('æ', 2)
---- 
+--- ``` --- --- @param str string --- @param index number @@ -150,7 +151,8 @@ function vim.str_utf_start(str, index) end --- to. --- --- Examples: ----
lua
+---
+--- ```lua
 --- -- The character 'æ' is stored as the bytes '\xc3\xa6' (using UTF-8)
 ---
 --- -- Returns 0 because the index is pointing at the last byte of a character
@@ -158,7 +160,7 @@ function vim.str_utf_start(str, index) end
 ---
 --- -- Returns 1 because the index is pointing at the penultimate byte of a character
 --- vim.str_utf_end('æ', 1)
---- 
+--- ``` --- --- @param str string --- @param index number @@ -204,7 +206,8 @@ function vim.schedule(callback) end --- this time. --- --- Examples: ----
lua
+---
+--- ```lua
 ---
 --- ---
 --- -- Wait for 100 ms, allowing other events to process
@@ -226,7 +229,7 @@ function vim.schedule(callback) end
 --- if vim.wait(10000, function() return vim.g.timer_result end) then
 ---   print('Only waiting a little bit of time!')
 --- end
---- 
+--- ``` --- --- @param time integer Number of milliseconds to wait --- @param callback? fun(): boolean Optional callback. Waits until {callback} returns true @@ -258,22 +261,23 @@ function vim.wait(time, callback, interval, fast_only) end --- likewise experimental). --- --- Example (stub for a |ui-popupmenu| implementation): ----
lua
----
----   ns = vim.api.nvim_create_namespace('my_fancy_pum')
----
----   vim.ui_attach(ns, {ext_popupmenu=true}, function(event, ...)
----     if event == "popupmenu_show" then
----       local items, selected, row, col, grid = ...
----       print("display pum ", #items)
----     elseif event == "popupmenu_select" then
----       local selected = ...
----       print("selected", selected)
----     elseif event == "popupmenu_hide" then
----       print("FIN")
----     end
----   end)
---- 
+--- +--- ```lua +--- ns = vim.api.nvim_create_namespace('my_fancy_pum') +--- +--- vim.ui_attach(ns, {ext_popupmenu=true}, function(event, ...) +--- if event == "popupmenu_show" then +--- local items, selected, row, col, grid = ... +--- print("display pum ", #items) +--- elseif event == "popupmenu_select" then +--- local selected = ... +--- print("selected", selected) +--- elseif event == "popupmenu_hide" then +--- print("FIN") +--- end +--- end) +--- ``` +--- --- @param ns integer --- @param options table --- @param callback fun() -- cgit