mattn / efm-langserver

General purpose Language Server
MIT License
1.37k stars 61 forks source link

Error on vimrc: `Error: parse "": empty url` #157

Open rollschild opened 3 years ago

rollschild commented 3 years ago

Hi,

When I open up my .vimrc file using NeoVim, the following error showed up:

[coc.nvim] parse "": empty url
[coc.nvim] Server languageserver.efm failed to start: Error: parse "": empty url

and in NeoVim, looks like languageserver.efm keeps initializing itself but never finishes. Can someone please help me on this? Thanks in advance!

coc-settings.json:

    "efm": {
      "command": "efm-langserver",
      "args": [],
      "filetypes": ["vim", "markdown"]
    },
mattn commented 3 years ago

As far as I look the source code of Go and efm-langserver, Go and efm-langserver does not output log empty url.

obxhdx commented 3 years ago

I'm also experiencing the same problem. What I noticed is that it only happens when I start nvim from my home directory. I don't even need to edit a specific file, I simply open nvim and it happens. If I open nvim from any directory other than home, it doesn't happen.

Minimal vimrc:

set nocompatible
call plug#begin('/tmp/vim-plugins')
Plug 'neoclide/coc.nvim'
call plug#end()

LSP config:

    "languageserver": {
        "efm": {
            "args": [],
            "command": "efm-langserver",
            "filetypes": ["*"]
        }
    },

Output from CocCommand workspace.showOutput:

## versions

vim version: NVIM v0.5.0
node version: v16.4.1
coc.nvim version: 0.0.80-3086844413
coc.nvim directory: /Users/xyz/.local/share/nvim/site/pack/paqs/start/coc.nvim
term: tmux
platform: darwin

## Log of coc.nvim

2021-08-29T21:03:42.819 INFO (pid:48576) [services] - registered service "languageserver.efm"
2021-08-29T21:03:42.824 INFO (pid:48576) [services] - efm state change: stopped => starting
2021-08-29T21:03:42.971 INFO (pid:48576) [plugin] - coc.nvim 0.0.80-3086844413 initialized with node: v16.4.1 after 250ms
2021-08-29T21:03:42.976 INFO (pid:48576) [language-client-index] - Language server "languageserver.efm" started with 48688
2021-08-29T21:03:43.022 INFO (pid:48576) [services] - efm state change: starting => stopped
2021-08-29T21:03:43.023 ERROR (pid:48576) [services] - Server languageserver.efm failed to start: mg [Error]: parse "": empty url
    at Kl (/Users/xyz/.local/share/nvim/site/pack/paqs/start/coc.nvim/build/index.js:37:224)
    at tm (/Users/xyz/.local/share/nvim/site/pack/paqs/start/coc.nvim/build/index.js:36:11261)
    at Immediate.<anonymous> (/Users/xyz/.local/share/nvim/site/pack/paqs/start/coc.nvim/build/index.js:36:11111)
    at processImmediate (node:internal/timers:464:21) {
  code: 0,
  data: null
}
2021-08-29T21:04:46.110 INFO (pid:48576) [attach] - receive notification: runCommand [ 'workspace.showOutput' ]
2021-08-29T21:04:48.925 WARN (pid:48576) [plugin] - Slow action "runCommand" cost 2814ms
2021-08-29T21:05:11.544 INFO (pid:48576) [attach] - receive notification: showInfo []
pedrogameiro commented 3 years ago

I have the same issue. The following patch fixed it for me: https://github.com/mattn/efm-langserver/pull/173