GithubHelp home page GithubHelp logo

deoplete-tabnine's Introduction

deoplete-tabnine

Overview

A Deoplete source for TabNine.

Installation

To install it with vim-plug, first install Deoplete, then add this to your vimrc:

if has('win32') || has('win64')
  Plug 'tbodt/deoplete-tabnine', { 'do': 'powershell.exe .\install.ps1' }
else
  Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
endif

For dein.vim

if has('win32') || has('win64')
  call dein#add('tbodt/deoplete-tabnine', { 'build': 'powershell.exe .\install.ps1' })
else
  call dein#add('tbodt/deoplete-tabnine', { 'build': './install.sh' })
endif

Configuration

line_limit

The number of lines before and after the cursor to send to TabNine. If the option is smaller, the performance may be improved. (default: 1000)

max_num_results

Max results from TabNine. (default: 10)

call deoplete#custom#var('tabnine', {
\ 'line_limit': 500,
\ 'max_num_results': 20,
\ })

deoplete-tabnine's People

Contributors

amirbilu avatar anujva avatar get-me-power avatar lovesegfault avatar oxinabox avatar shougo avatar syvsto avatar tbodt avatar tzachar avatar yome avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

deoplete-tabnine's Issues

High memory usage

2019-10-14-191157_1920x1056_scrot
Four nvim instances kill my memory. It used to be fine
One instance uses twice as much as 10 firefox tabs usage

not working from version of tabnine 4.5.25

since version of tabnine 4.5.25 plugin constanly show error:
TabNine exited with code 1 Use :messages / see above for error details

with 4.5.24 all works fine
i am using vim with vim-plug and updated plugins
my latest tabnine version is 4.5.27 - not working
And no log files at all

Update readme for multi-platform vimrc plugin install

Snippet for inclusion below deplete plugin in vimrc could be described as:

" TabNine Deoplete
if has("win32")
        Plug 'tbodt/deoplete-tabnine', { 'do': 'powershell.exe .\install.ps1' }
else
        Plug 'tbodt/deoplete-tabnine', { 'do': './install.sh' }
endif

Such that people can have a cross-platform vimrc.

Error

22Jul19_115527

Received this error while I was editing elixir file in insert mode.

Setup:

NVIM v0.3.8
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wconversion -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.3.8/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Default deoplete-tabnine and deoplete config,
installed via neovim-plug

Installation fails on Windows due to missing/wrong Parameter in the powershell installation script

On Windows (Version: 10.0.19043 Build 19043) the install.ps1 script fails with the following error:

Downloading TabNine executable...


    Verzeichnis: C:\Users\Terra\AppData\Local\nvim\plugged\deoplete-tabnine\binaries\3.7.12


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----        16.10.2021     20:31                x86_64-pc-windows-gnu
System.Management.Automation.ParameterBindingException: Es wurde kein Parameter gefunden, der dem Parameternamen "DestinationPath" entspricht.
   bei System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
   bei System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   bei System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

Changing

Expand-Archive -Force -Path "$path\TabNine.zip" -DestinationPath "$path"

to

Expand-Archive -Force -Path "$path\TabNine.zip" -OutputPath "$path"

results in a successful installation. My powershell version is:

Name                           Value
----                           -----
PSVersion                      5.1.19041.1237
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1237
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Apple M1 Support

Hi, folks

Amir from tabnine here.

We have recently released support the new for Apple M1 processors.
This requires some changes on the plugin side too.

We've updated the how to write a plugin document.
We also implemented it in various other plugins, so you can check it out to get inspiration :-)

vscode
sublime
intellij
vim

Note that supporting m1 when the editor is run nativelyon arm is usually pretty straight forward. However, supporting a case where the editor is running on the Rosetta translator is a little more complex (see this).

Is this a successful operation?

I am not sure if I have successfully run it. After using it for a while, I feel it is just a simple completion plugin? I don't feel special, I am sorry that I don't know tabnine very well. Can you simply introduce and configure it, I mainly use it to write go
3333
44444

Cannot verify if it is working

I followed the installation instructions, but don't see TabNine completion results in my deoplete list. Is there a way to check the install or debug what is going on? Typing TabNine::version in a new buffer does nothing, although I am not sure if that is expected to work or not.

The binary package for aarch64

Hi, there;

These days I prepare to use the deoplete-tabnie on TX2(Nvidia develop board), which is aarch64 architecture.

