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

Better comparators for completion entries? #939

Closed
fengxuway opened this issue Aug 9, 2023 · 5 comments
Closed

Better comparators for completion entries? #939

fengxuway opened this issue Aug 9, 2023 · 5 comments
Labels
cmp Nvim-cmp related issues usage User-specific issues

Comments

@fengxuway
Copy link

Feature description

image

如图,文件路径/bin/bash存在,但默认排序却放在第三位。当文件名有完全匹配的时候,建议完全匹配放在第一位。

Additional information

No response

@fengxuway fengxuway added the enhancement New feature or request label Aug 9, 2023
@fengxuway
Copy link
Author

或者这是哪个插件,我去对应仓库提交Issue?

@fengxuway
Copy link
Author

同样的还有这个特殊字符\ 在写 shell 的时候用于换行,
image

当输入\并回车时,目前效果:
image

预期效果:
image

@CharlesChiuGit
Copy link
Collaborator

:h cmp-config

@Jint-lzxy
Copy link
Collaborator

... put exact match first

This is controlled by cmp.comparators. We mainly focused on the results returned by language servers while updating cmp.comparators in #746. Feel free to open a PR if u think u have better implementation.

...and this special character \

This is provided by latex_symbols. Normally, u should press <C-w> first to close that pum and then press <CR>. Alternatively, you may disable auto-selection by commenting out this line:

["<CR>"] = cmp.mapping.confirm({ select = true, behavior = cmp.ConfirmBehavior.Replace }),

@Jint-lzxy Jint-lzxy changed the title 建议文件路径提示排序策略调整 Better comparators for completion entries? Aug 9, 2023
@Jint-lzxy Jint-lzxy added complexity:low Low-risk, unlikely to cause distant/indirect damage cmp Nvim-cmp related issues labels Aug 9, 2023
@fengxuway
Copy link
Author

fengxuway commented Aug 9, 2023

The character \ event, delete this line works for me. Thanks~

{ name = "latex_symbols" },

@CharlesChiuGit CharlesChiuGit closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2023
@Jint-lzxy Jint-lzxy added usage User-specific issues and removed enhancement New feature or request complexity:low Low-risk, unlikely to cause distant/indirect damage labels Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmp Nvim-cmp related issues usage User-specific issues
Projects
None yet
Development

No branches or pull requests

3 participants