mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
feat(cmp): disable item.menu
for Rust filetypes (#3858)
## What is this PR for? Tries to improve aesthetics for `nvim-cmp` in Rust by disabling `item.menu` since it contains the `return` types that take up too much space. <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Does this PR fix an existing issue? Fixes #3855 <!-- If this PR fixes any issues, please link to the issue here. Fixes #<issue_number> --> ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
parent
8c900f92e7
commit
ee44b21898
1 changed files with 4 additions and 1 deletions
|
@ -49,11 +49,14 @@ return {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
}),
|
}),
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(_, item)
|
format = function(entry, item)
|
||||||
local icons = LazyVim.config.icons.kinds
|
local icons = LazyVim.config.icons.kinds
|
||||||
if icons[item.kind] then
|
if icons[item.kind] then
|
||||||
item.kind = icons[item.kind] .. item.kind
|
item.kind = icons[item.kind] .. item.kind
|
||||||
end
|
end
|
||||||
|
if entry.context.filetype == "rust" then
|
||||||
|
item.menu = nil
|
||||||
|
end
|
||||||
return item
|
return item
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue