mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
vim-patch:9.1.1049: insert-completed items are always sorted
Problem: insert-completed items are always sorted, although the LSP
spec[1] standard defines sortText in the returned
completionitem list. This means that the server has sorted the
results. When fuzzy is enabled, this will break the server's
sorting results.
Solution: disable sorting of candidates when "nosort" is set in
'completeopt'
[1]
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem
closes: vim/vim#16501
f400a0cc41
Co-authored-by: glepnir <glephunter@gmail.com>
This commit is contained in:
@@ -1493,6 +1493,7 @@ local options = {
|
||||
'noinsert',
|
||||
'noselect',
|
||||
'fuzzy',
|
||||
'nosort',
|
||||
},
|
||||
flags = true,
|
||||
deny_duplicates = true,
|
||||
@@ -1537,6 +1538,10 @@ local options = {
|
||||
difference how completion candidates are reduced from the
|
||||
list of alternatives, but not how the candidates are
|
||||
collected (using different completion types).
|
||||
|
||||
nosort Disable sorting of completion candidates based on fuzzy
|
||||
scores when "fuzzy" is enabled. Candidates will appear
|
||||
in their original order.
|
||||
]=],
|
||||
full_name = 'completeopt',
|
||||
list = 'onecomma',
|
||||
|
Reference in New Issue
Block a user