Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

补全结果为乱序的 #11

Open
evpeople opened this issue Sep 4, 2024 · 2 comments
Open

补全结果为乱序的 #11

evpeople opened this issue Sep 4, 2024 · 2 comments

Comments

@evpeople
Copy link

evpeople commented Sep 4, 2024

image 在外部输入时,为 image 按键u会出在 "的"字 和 ~ 符号,但 "的" 字在第一个,但是在Neovim的,”的“ 字序号为 1 ,但并不是 空格补全的首选项
@liubianshi
Copy link
Owner

cmp-lsp-rimels 不会改变 cmp 的候选项顺序,正常情况下 1. 会在 2. 之前,感觉问题可能出现在 cmp 的 sorting 设置。这块我也不太熟悉,你可以参考下面的配置:

-- cmp 會自己排序, 要配置裏把 sort_text 手動提前
local cmp = require 'cmp'
local compare = require 'cmp.config.compare'
cmp.setup {
  -- 其他设置 blabla
  -- ......

  -- 设置排序顺序
  sorting = {
    comparators = {
      compare.sort_text,
      compare.offset,
      compare.exact,
      compare.score,
      compare.recently_used,
      compare.kind,
      compare.length,
      compare.order,
    }
  },

  -- 其他配置 blabla
  -- ......
}

对应的链接在 https://github.com/wlh320/rime-ls/blob/master/doc/nvim.md

@evpeople
Copy link
Author

evpeople commented Sep 4, 2024

感谢,我现在先把这个符号显示的功能直接在 rime 的配置中关掉了。

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

No branches or pull requests

2 participants