From ee44b2189827e6a34530ad8b55f214a0a809c045 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sat, 29 Jun 2024 22:04:40 +0300 Subject: [PATCH] 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. ## Does this PR fix an existing issue? Fixes #3855 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/coding.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/lazyvim/plugins/coding.lua b/lua/lazyvim/plugins/coding.lua index 6ad614a3..4e79d6dd 100644 --- a/lua/lazyvim/plugins/coding.lua +++ b/lua/lazyvim/plugins/coding.lua @@ -49,11 +49,14 @@ return { { name = "buffer" }, }), formatting = { - format = function(_, item) + format = function(entry, item) local icons = LazyVim.config.icons.kinds if icons[item.kind] then item.kind = icons[item.kind] .. item.kind end + if entry.context.filetype == "rust" then + item.menu = nil + end return item end, },