vim-lsc
vim-lsc copied to clipboard
E906: not an open channel
Hi there,
I met this E906: not an open channel
error when opening *.vim
files.
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
Basic info:
- OS: Windows10
- Vim version: VIM - Vi IMproved 8.2
I have:
-
installed vim-language-server with npm:
-
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.
How can I fix the problem? Any advice? Thanks. By the way, Python server works fine.
Somehow, the vim-language-server
suddenly starts working with vim-lsc
as expected:
After I opened this issue, I did the following things (though I doubt any of them is special):
- I completely disabled
vim-lsc
plugin by commenting out the plug line and its config file; - I switched to coc.nvim, but got another issue with the server (see the mentioned issue above)
- 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.
- 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.
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.