codota / tabnine-vim

Vim client for TabNine. https://vimawesome.com/plugin/tabnine-vim
https://www.tabnine.com/install/vim
GNU General Public License v3.0
671 stars 36 forks source link

Semantic completion does not seem to work despite language server enabled #21

Closed kingdido999 closed 3 years ago

kingdido999 commented 5 years ago

Although I have installed a few language servers and enabled them for semantic completion, I don't happen to see any of them working inside nvim. I have tried languages including Rust, TypeScript and JavaScript, but neither of them shows me any language-specific completions when I start typing.

Here is more information:

$ cat tabnine_config.json
{"version":"1.0.10","hide_promotional_message":false,"beta_enabled":"No","ignore_all_lsp":false,"semantic_status":{"javascript":"Enabled","rust":"Enabled","typescript":"Enabled"},"disable_auto_update":false}
$ cat TabNineExample.toml
[language.rust]
command = "rls"
install = [
  ["rustup", "update"],
  ["rustup", "component", "add", "rls-preview", "rust-analysis", "rust-src"],
]

[language.typescript]
command="typescript-language-server"
args=["--stdio"]
install = [["npm", "install", "-g", "typescript-language-server"]]

[language.javascript]
command = "flow"
args = ["lsp"]
install = [["npm", "install", "-g", "flow-bin"]]

[language.html]
command = "html-languageserver"
args = ["--stdio"]
install = [["npm", "install", "-g", "vscode-html-languageserver-bin"]]

[language.ocaml]
command = "ocaml-language-server"
args = ["--stdio"]
install = [["npm", "install", "-g", "ocaml-language-server"]]

[language.python]
command = "pyls"
install = [["pip", "install", "python-language-server"]]

[language.cpp]
command = "cquery"
args = ["--init={\"cacheDirectory\": \"${project_root}/.cquery_cache\"}"]

[language.haskell]
command = "hie"
args = ["--lsp"]

[language.go]
command = "go-langserver"
args = ["-mode", "stdio", "-gocodecompletion"]
install = [["go", "get", "-u", "github.com/sourcegraph/go-langserver"]]

[language.bash]
command = "bash-language-server"
args = ["start"]

[language.dart]
command = "dart_language_server"
install = [["pub", "global", "activate", "dart_language_server"]]
$ nvim --version
NVIM v0.3.3
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/tmp/neovim-20190105-188-1grgj0y/neovim-0.3.3/build/config -I/tmp/neovim-20190105-188-1grgj0y/neovim-0.3.3/src -I/usr/local/include -I/usr/local/opt/gettext/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/tmp/neovim-20190105-188-1grgj0y/neovim-0.3.3/build/src/nvim/auto -I/tmp/neovim-20190105-188-1grgj0y/neovim-0.3.3/build/include
Compiled by brew@Mojave.local

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

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

Run :checkhealth for more info

Please help and let me know if you need more information. Thanks!