coq_nvim
coq_nvim copied to clipboard
Failed to start server: no such file or directory
Hello, I'm getting the following error during startup:
Error detected while processing /home/sg315781/.local/share/nvim/site/pack/packer/start/coq_nvim/plugin/coq.vim:
line 1:
E5108: Error executing lua Vim:Failed to start server: no such file or directory
stack traceback:
[C]: in function 'serverstart'
...l/share/nvim/site/pack/packer/start/coq_nvim/lua/coq.lua:120: in function 'Now'
...l/share/nvim/site/pack/packer/start/coq_nvim/lua/coq.lua:187: in main chunk
[C]: in function 'require'
[string "luaeval()"]:1: in main chunk
Press ENTER or type command to continue
The error leads to this piece of code
==============================================================
src: lua/coq.lua:120
==============================================================
local srv = is_win and {"localhost:0"} or {}
local server = vim.fn.serverstart(unpack(srv))
==============================================================
I experimented with it a bit and it seems that the error comes from the vim.fn.serverstart(unpack({}))
call which takes place when local is_win = vim.fn.has("win32") == 1
is evaluated to false
After changing the forementioned snippet to the following, everything works fine:
==============================================================
src: lua/coq.lua:120
==============================================================
local srv = {"localhost:0"}
local server = vim.fn.serverstart(unpack(srv))
==============================================================
I'm not sure what was the point of assigning conditionaly {}
to the srv
variable, but it looks like it always leads to an error. May I kindly ask you to have a look?
My configuration: WSL2 Ubuntu 22.04.3 LTS
I❯ wsl.exe --version
WSL version: 1.2.5.0
Kernel version: 5.15.90.1
WSLg version: 1.0.51
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.2428
I❯ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
I❯ git remote -v
origin https://github.com/ms-jpq/coq_nvim.git (fetch)
origin https://github.com/ms-jpq/coq_nvim.git (push)
I❯ git rev-parse HEAD
d4a58fa7ab20c928f88e416b3fcf6ada965bf314
use { 'ms-jpq/coq_nvim', -- prompting based on LSP, tags and content of other tmux panes
-- {{{
branch='coq',
run=':COQdeps',
config = function()
vim.g.coq_settings = {
auto_start = 'shut-up',
['display.ghost_text.highlight_group'] = 'Special',
['keymap.recommended'] = false,
['keymap.jump_to_mark'] = '',
['keymap.bigger_preview'] = '',
['keymap.pre_select'] = true,
['keymap.repeat'] = '<leader>.'
}
vim.api.nvim_exec([[
" Keybindings
ino <silent><expr> <Esc> pumvisible() ? "\<C-e><Esc>" : "\<Esc>"
ino <silent><expr> <C-c> pumvisible() ? "\<C-e><C-c>" : "\<C-c>"
ino <silent><expr> <BS> pumvisible() ? "\<C-e><BS>" : "\<BS>"
ino <silent><expr> <Right> pumvisible() ? (complete_info().selected == -1 ? "\<C-e><CR>" : "\<C-y>") : "\<Right>"
ino <silent><expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
ino <silent><expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<BS>"
" on enter exit popup and insert enter (otherwise we would enter the first option on "pre_select" enabled when we want to insert newline
ino <silent><expr> <CR> pumvisible() ? "\<C-e>\<CR>" : "\<CR>"
]], true)
end
} -- }}}
I posted a comment about how I resolved this over here: https://github.com/ms-jpq/coq_nvim/issues/606#issuecomment-1801073707