Cmp documentation
Hi , thanks for your work , I am currently using nvim with csharp-language-server with lsp-zero , installed through Mason , and noticed when I am choosing from the cmp there is no description being provided , is that my config issue or this feature does not provided ?
But i still can see description via vim.lsp.buf.hover().
here is my lsp config
local lsp = require('lsp-zero')
lsp.preset("recommended")
local cmp = require("cmp")
cmp.setup({
snippet = {
expand = function(args)
require('luasnip').lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
select = true
}),
}),
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'buffer' },
}),
})
lsp.on_attach(function(client, bufnr)
lsp.default_keymaps({ buffer = bufnr })
end)
-- Fix Undefined global 'vim'
lsp.configure('lua_ls', {
settings = {
Lua = {
diagnostics = {
globals = { 'vim' }
}
}
}
})
local lspconfig = require('lspconfig');
lspconfig.csharp_ls.setup({
root_dir = function(startpath)
return lspconfig.util.root_pattern("*.sln")(startpath)
or lspconfig.util.root_pattern("*.csproj")(startpath)
or lspconfig.util.root_pattern("*.fsproj")(startpath)
or lspconfig.util.root_pattern(".git")(startpath)
end,
})
lsp.setup()
vim.diagnostic.config({
virtual_text = true
})
I think this could be related to https://github.com/razzmatazz/csharp-language-server/issues/30
In particular autocompletion methods provided by roslyn do not provide this information (or did not provide it at the time -- I might need to revise this)
Thanks for the responce , i will check this
Have same problem. Hope it gets fixed.