ms-jpq / coq_nvim

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

Snippets #65

Closed UltiRequiem closed 3 years ago

UltiRequiem commented 3 years ago

This works:

require("lspconfig").pyright.setup(coq.lsp_ensure_capabilities({}))

But no snippets:

image

But this dont

vim.schedule(function ()
  local lsp = require "lspconfig"
  require("packer").loader("coq_nvim coq.artifacts")
  lsp.pyright.setup(require("coq")().lsp_ensure_capabilities({}))
end)

What I'm doing wrong?

image

ms-jpq commented 3 years ago

humm weird, can you please pull latest and try again?

use { 'ms-jpq/coq_nvim', branch = 'coq'} -- main one
use { 'ms-jpq/coq.artifacts', branch= 'artifacts'} -- 9000+ Snippets

I just pushed a bunch of changes and hopefully you can just do:

local lsp = require "lspconfig"
local coq = require "coq" -- add this

lsp.<server>.setup(<stuff...>)                              -- before
lsp.<server>.setup(coq.lsp_ensure_capabilities(<stuff...>)) -- after
heygarrett commented 3 years ago

After pulling the most recent changes I'm not getting any snippet suggestions, but I'm also not getting any errors. Current setup:

local nvim_lsp = require 'lspconfig'
local coq = require 'coq'

local servers = { 'pyright', 'rust_analyzer', 'sourcekit' }
for _, lsp in ipairs(servers) do
    nvim_lsp[lsp].setup(coq.lsp_ensure_capabilities({}))
end

Edit: coq wasn't auto-starting, so it looks like let g:coq_settings = { 'auto_start': v:true } may not be working.