Tabnine is language agnostic, so it relies on other software to provide semantic completions.
Any server which implements the Language Server Protocol can be used as a source of semantic completions.
Tabnine comes with default choices of language servers for many common languages. You can also override Tabnine’s defaults to use a language server of your choice (described later).
Tabnine::version in your text editor. If you’re running an earlier version, try restarting your editor.Tabnine::sem to enable semantic completion.If the above steps don't work, check that the language server works when you run it in your terminal. If it works in the terminal, but Tabnine can't find it, follow these steps:
which go-langserver in your terminal to find the absolute path to the language server.Tabnine::config_dir in your editor to find your configuration directory.<config_dir>/ExampleTabNine.toml corresponding to your language.[language.go]
command = "go-langserver"
args = ["-mode", "stdio", "-gocodecompletion"]
install = [["go", "get", "-u", "github.com/sourcegraph/go-langserver"]]<config_dir>/TabNine.toml and paste the entry you found above into it, but replace the command field with the absolute path you found in step 1. (If you're on Windows, you'll need to escape the backslashes in the path, for example C:\Users\janedoe should be replaced with C:\\Users\\janedoe ).Tabnine::restart into your text editor.npm install -g typescript-language-server
typescript-language-server --stdio Project link: TypeScript Language Server
pip install python-language-server
pyls Project link: Python Language Server
clangd (manual installation)
Project link: cquery
rustup update
rustup component add rls rust-analysis rust-src
rls Project link: Rust Language Server
go get -u golang.org/x/tools/gopls
gopls serve Project link: Go Language Server
gem install solargraph
solargraph stdio Project link: Solargraph
npm install -g vscode-html-languageserver-bin
html-languageserver --stdio Project link: VS Code HTML Language Server
npm install -g ocaml-language-server
ocaml-language-server --stdio Project link: OCaml Language Server
hie --lsp (manual installation)
Project link: Haskell IDE Engine
pub global activate dart_language_server
dart_language_server Project link: Dart Language Server
npm install -g purescript-language-server
purescript-language-server --stdio Project link: PureScript Language Server
npm install -g vscode-css-languageserver-bin
css-languageserver --stdio Project link: vscode-css-languageserver-bin
Create a file called TabNine.toml in your Tabnine configuration directory. You can find your Tabnine configuration directory by typing Tabnine::config_dir into a file while Tabnine is running.
Here is an example TabNine.toml which uses ccls for C++ completion rather than the default choice of cquery. It also does the following:
. (rather than returning Tabnine's results immediately and caching the server's response for future requests). This is enabled by default for both . and ::.. or :: (the default is 50 ms).[language.cpp]
command = "ccls"
args = ["--init={\"cacheDirectory\":\"${project_root}/.ccls\"}"]
synchronous_triggers = ["."]
synchronous_timeout_ms = 200
num_server_instances = 2
always_prefer = false