Closed mcchrish closed 3 years ago
Also, it's not just the icons is not working but the whole coq, i.e. no completion.
Hey @mcchrish , I believe the issue is that the lua expression {}
(which is what display.icons.alias
and display.icons.mappings
are set to in the config you posted) is translated into a vimscript list, and not a dict.
And, coq
is not "silently failing", if you type in :COQnow
, it shows you the error message that the expression type is incorrect.
If you want coq
to start automatically on vim startup, you have to set coq_settings.auto_start
to either true
or "shut-up"
(the latter silences a friendly greeting).
Ie, if you modify your config like this:
vim.g.coq_settings = {
auto_start = true,
display = {
icons = {
mode = "short",
alias = {},
mappings = {},
},
},
}
coq
will give you the error message.
I don't think it's related to nvim's translation from table to list/dict. Here's my actual config:
Since it's not an empty table, it should be unambiguously a dict.
And,
coq
is not "silently failing", if you type in:COQnow
, it shows you the error message that the expression type is incorrect.
It does not for me. Running :COQnow
does nothing and no error message is returned. Also all other COQ*
commands does not work too.
It works fine if I remove the alias
, or mappings
.:
vim.g.coq_settings = {
display = {
icons = {
mode = "short",
},
},
}
Ah, I checked out your config, and the alias
setting is actually supposed to be aliases
(sorry for not catching that earlier). When I tried to run :COQnow
with your config, it correctly pointed out this mistake. And when I correct that mistake, :COQnow
runs perfectly fine, and I coq
starts to work again.
If :COQnow
is not giving you error messages, could you run :messages
after you run :COQnow
? Maybe your nvim settings don't show multi line messages immediately (this is all pure speculation)?
Ah, I checked out your config, and the
alias
setting is actually supposed to bealiases
(sorry for not catching that earlier).
That works 😄. Thanks!
It's still strange, right? Coq should be able to point out errors in config. Even the most minimal config does not work:
vim.g.coq_settings = { test = "wrong config" } -- Coq should say something about wrong config
vim.g.coq_settings = { } -- doesn't work as well
Nothing from :messages
too.
This is very wierd indeed. When I type in :COQnow
with the above settings, error messages show up for any invalid configuration. I'm at a loss as to how to debug this 😆
If you remove alias and mappings, it's working fine.
COQnow
orCOQstats
does not report anything.