aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-10-23 20:15:52 -0400
committerGitHub <noreply@github.com>2025-10-23 20:15:52 -0400
commitc05ff026bc8f4e8a1ee48b19ea384f7feb6e2d79 (patch)
tree3fbedb2862ba9a07caddf988210b360dfe656700 /runtime/lua
parent07d0da64ed51202f0dbd92d43c89aa5f246b175e (diff)
parenta983e6970814962a219566cee635b720ad88c64b (diff)
downloadrneovim-c05ff026bc8f4e8a1ee48b19ea384f7feb6e2d79.tar.gz
rneovim-c05ff026bc8f4e8a1ee48b19ea384f7feb6e2d79.tar.bz2
rneovim-c05ff026bc8f4e8a1ee48b19ea384f7feb6e2d79.zip
Merge #36028 docs
Diffstat (limited to 'runtime/lua')
-rw-r--r--runtime/lua/vim/lsp.lua6
-rw-r--r--runtime/lua/vim/lsp/client.lua6
-rw-r--r--runtime/lua/vim/shared.lua4
-rw-r--r--runtime/lua/vim/treesitter/_headings.lua2
4 files changed, 9 insertions, 9 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index 40178cadb9..bb1fe6fa20 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -301,9 +301,9 @@ end
--- filetypes = { 'c', 'cpp' },
--- }
--- ```
---- - Get the resolved configuration for "luals":
+--- - Get the resolved configuration for "lua_ls":
--- ```lua
---- local cfg = vim.lsp.config.luals
+--- local cfg = vim.lsp.config.lua_ls
--- ```
---
---@since 13
@@ -522,7 +522,7 @@ end
---
--- ```lua
--- vim.lsp.enable('clangd')
---- vim.lsp.enable({'luals', 'pyright'})
+--- vim.lsp.enable({'lua_ls', 'pyright'})
--- ```
---
--- Example: [lsp-restart]() Passing `false` stops and detaches the client(s). Thus you can
diff --git a/runtime/lua/vim/lsp/client.lua b/runtime/lua/vim/lsp/client.lua
index f6c3084ef7..abf86a843a 100644
--- a/runtime/lua/vim/lsp/client.lua
+++ b/runtime/lua/vim/lsp/client.lua
@@ -34,9 +34,9 @@ local all_clients = {}
--- @class vim.lsp.ClientConfig
---
---- Callback invoked before the LSP "initialize" phase, where `params` contains the parameters
---- being sent to the server and `config` is the config that was passed to |vim.lsp.start()|.
---- You can use this to modify parameters before they are sent.
+--- Callback which can modify parameters before they are sent to the server. Invoked before LSP
+--- "initialize" phase (after `cmd` is invoked), where `params` is the parameters being sent to the
+--- server and `config` is the config passed to |vim.lsp.start()|.
--- @field before_init? fun(params: lsp.InitializeParams, config: vim.lsp.ClientConfig)
---
--- Map overriding the default capabilities defined by |vim.lsp.protocol.make_client_capabilities()|,
diff --git a/runtime/lua/vim/shared.lua b/runtime/lua/vim/shared.lua
index 8c55081050..b4827d0f54 100644
--- a/runtime/lua/vim/shared.lua
+++ b/runtime/lua/vim/shared.lua
@@ -826,7 +826,7 @@ end
---
---@see https://github.com/openresty/luajit2#tableisarray
---
----@param t? table
+---@param t? any
---@return boolean `true` if array-like table, else `false`.
function vim.isarray(t)
if type(t) ~= 'table' then
@@ -1246,7 +1246,7 @@ end
--- Returns true if object `f` can be called as a function.
---
----@param f any Any object
+---@param f? any Any object
---@return boolean `true` if `f` is callable, else `false`
function vim.is_callable(f)
if type(f) == 'function' then
diff --git a/runtime/lua/vim/treesitter/_headings.lua b/runtime/lua/vim/treesitter/_headings.lua
index e38d3134a8..82c15557db 100644
--- a/runtime/lua/vim/treesitter/_headings.lua
+++ b/runtime/lua/vim/treesitter/_headings.lua
@@ -95,7 +95,7 @@ function M.show_toc(qf_height)
-- add indentation for nicer list formatting
for _, heading in pairs(headings) do
-- Quickfix trims whitespace, so use non-breaking space instead
- heading.text = ('\194\160'):rep(heading.level - 1) .. heading.text
+ heading.text = ('\194\160'):rep((heading.level - 1) * 2) .. heading.text
end
vim.fn.setloclist(0, headings, ' ')
vim.fn.setloclist(0, {}, 'a', { title = 'Table of contents' })