Closed IndianBoy42 closed 3 years ago
lua coq.COQnow()
seems to do the trick once the extension is loaded
This worked for me:
I created a new file ~/.config/nvim/after/plugin/coq.lua
and set
vim.cmd('COQnow')
local lsp = require 'lspconfig'
lsp.gopls.setup(coq.lsp_ensure_capabilities({
cmd = {"gopls", "serve"},
settings = {
gopls = {
analyses = {
unusedparams = true,
},
staticcheck = true,
},
},
}))
I did try both of them but unfortunately still getting an error:
E5108: Error executing lua [string ":lua"]:1: attempt to index global 'coq' (a nil value)
I guess maybe is sill too early to execute command. I'm using packer as plugin manager. Does any of you use it?
If you're using packer to lazy load coq_nvim
then it won't work. You want to load it on demand, else coq
variable won't be available, hence the error.
use {'ms-jpq/coq_nvim'}
No, I'm not using packer to lazy load coq_nvim
.
use {'ms-jpq/coq_nvim'}
use {'ms-jpq/coq.artifacts'}
I have noticed some issues in other threads related to packer, so my suspicions is packer-coq relation. That's the reason of my question about it.
You can use autocmd VimEnter * COQnow
.
@gohm44
If you are using packer
, the load order is a bit funny.
Please update my repo and use the following config:
vim.schedule(function ()
local lsp = require "lspconfig"
require("packer").loader("coq_nvim coq.artifacts")
lsp.<server>.setup(require("coq")().lsp_ensure_capabilities(<stuff...>))
end)
Added a --shut-up
flag.
:COQnow --shut-up
will make coq.nvim
not print the apple style greeting message in like 12 different languages.
I don't really want to have to run COQnow everytime
I tried to run it in
init.lua
but its giving me an error that it is not an editor command