Would you please add the aarch64 Linux support?

Thanks a lot!

not deoplete-tabnine/binaries path

.vim/bundle/deoplete.nvim/rplugin/python3/deoplete/child.py", line 186, i..
.e: [Errno 2] No such file or directory: '.vim/bundle/deoplete-tabnine/binaries'. Use :messages / see above for error details.^@

Neovim freez when using TabNine

Hi.

Been using TabNine for a long while.
Lately (neovim nightly), neovim started freezing, mostly when closing or switching buffers.
The main nevom process is hanged on an epoll from the TabNine client, and killing the TabNine process unfreezes everything.

Is this a know issue?
Is there a workaround?

Default rank is to high

self.rank = 1000 is listed in the examples:

	class Source(Base):
	    def __init__(self, vim):
	        super().__init__(vim)
	        self.name = 'async'
	        self.mark = '[async]'
	        self.rank = 1000
	        self._count = 0

That is what is used for this plugin. However, the default is 100:

					*deoplete-source-attribute-rank*
rank		(Integer)			(Optional)
		Source priority.  Higher values imply higher priority.
		Note: It is high priority than match position.

		Default: 100

This puts tabnine above everything else. You can override this with:

call deoplete#custom#source('tabnine', 'rank', 50)

However, it would probably be preferable to use the default sort, as having tabnine above everything else, especially as it creates a lot of suggestions, can get cumbersome.

900+MB log file

The log appears to be out of control:

~/.config/nvim/plugged/deoplete-tabnine master*
❯ ll tabnine.log
-rw-r--r--  1   941M Jan 31 13:27 tabnine.log

It seems to be mostly polluted by the following message:

~/.config/nvim/plugged/deoplete-tabnine master* 27s
❯ tail tabnine.log
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)
[2019-01-31][13:27:12][server::pipeline::walk][ERROR] Walk error: No such file or directory (os error 2)

I'm not sure if it's related to the CPU usage problems, but TabNine has been spiking to 200-300% cpu util without any apparent need (in fact often vim is actually suspended through C-Z).

Any leads? I'm happy to provide more details if I can.

Offline completion

Hi,
Thanks for the tabnine support. One question is, tabnine support offline completion. Is there any way to mandate that in plugin ?

Excessive cpu/memory usage

@Shougo conside the following minimal init.vim file:

let $DOTVIM = expand('$HOME/.config/nvim')

set runtimepath+=$DOTVIM/bundle/repos/github.com/Shougo/deoplete.nvim
set runtimepath+=$DOTVIM/bundle/repos/github.com/tbodt/deoplete-tabnine
filetype plugin indent on

let g:deoplete#enable_at_startup = 1
call deoplete#custom#source('tabnine', 'rank', 101)

Now as in the GIF:
i) Open neovim and something to monitor cpu usage (such as htop)
ii) Within neovim open a markdown file (such as foo.md) and start writing some text (such as # Foo))
After ii) you will see that CPU/memory increases enormously. Is there a way to limit the number of process being spawned?

deoplete-tabnine

For the record i installed tabnine with:

call dein#add('tbodt/deoplete-tabnine', {'build': './install.sh'})

which results in version 3.1.6

Not getting semantic completion with solargraph

Hi, I'm guessing I'm doing something wrong.

Today I installed the plugin via Plug and opened a ruby file. I can see [TN] showing up in deoplete but it's not solargraph data. autozimu/LanguageClient-neovim seems to get solargraph data, so that should not be the issue. Maybe I'm missing some configuration steps?

I haven't purchased a license yet —and honestly I have no idea where I'd have to put it—, but given that there was a free tier I thought it'd work.

This is my Deoplete config:

let g:deoplete#auto_complete_delay = 100
let g:deoplete#enable_at_startup = 1

call deoplete#custom#source('ultisnips', 'matchers', ['matcher_fuzzy'])
call deoplete#custom#source('ultisnips', 'rank', 1000)
call deoplete#custom#source('syntax', 'rank', 100)

linux-musl support

Hi,

Amir from Codota (the company behind TabNine) here.

I see this plugin has moved from linux-gnu to linux-musl a long time ago (here), but recently reverted back to linux-gnu (here).

I was wondering what was the reason for reverting back?

Thanks

Errors with Python 3.5

Python errors occur when trying to use this in Python 3.5.

