lspkind-nvim
vscode-like pictograms for neovim lsp completion items [Moved to: https://github.com/onsails/lspkind.nvim] (by onsails)
cmp-nvim-lsp
nvim-cmp source for neovim builtin LSP client (by hrsh7th)
lspkind-nvim | cmp-nvim-lsp | |
---|---|---|
4 | 22 | |
541 | 1,050 | |
- | - | |
6.2 | 5.1 | |
about 2 years ago | 4 months ago | |
Lua | Lua | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lspkind-nvim
Posts with mentions or reviews of lspkind-nvim.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-07-16.
-
Configurando Neovim para Java
local cmp = require 'cmp'; local lspkind = require 'lspkind' cmp.setup({ snippet = { expand = function(args) require('luasnip').lsp_expand(args.body) end }, mapping = cmp.mapping.preset.insert({ ['C-Space'] = cmp.mapping.complete(), [''] = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }), }), sources = cmp.config.sources({ { name = 'nvim_lsp' }, { name = 'buffer' }, }), formatting = { format = lspkind.cmp_format({ mode = 'symbol', -- show only symbol annotations maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) ellipsis_char = '...', -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) -- The function below will be called before any actual modifications from lspkind -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30)) before = function(entry, vim_item) return vim_item end }) } }) require('jdtls').start_or_attach(config)
-
Neovim - Workflow para Java, C# e JS/TypeScript (Atualização com Neovim 0.8 e LSP)
lspkind-nvim: plugin para adicionar ícones nas entidades de LSP (classe, método, snippet, etc) igual ao VS Code.
-
My Neovim setup for React, TypeScript, Tailwind CSS, etc
onsails/lspkind-nvim - VSCode-like pictograms
-
CMP acting up
local cmp_status_ok, cmp = pcall(require, "cmp") if not cmp_status_ok then return end local lspkind_status_ok, lspkind = pcall(require, "lspkind") if not lspkind_status_ok then return end local check_backspace = function() local col = vim.fn.col(".") - 1 return col == 0 or vim.fn.getline("."):sub(col, col):match("%s") end local source_mapping = { nvim_lsp = "[LSP]", cmp_tabnine = "[TN]", buffer = "[Buffer]", path = "[Path]", } cmp.setup({ mapping = { [""] = cmp.mapping.select_prev_item(), [""] = cmp.mapping.select_next_item(), [""] = cmp.mapping(cmp.mapping.scroll_docs(-1), { "i", "c" }), [""] = cmp.mapping(cmp.mapping.scroll_docs(1), { "i", "c" }), [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), [""] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. [""] = cmp.mapping({ i = cmp.mapping.abort(), c = cmp.mapping.close(), }), -- Accept currently selected item. If none selected, `select` first item. -- Set `select` to `false` to only confirm explicitly selected items. [""] = cmp.mapping.confirm({ select = true }), [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() else fallback() end end, { "i", "s" }), [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() else fallback() end end, { "i", "s" }), }, formatting = { fields = { "kind", "abbr", "menu" }, format = lspkind.cmp_format({ mode = "symbol_text", -- options: 'text', 'text_symbol', 'symbol_text', 'symbol' maxwidth = 40, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) -- The function below will be called before any actual modifications from lspkind -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30)) before = function(entry, vim_item) vim_item.kind = lspkind.presets.default[vim_item.kind] local menu = source_mapping[entry.source.name] if entry.source.name == "cmp_tabnine" then if entry.completion_item.data ~= nil and entry.completion_item.data.detail ~= nil then menu = entry.completion_item.data.detail .. " " .. menu end vim_item.kind = "" end vim_item.menu = menu return vim_item end, }), }, sources = { { name = "nvim_lsp" }, { name = "cmp_tabnine" }, { name = "buffer" }, { name = "path" }, }, confirm_opts = { behavior = cmp.ConfirmBehavior.Replace, select = false, }, experimental = { ghost_text = false, }, }) local tabnine = require("cmp_tabnine.config") tabnine:setup({ max_lines = 1000, max_num_results = 20, sort = true, run_on_every_keystroke = true, snippet_placeholder = "..", ignored_file_types = { -- default is not to ignore -- uncomment to ignore in lua: -- lua = true }, show_prediction_strength = true, })
cmp-nvim-lsp
Posts with mentions or reviews of cmp-nvim-lsp.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-08-25.
-
[Need Help]: I am having trouble getting autocomplete with clangd.
You need to add nvim-cmp and cmp-nvim-lsp
-
Neovim lsp not updating (Nuxt 3 auto import)
I had the exact problem recently with svelte and Astro. I opened an issue that never got any reply.: https://github.com/hrsh7th/cmp-nvim-lsp/issues/56
-
Trouble with installing cmp/lsp autocompletion
Plugins Needed: * nvim-lspconfig * nvim-cmp * cmp-nvim-lsp
-
How to setup auto completion, etc. using LSP and stuff without bloating everything with a plugin manager?
-- need to install https://github.com/hrsh7th/cmp-nvim-lsp for server in pairs(servers) do lspconfig[server].setup { on_attach = on_attach, capabilities = require("cmp_nvim_lsp").default_capabilities(), settings = servers[server], } end ```
-
Make lsp-zero.nvim coexists with other plugins instead of controlling them
cmp-nvim-lsp: Completion source. Shows data send by the language server.
-
Jdt.ls doesn't work in nvim-lspconfig
The default capabilities are from this plugin: https://github.com/hrsh7th/cmp-nvim-lsp
-
Neovim - Workflow para Java, C# e JS/TypeScript (Atualização com Neovim 0.8 e LSP)
cmp-nvim-lsp: integração com LSP;
-
How to have LSPs installed with Mason automatically hook up to cmp and work?
nvim-lspconfig is only for configuring the language-servers. You need to add the https://github.com/hrsh7th/cmp-nvim-lsp source to nvim-cmp in order to get lsp completions
-
cmp_nvim_lsp.update_capabilities is deprecated, use cmp_nvim_lsp.default_capabilities instead. See :h deprecated This function will be removed in cmp-nvim-lsp version 1.0.0
Peeking at the code, it is explicitly called out in the function update_capabilities here
-
Is it a bad config or cmp isn't as smart as VSCode autocompletion?
Yep. Make sure you have cmp-nvim-lsp installed, as well as an LSP server running.
What are some alternatives?
When comparing lspkind-nvim and cmp-nvim-lsp you can also consider the following projects:
lspsaga.nvim - improve neovim lsp experience [Moved to: https://github.com/nvimdev/lspsaga.nvim]
nvim-cmp - A completion plugin for neovim coded in Lua.
vscode-codicons - The icon font for Visual Studio Code
coc.nvim - Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
nvim-lspconfig - Quickstart configs for Nvim LSP
lspkind.nvim - vscode-like pictograms for neovim lsp completion items
nvim-compe - Auto completion Lua plugin for nvim
nlsp-settings.nvim - A plugin for setting Neovim LSP with JSON or YAML files
rust-tools.nvim - Tools for better development in rust using neovim's builtin lsp
lspkind-nvim vs lspsaga.nvim
cmp-nvim-lsp vs nvim-cmp
lspkind-nvim vs vscode-codicons
cmp-nvim-lsp vs coc.nvim
lspkind-nvim vs nvim-lspconfig
cmp-nvim-lsp vs lspkind.nvim
lspkind-nvim vs nvim-compe
cmp-nvim-lsp vs nvim-lspconfig
lspkind-nvim vs nlsp-settings.nvim
cmp-nvim-lsp vs nvim-compe
lspkind-nvim vs rust-tools.nvim
cmp-nvim-lsp vs vscode-codicons