Skip to content

Commit

Permalink
feat(lsp): support completion itemDefaults
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaSolOs authored and altermo committed Feb 27, 2024
1 parent 3d96e3f commit 37a4848
Show file tree
Hide file tree
Showing 16 changed files with 3,624 additions and 3,709 deletions.
951 changes: 0 additions & 951 deletions runtime/autoload/tohtml.vim

This file was deleted.

31 changes: 31 additions & 0 deletions runtime/doc/lua.txt
Expand Up @@ -4363,4 +4363,35 @@ vim.text.hexencode({str}) *vim.text.hexencode()*
(`string`) Hex encoded string


==============================================================================
Lua module: tohtml *vim.tohtml*


:TOhtml {file} *:TOhtml*
Converts the buffer shown in the current window to HTML, opens the generated
HTML in a new split window, and saves its contents to {file}. If {file} is not
given, a temporary file (created by |tempname()|) is used.


tohtml.tohtml({winid}, {opt}) *tohtml.tohtml.tohtml()*
Converts the buffer shown in the window {winid} to HTML and returns the
output as a list of string.

Parameters: ~
{winid} (`integer?`) Window to convert (defaults to current window)
{opt} (`table??`) Optional parameters.
• title (string): Title tag to set in the generated HTML code
(defaults to buffer name)
• number_lines (boolean): Show line numbers (defaults to
`false`)
• font (string|string[]): Fonts to use (defaults to
`guifont`)
• width (integer) Width used for items which are either right
aligned or repeat a character infinitely (defaults to
'textwidth' if non-zero or window width otherwise)

Return: ~
(`string[]`)


vim:tw=78:ts=8:sw=4:sts=4:et:ft=help:norl:
17 changes: 17 additions & 0 deletions runtime/doc/news.txt
Expand Up @@ -125,6 +125,18 @@ The following changes may require adaptations in user config or plugins.
• Returning any truthy value from a callback passed to |nvim_create_autocmd()|
(rather than just `true`) will delete the autocommand.

|vim.lsp.util.extract_completion_items()| will no longer return reliable
results, since it does not apply `itemDefaults` when its input is a
`CompletionList`.
Moreover, since support for LSP `completionList.itemDefaults` was added,
some third party plugins might be negatively impacted in case the language
servers support the feature but the plugin does not.
If necessary, the respective capability can be
removed when calling |vim.lsp.protocol.make_client_capabilities()|.

|:TOhtml| has been rewritten in Lua to support Neovim-specific decorations,
and many options have been removed.

==============================================================================
BREAKING CHANGES IN HEAD *news-breaking-dev*

Expand Down Expand Up @@ -213,6 +225,11 @@ The following new APIs and features were added.
the original LSP `Location` or `LocationLink`.
• Added support for connecting to servers using named pipes (Windows) or
unix domain sockets (Unix) via |vim.lsp.rpc.domain_socket_connect()|.
• Added support for `completionList.itemDefaults`, reducing overhead when
computing completion items where properties often share the same value
(e.g. `commitCharacters`). Note that this might affect plugins and
language servers that don't support the feature, and in such cases the
respective capability can be unset.

• Treesitter
• Bundled parsers and queries (highlight, folds) for Markdown, Python, and
Expand Down

0 comments on commit 37a4848

Please sign in to comment.