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

Strange completion sorting with right behavior after backspace  #401

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions