Skip to content

Javascript completion using javascript-typescript-stdio does not work #316

Closed
@kyrisu

Description

@kyrisu

Neovim version

NVIM v0.2.2
Build type: Release
LuaJIT 2.0.5       
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wconve
rsion -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -
pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protec
tor-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/neovim/src/bu
ild/config -I/build/neovim/src/neovim-0.2.2/src -I/usr/include -I/usr/include -I/usr/include -I/usr/inclu
de -I/usr/include -I/usr/include -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/s
rc/build/include
Compiled by builduser

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"         

system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim" 

Plugin version: 6f46c92
Language server version (javascript-typescript-server): 2.7.0

Minimal vimrc:

" vim: ft=vim
call plug#begin('~/.local/share/nvim/plugged')

Plug 'autozimu/LanguageClient-neovim', {
    \ 'branch': 'next',
    \ 'do': 'bash install.sh',
    \ }

call plug#end()

augroup filetype_js
    autocmd!
    autocmd BufReadPost *.js setlocal filetype=javascript
augroup END

let g:LanguageClient_autoStart = 1
let g:LanguageClient_serverCommands = {
    \ 'javascript': ['javascript-typescript-stdio'],
    \ }
let g:LanguageClient_loggingLevel = 'DEBUG'

Steps to reproduce:

  1. Create a directory for the project
mkdir /tmp/testlc && cd !$
  1. Init package.json and install lodash
npm init -y && npm i lodash
  1. Install plugins and run nvim with minimal config (just paste the above contens to a file named
    minrc before)
npm i -g javascript-typescript-langserver
nvim -u minrc +PlugInstall +qa
nvim -u ./minrc ./index.js
  1. Enter following code in nvim and trigger omni completion using
import _ from 'lodash';

_.

Result is - no matches are found or '_' as a single match after you reopen the
file.

LanguageClient.log

The only message in LanguageServer.log is

ERROR Stream was closed without shutdown notification

But it's probably because I quit nvim.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions