vim-lsc icon indicating copy to clipboard operation
vim-lsc copied to clipboard

E906: not an open channel

Open Linerre opened this issue 3 years ago • 2 comments

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 avatar Apr 19 '21 12:04 Linerre

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.

Linerre avatar Apr 20 '21 04:04 Linerre

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.

andrescuco avatar Jul 09 '21 18:07 andrescuco