Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E906: not an open channel #421

Open
Linerre opened this issue Apr 19, 2021 · 2 comments
Open

E906: not an open channel #421

Linerre opened this issue Apr 19, 2021 · 2 comments

Comments

@Linerre
Copy link

Linerre commented Apr 19, 2021

Hi there,

I met this E906: not an open channel error when opening *.vim files.
E906: not an open channel
complete startup log; error part

Full error message:

continuing in <SNR>29_Start
Error detected while processing BufRead Autocommands for "*"..function <SNR>14_OnOpen[6]..lsc#file#onOpen[11]..lsc#server#start[1]..<SNR>29_Start[26]..4[2]..15[4]..18[2]..20[2]..21[2]..22:
line    1:
E906: not an open channel

<SNR>14 is ~\vimfiles\plugged\vim-lsc\plugin\lsc.vim
<SNR>29 is ~\vimfiles\plugged\vim-lsc\autoload\lsc\server.vim
scriptnames

Basic info:

  • OS: Windows10
  • Vim version: VIM - Vi IMproved 8.2

I have:

  1. installed vim-language-server with npm:
    vim-language-server installed

  2. configured vim-language-server according to the Wiki; even simpler:

let g:lsc_server_commands = {
  \ 'python': {
  \   'name': 'python-LSP',
  \   'command': 'pyls',
  \   },
  \ 'vim': {
  \ 'name': 'VimL',
  \ 'command': 'vim-language-server --stdio',
  \ },
  \}
let g:lsc_auto_map = {
 \  'GoToDefinition': 'gd',
 \  'FindReferences': 'gr',
 \  'Rename': 'gR',
 \  'ShowHover': 'K',
 \  'FindCodeActions': 'ga',
 \  'Completion': 'omnifunc',
 \}
let g:lsc_enable_autocomplete  = v:false
let g:lsc_reference_highlights = v:true
let g:lsc_enable_diagnostics   = v:false
set completeopt=menu,menuone,preview,noinsert,noselect

If I run :echo LSCServerStatus() in Vim, it returns starting.
If I run vim-language-server --stdio from my terminal (PowerShell), no error at all.
cmd line server

How can I fix the problem? Any advice? Thanks. By the way, Python server works fine.

@Linerre
Copy link
Author

Linerre commented Apr 20, 2021

Somehow, the vim-language-server suddenly starts working with vim-lsc as expected:
working

After I opened this issue, I did the following things (though I doubt any of them is special):

  1. I completely disabled vim-lsc plugin by commenting out the plug line and its config file;
  2. I switched to coc.nvim, but got another issue with the server (see the mentioned issue above)
  3. I decided to disable coc.nvim too, and switch back to this plugin, because at least it is lightweight and implemented in pure Vimscript, which won me over in the first place.
  4. Unommented the lsc related lines in my vim config and it started working.

I have no idea what happened. I'll keep an eye on this though. If I keep the config above and restart vim again, then the issue comes back. I am so confused.

@andrescuco
Copy link

I am having the same issue trying to initialize typescript-language-server. I have just the minimal config of

let g:lsc_server_commands = {'typescript': 'typescript-language-server --stdio'}

The same error as @Linerre appears when trying to open any typescript file. This doesn't happen with any other lsp vim plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants