From 09f2c8d8edda31f292d28d69f66c52becede415b Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Mon, 11 Aug 2025 11:36:35 -0700 Subject: [PATCH] docs(lsp): specify formatting_options type (#35302) --- runtime/doc/lsp.txt | 6 +++--- runtime/lua/vim/lsp/buf.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 4d014ee0d5..2c9a251e60 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -1425,9 +1425,9 @@ format({opts}) *vim.lsp.buf.format()* Parameters: ~ • {opts} (`table?`) A table with the following fields: - • {formatting_options}? (`table`) Can be used to specify - FormattingOptions. Some unspecified options will be - automatically derived from the current Nvim options. See + • {formatting_options}? (`lsp.FormattingOptions`) Can be used + to specify FormattingOptions. Some unspecified options will + be automatically derived from the current Nvim options. See https://microsoft.github.io/language-server-protocol/specification/#formattingOptions • {timeout_ms}? (`integer`, default: `1000`) Time in milliseconds to block for formatting requests. No effect if diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index 49e2ff0a8c..6dc90f7184 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -516,7 +516,7 @@ end --- Can be used to specify FormattingOptions. Some unspecified options will be --- automatically derived from the current Nvim options. --- See https://microsoft.github.io/language-server-protocol/specification/#formattingOptions ---- @field formatting_options? table +--- @field formatting_options? lsp.FormattingOptions --- --- Time in milliseconds to block for formatting requests. No effect if async=true. --- (default: `1000`)