LanguageClient-neovim
LanguageClient-neovim copied to clipboard
Error when using haxe language server
-
Did you upgrade to latest plugin version? Yes
-
Did you upgrade to/compile latest binary? Run shell command Yes
bin/languageclient --version
to get its version number. > languageclient 0.1.141 -
(Neovim users only) Did you check output of
:checkhealth LanguageClient
? Everything looks good, see screenshot -
Did you check [troubleshooting]? Yes
Describe the bug
When installing this plugin while using haxe-language-server
https://github.com/vshaxe/haxe-language-server I get this following error:
[LC] Error: Failure { jsonrpc: Some(V2), error: Error { code: MethodNotFound, message: "Unhandled method textDocument/completion", data: None }, id: Num(3) }
Environment
- neovim/vim version (
nvim --version
orvim --version
): NVIM v0.3.1 - This plugin version (
git rev-parse --short HEAD
): 2b1350c - Minimal vimrc content (A minimal vimrc is the smallest vimrc that could reproduce the issue. Refer to an example here):
call plug#begin('~/.local/share/nvim/plugged')
Plug 'autozimu/LanguageClient-neovim', {
\ 'branch': 'next',
\ 'do': 'bash install.sh',
\ }
Plug 'ncm2/ncm2'
Plug 'roxma/nvim-yarp'
call plug#end()
set hidden
augroup autocomplete_triggers
autocmd BufEnter * call ncm2#enable_for_buffer()
autocmd TextChangedI * call ncm2#auto_trigger()
augroup END
set completeopt=noinsert,menuone,noselect
set shortmess+=c
let g:LanguageClient_serverCommands = {
\ 'haxe': ['node', '~/.vscode/extensions/nadako.vshaxe-2.7.0/server/bin/server.js'],
\ }
let g:LanguageClient_autoStart = 1
let g:LanguageClient_loadSettings = 1
let g:LanguageClient_loggingFile = '/tmp/lc.log'
let g:LanguageClient_loggingLevel = 'DEBUG'
- Language server link and version: https://github.com/vshaxe/haxe-language-server/tree/6108ca6e6b6dc099f9cb9343ee830b15a581677b
To Reproduce
Steps to reproduce the behavior:
- Install vscode
- ctrl+p ext install haxe language
after installing the haxe language server is build: ~/.vscode/extensions/nadako.vshaxe-2.7.0/server/bin/server.js create a simple Main.hx file:
class Main {
static public function main(): Void {
trace("hello world");
}
}
Start vim using the minimal vimrc open Main.hx Error show up
Current behavior
Displays described error and nothing happens.
Expected behavior
Expect to autocomplete
Screenshots
I'm getting similar errors using this language server for javascript
https://github.com/theia-ide/typescript-language-server
That exact error appears and then some others depending the codeaction
Try Coc.nvim with typescript.
[LC] Error: Failure { jsonrpc: Some(V2), error: Error { code: MethodNotFound, message: "Unhandled method textDocument/completion", data: None }, id: Num(3) }
I think you should post log file defined by let g:LanguageClient_loggingFile = '/tmp/lc.log'
, so that we could inspect the lsp traffic to prove that this is LanguageClient-neovim issue or haxe-language-server issue.
The haxe-language-server listens to a didChangeConfiguration event at start and needs some initializationOptions
https://github.com/vshaxe/vshaxe/issues/328