Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Strange completion sorting with right behavior after backspace #401

Open
ghost opened this issue Sep 18, 2021 · 0 comments
Open

Strange completion sorting with right behavior after backspace #401

ghost opened this issue Sep 18, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 18, 2021

Relevant information

Nvim v.0.5.0
LuaJIT 2.1.0-beta3
Clangd 12.0.1

init.vim

lua require'lspconfig'.clangd.setup{on_attach=require'completion'.on_attach}
inoremap pumvisible() ? "<C-n>" : "<Tab>"
inoremap pumvisible() ? "<C-p>" : "<S-Tab>"

set number
set relativenumber
set completeopt=menuone,noinsert,noselect
set shortmess+=c
let g:completion_matching_strategy_list = [ 'exact' , 'substring' , 'fuzzy' ]
let g:completion_matching_ignore_case = 1
let g:completion_trigger_character = ['.', '->']
let g:completion_sorting = "length"

Issue and expectation

When I start to type vkimage I will get this when I get to letter i:

•VkImageFormatListCreateInfoKHR
•VkFilter
•VkDeviceSize
•vkQueueWaitIdle(VkQueue queue)
•VkPipelineLayout
•VkSubmitInfo2KHR
•VkLayerProperties
...

Also, VkImage will not show up, even if I type the the whole word vkimage.

But, if I press backspace to remove letter i and type it again, I will get this:

•VkImage
•VkInstance
•VkImageType
•VkImageView
•VkIndexType
•VkIndexType
•VkImageCopy
•VkImageCopy
•VkImageType
...

Which is what I am expecting. I can reproduce this issue with other words too. Not sure how to start testing the root cause.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants