(`vim.lsp.util.open_floating_preview.Opts?`) See
|vim.lsp.util.open_floating_preview.Opts|.
Return (multiple): ~
(`integer?`) buffer id of float window
(`integer?`) window id of float window
rename({old_fname}, {new_fname}, {opts}) *vim.lsp.util.rename()*
Rename old_fname to new_fname
Existing buffers are renamed as well, while maintaining their bufnr.
It deletes existing buffers that conflict with the renamed file name only
when
• `opts` requests overwriting; or
• the conflicting buffers are not loaded, so that deleting them does not
result in data loss.
Parameters: ~
• {old_fname} (`string`)
• {new_fname} (`string`)
• {opts} (`table?`) Options:
• {overwrite}? (`boolean`)
• {ignoreIfExists}? (`boolean`)
*vim.lsp.util.show_document()*
show_document({location}, {position_encoding}, {opts})
Shows document and optionally jumps to the location.
Parameters: ~
• {location} (`lsp.Location|lsp.LocationLink`)
• {position_encoding} (`'utf-8'|'utf-16'|'utf-32'?`)
• {opts} (`table?`) A table with the following fields:
• {reuse_win}? (`boolean`) Jump to existing
window if buffer is already open.
• {focus}? (`boolean`) Whether to focus/jump to
location if possible. (defaults: true)
Return: ~
(`boolean`) `true` if succeeded
*vim.lsp.util.symbols_to_items()*
symbols_to_items({symbols}, {bufnr}, {position_encoding})
Converts symbols to quickfix list items.
Parameters: ~
• {symbols} (`lsp.DocumentSymbol[]|lsp.SymbolInformation[]`)
list of symbols
• {bufnr} (`integer?`) buffer handle or 0 for current,
defaults to current
• {position_encoding} (`'utf-8'|'utf-16'|'utf-32'?`) default to first
client of buffer
Return: ~
(`vim.quickfix.entry[]`) See |setqflist()| for the format
==============================================================================
Lua module: vim.lsp.log *lsp-log*
The `vim.lsp.log` module provides logging for the Nvim LSP client.
When debugging language servers, it is helpful to enable extra-verbose logging
of the LSP client RPC events. Example: >lua
vim.lsp.set_log_level 'trace'
require('vim.lsp.log').set_format_func(vim.inspect)
<
Then try to run the language server, and open the log with: >vim
:lua vim.cmd('tabnew ' .. vim.lsp.get_log_path())
<
(Or use `:LspLog` if you have nvim-lspconfig installed.)
Note:
• Remember to DISABLE verbose logging ("debug" or "trace" level), else you may
encounter performance issues.
• "ERROR" messages containing "stderr" only indicate that the log was sent to
stderr. Many servers send harmless messages via stderr.
get_filename() *vim.lsp.log.get_filename()*
Returns the log filename.
Return: ~
(`string`) log filename
get_level() *vim.lsp.log.get_level()*
Gets the current log level.
Return: ~
(`integer`) current log level
set_format_func({handle}) *vim.lsp.log.set_format_func()*
Sets the formatting function used to format logs. If the formatting
function returns nil, the entry won't be written to the log file.
Parameters: ~
• {handle} (`fun(level:string, ...): string?`) Function to apply to log
entries. The default will log the level, date, source and
line number of the caller, followed by the arguments.
set_level({level}) *vim.lsp.log.set_level()*