The encoding argument for subprocess.Popen was added in Python 3.6, thus using it in 3.5 causes an error. Removing the encoding parameter from Popen solves that particular error, but the stdin/stdout/stderr file objects are then opened in binary mode instead of text mode, so you run into errors later on when strings are used (want bytes). My quick workaround was to use Popen with the universal_newlines=True argument instead, which exists in 3.5 and causes the file objects to be opened in text mode (same as when encoding is used). After that I have not seen any errors and completion is working.

I'm using Debian 9 which only includes Python 3.5. Deoplete also only requires a minimum of Python 3.5, so it would be nice if this also supported 3.5+ as well. If not, perhaps a note about the minimum requirements would be helpful.

[deoplete] No output from TabNine. Restarting.

When I use nvim to edit any file, the deoplete-tabnine will continue restarting the TabNine and producing error message, which is very annoying.

The version of TabNine is:

TabNine 3.2.63 (x86_64-unknown-linux-musl)
Jacob Jackson <[email protected]>

The last log of TabNine is

[2020-12-27T09:10:42.134773777+08:00][WARN][262809 bs_main_rlp][bootstrapper::bundle][Some("tabnine/bootstrapper/src/bundle.rs")][Some(628)] relinquishing lock at path "/home/user/.vim/bundles/deoplete-tabnine/binaries/0.0.1/x86_64-unknown-linux-musl/bundle.lock"
[2020-12-27T09:10:42.580784022+08:00][INFO][262809 bs_main_rlp][defaults][Some("shared/defaults/src/lib.rs")][Some(99)] getting value from path Ok("/home/user/.config/TabNine/defaults/active_experiment.prefs.json")
[2020-12-27T09:10:42.581209590+08:00][WARN][262809 bs_main_rlp][bootstrapper::bootstrapper_lib][Some("tabnine/bootstrapper/src/bootstrapper_lib.rs")][Some(316)] restart required
[2020-12-27T09:10:42.581294465+08:00][INFO][262809 bs_main_rlp][defaults][Some("shared/defaults/src/lib.rs")][Some(99)] getting value from path Ok("/home/user/.config/TabNine/defaults/bootstrapper_conf.prefs.json")
[2020-12-27T09:10:42.581352345+08:00][WARN][262809 bs_main_rlp][defaults][Some("shared/defaults/src/lib.rs")][Some(109)] had an error deserializing object Os { code: 2, kind: NotFound, message: "No such file or directory" }
[2020-12-27T09:10:42.581394662+08:00][INFO][262809 bs_main_rlp][TabNine::bootstrap_support][Some("tabnine/frontend/src/bootstrap_support.rs")][Some(217)] got kill message from bootstrapper. Bye Bye 👋🏻...
[2020-12-27T09:10:42.939206219+08:00][INFO][262834 main][TabNine][Some("tabnine/frontend/src/main.rs")][Some(339)] exiting....

High memory usage

Back again from #39

I've tried coc-tabnine just to compare, and coc's version uses 7 times less memory compared to deoplete's one. I think the difference exists because coc uses VSCode version of tabnine and deoplete uses sublime version.

Can I list this on tabnine.com?

As a secondary option, so Vim will still exist, but there will also be a Vim (Deoplete) option.

The reason I don't want to replace the existing Vim client completely is that I think installing Deoplete could be a barrier for users who don't use package managers.

PermissionError

Hi ! When starting neovim, and going into Insert mode, I get the following error.
I tried to find the right permissions, to no avail.

I'm on Arch Linux, if that may help.

2020 09 07-19 55 33 screenshot

Sorry for the inconvenience :(

Error while trying to activate license

While trying to use this and entering the key to activate my license I'm getting the error message:
"Couldn't write your registration key to disk due to the following error: No such file or directory (os error 2)".

I don't have time to dig into this right now but I'll try to give it a go later today.

Error when pressing backspace after complete

Hi I see the error in the screenshot when I do TabNine::config and then press backspace after finalizing the complete

Screenshot from 2019-08-26 20-32-57

I get it every time. The TabNine is installed minutes ago and I did run the ./install.sh

Not fetching results properly from ls

Using TabNine::sem with pyls, suggestions from language server appear only after a couple of tries, as illustrated in the attached gif.

I even tried to force a higher timeout in TabNine.toml, which appears to have done nothing.

synchronous_triggers = ["."]
synchronous_timeout_ms = 1000

output

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.