Comments (8)
There is a way, like
for index, value in ipairs(vim.lsp.protocol.CompletionItemKind) do
cmp.lsp.CompletionItemKind[index] = value
end
(search other issues for original author, I think it was @windwp) But it definitely would be nicer if vim.lsp.protocol.CompletionItemKind
was used if set.
from nvim-cmp.
I will add the API to customize menu's. I think this customization should be realized on user-land.
from nvim-cmp.
I've added the API for it.
https://github.com/hrsh7th/nvim-cmp#formattingformat-type-funentry-cmpentry-vim_item-vimcompleteditem-vimcompleteditem
from nvim-cmp.
I will add the API to customize menu's. I think this customization should be realized on user-land.
I agree. Thanks!
from nvim-cmp.
Sweet. Thanks!
from nvim-cmp.
How would relevant function look without lspkind-nvim? Tried
formatting = {
format = function(_, vim_item)
vim_item.kind = vim.lsp.protocol.CompletionItemKind[vim_item.kind]
return vim_item
end,
},
but it does not display anything except for completion candidate itself.
from nvim-cmp.
vim_item.kind can be Function
/Snippet
/Folder
etc.
You should check vim.lsp.protocol.CompletionItemKind
keys.
And I think it doesn't problem. Is it a problem for you?
from nvim-cmp.
Ah, ok, so it won't work since vim.lsp.protocol.CompletionItemKind
is
vim.lsp.protocol.CompletionItemKind = {
'ﮜ [text]', -- Text = 1;
' [method]', -- Method = 2;
'ƒ [function]', -- Function = 3;
…
}
from nvim-cmp.
Related Issues (20)
- [Question] How would I fetch the current word that nvim cmp is completing against externally?
- preselection not working in command mode HOT 3
- Key mapping to select first snippet completion
- Disable this plugin for floating windows HOT 4
- Snippets and LSP suggestion are both inserted
- double quotes(quotes, etc) ignored by ghost text HOT 1
- Don't rely on `after/plugin` for registering sources HOT 1
- Strange bug with Svelte 5 emmet expansion - VS Code works fine
- Option to show the completion window above the cursor HOT 2
- Error "Vim:E976: Using a Blob as a String" when trying to type "snippet" word with nvim-cmp and LuaSnip HOT 1
- performance.debounce breaks cmdline completion HOT 1
- 1-5s Delay when snippets enabled for certain LSP HOT 2
- Suggetions disapearing when selecting next item. HOT 1
- [Bug] `lua require"cmp.utils.feedkeys".run(...)` is getting spammed into buffer HOT 1
- Ghost text appearing while editting a word... leads to confusion! HOT 3
- Ctrl-N doesn't work for buffers HOT 1
- completeopt beaks stuff (best match not showing up)
- [Proposal] Use NormalFloat instead of Normal for cmp.config.window.bordered()'s winhighlight HOT 1
- Mismatching in Fuzzy Completion HOT 13
- Use NormalFloat instead of Normal for cmp.config.window.bordered()'s winhighlight HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nvim-cmp.