ms-jpq / coq_nvim

Fast as FUCK nvim completion. SQLite, concurrent scheduler, hundreds of hours of optimization.
GNU General Public License v3.0
3.52k stars 97 forks source link

Function signature not displayed in completion menu #494

Open desolatorxxl opened 2 years ago

desolatorxxl commented 2 years ago

I can't find a way to view the function signature (like func split(s string, sep string)) with coq_nvim.

It does not seem to be an issue of the LSP server, plain nvim-lspconfig with omnifunc completion is showing me a signatures for each function:

image

While coq_nvim only shows me a description, with no hint on what arguments to pass to the function:

image

I currently only have tried the gopls (Go) LSP server for this, here is my config:

lua << EOF
local lspconfig = require('lspconfig')

vim.g.coq_settings = { auto_start = 'shut-up' }

local on_attach = function(client, bufnr)
  -- Enable completion triggered by <c-x><c-o>
  vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
end

local servers = { 'gopls' }
for _, lsp in ipairs(servers) do
  lspconfig[lsp].setup(require('coq').lsp_ensure_capabilities({
    on_attach = on_attach,
  }))
end
EOF

Is it possible to display function signatures with coq_nvim?

onhernandes commented 1 year ago

I'm having the same problem

zzhuolun commented 1 year ago

Same