nvim-lspconfig
nvim-lspconfig copied to clipboard
`^@` inserted where there should presumably be a newline
Description
^@ is inserted for completions where there should seemingly be a newline and indentation.
This occurs when the completion is the only possible candidate, as shown in the example below, and also when there are multiple completions to select from.
Neovim version
NVIM v0.7.2 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3
Nvim-lspconfig version
dcb7ebb36f0d2aafcc640f520bb1fc8a9cc1f7c8
Operating system and version
Kubuntu 22.04 LTS
Affected language servers
pyright
Steps to reproduce
nvim -nu minimal_init.lua(pyrightis already configured)- Load a new empty Python file (e.g.,
:e file.py) - Enter the following:
class C:
def __st
- While still in insert mode, press
<c-x><c-o>for auto completion
Actual behavior
The following shows the full file with the completed text. There is a ^@ string inserted where there should presumably be a newline.
class C:
def __str__(self) -> str:^@ pass
Expected behavior
I expected a newline and proper indentation instead of a ^@.
class C:
def __str__(self) -> str:
pass
Minimal config
minimal_init.lua without modifications
LSP log
N/A
Isn't this more of a core issue? nvim-lspconfig is just configuration.
"Isn't this more of a core issue? nvim-lspconfig is just configuration."
I just opened https://github.com/neovim/neovim/issues/20250.
It's a multiline snippet completion, which isn't supported in core yet -- you need a completion and snippet plugin for those.