aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/buf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r--runtime/lua/vim/lsp/buf.lua21
1 files changed, 3 insertions, 18 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua
index 17b444a6e8..0369725216 100644
--- a/runtime/lua/vim/lsp/buf.lua
+++ b/runtime/lua/vim/lsp/buf.lua
@@ -122,7 +122,7 @@ end
---@private
---@param bufnr integer
---@param mode "v"|"V"
----@return table {start={row, col}, end={row, col}} using (1, 0) indexing
+---@return table {start={row,col}, end={row,col}} using (1, 0) indexing
local function range_from_selection(bufnr, mode)
-- TODO: Use `vim.region()` instead https://github.com/neovim/neovim/pull/13896
@@ -189,7 +189,7 @@ end
--- Restrict formatting to the client with name (client.name) matching this field.
---
--- - range (table|nil) Range to format.
---- Table must contain `start` and `end` keys with {row, col} tuples using
+--- Table must contain `start` and `end` keys with {row,col} tuples using
--- (1,0) indexing.
--- Defaults to current selection in visual mode
--- Defaults to `nil` in other modes, formatting the full buffer
@@ -741,7 +741,7 @@ end
--- - range: (table|nil)
--- Range for which code actions should be requested.
--- If in visual mode this defaults to the active selection.
---- Table must contain `start` and `end` keys with {row, col} tuples
+--- Table must contain `start` and `end` keys with {row,col} tuples
--- using mark-like indexing. See |api-indexing|
---
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_codeAction
@@ -796,19 +796,4 @@ function M.execute_command(command_params)
request('workspace/executeCommand', command_params)
end
---- Enable/disable/toggle inlay hints for a buffer
----@param bufnr (integer) Buffer handle, or 0 for current
----@param enable (boolean|nil) true/false to enable/disable, nil to toggle
-function M.inlay_hint(bufnr, enable)
- vim.validate({ enable = { enable, { 'boolean', 'nil' } }, bufnr = { bufnr, 'number' } })
- local inlay_hint = require('vim.lsp._inlay_hint')
- if enable then
- inlay_hint.enable(bufnr)
- elseif enable == false then
- inlay_hint.disable(bufnr)
- else
- inlay_hint.toggle(bufnr)
- end
-end
-
return M