• Stars
    star
    686
  • Rank 65,892 (Top 2 %)
  • Language
    Emacs Lisp
  • License
    MIT License
  • Created about 6 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A company-mode backend for TabNine, the all-language autocompleter: https://tabnine.com/

company-tabnine

MELPA

TabNine is the all-language autocompleter. It uses machine learning to provide responsive, reliable, and relevant suggestions.

company-tabnine provides TabNine completion backend for company-mode. It takes care of TabNine binaries, so installation is easy.

screenshot

With Deep TabNine:

screenshot-deep-1 screenshot-deep-2 screenshot-deep-3

Installation

  1. Make sure company-mode is installed and configured.

  2. Install company-tabnine. This package is part of MELPA.

    Note: See https://melpa.org/#/getting-started for MELPA usage. Make sure to use the "bleeding-edge" repository instead of MELPA stable.

    • With use-package

      Put the following in your config:

      (use-package company-tabnine :ensure t)
    • With package.el (built-in)

      Install the package:

      M-x package-install RET company-tabnine RET

      Put the following in your config:

      (require 'company-tabnine)
  3. Add company-tabnine to company-backends

    (add-to-list 'company-backends #'company-tabnine)
  4. Run M-x company-tabnine-install-binary to install the TabNine binary for your system.

Recommended Configuration

Below are some recommended company-mode configuration that works well with company-tabnine.

;; Trigger completion immediately.
(setq company-idle-delay 0)

;; Number the candidates (use M-1, M-2 etc to select completions).
(setq company-show-numbers t)

Usage

company-tabnine should work out of the box.

See M-x customize-group RET company-tabnine RET for customizations.

Auto-balance parentheses

TabNine can automatically balance parentheses, by removing and adding closing parentheses after the cursor. See the examples here.

Note: The automatically-balancing happens in company's post-completion hook. However, company-tng-frontend actually suppresses this hook. In order to use automatic parentheses balancing, you need to manually call company-complete-selection or similar commands in this case, which will almost always happen if you do not use company-tng-frontend.

Known Issues

  • company-transformers or plugins that use it (such as company-flx-mode) can interfere with TabNine's sorting. If this happens, put the following temporary workaround in your config:

    ;; workaround for company-transformers
    (setq company-tabnine--disable-next-transform nil)
    (defun my-company--transform-candidates (func &rest args)
      (if (not company-tabnine--disable-next-transform)
          (apply func args)
        (setq company-tabnine--disable-next-transform nil)
        (car args)))
    
    (defun my-company-tabnine (func &rest args)
      (when (eq (car args) 'candidates)
        (setq company-tabnine--disable-next-transform t))
      (apply func args))
    
    (advice-add #'company--transform-candidates :around #'my-company--transform-candidates)
    (advice-add #'company-tabnine :around #'my-company-tabnine)
  • Spacemacs configurations can override the settings for company-backends.

  • Conflict with ESS: See emacs-ess/ESS#955

  • TabNine's local deep learning completion might be enabled by default. It is very CPU-intensive if your device can't handle it. You can check by typing "TabNine::config" in any buffer (your browser should then automatically open to TabNine's config page) and disable Deep TabNine Local (you will lose local deep learning completion).

More Repositories

1

VIR

An intelligent time manager.
TypeScript
158
star
2

tensorbuilder

A drag and drop GUI tool written in Qt to rapidly prototype TensorFlow computational graphs, with sharing features.
QML
37
star
3

rapid-time-tracker

A fast and lightweight time tracker with fuzzy completion, visualizations, and plain text data storage.
TypeScript
30
star
4

darknet-cpp-wrapper

A small C++ wrapper for pjreddie/darknet detector (yolo v2), for use in UTAT project.
C
23
star
5

awesome-wm-hydra

Multi-key-sequence framework for AwesomeWM with key hints display.
Lua
11
star
6

tommyx-emacs

My Emacs configuration.
Emacs Lisp
9
star
7

Neuroevolution-test

A simple demo for neural network trainning using genetic algorithm
C++
4
star
8

coin-riddle-solver

A Python 3 script to solve this riddle: https://www.youtube.com/watch?v=tE2dZLDJSjA
Python
4
star
9

music-copilot

An FL Studio piano roll script that uses OpenAI's GPT to help you edit and create notes using natural language.
Python
3
star
10

fpga-neuroevolution

Verilog
2
star
11

carcassonne-alpha-zero

TF2/Keras Implementation of AlphaZero on Carcassonne.
Python
2
star
12

lpp

A rigorous time management system with automatic schedule generation and conflict detection
QML
2
star
13

Time-Manager

A simple time management program written using Haxe and OpenFL
Haxe
1
star
14

bit-miners

2017 CSC299 Game
C#
1
star
15

tommyx12.github.io

JavaScript
1
star
16

csc404-maestro

C#
1
star
17

spellcaster

Personal automation script manager
Python
1
star
18

obsidian-config

Some of my config for Obsidian.md
Vim Script
1
star
19

Adobe-Flash-Pro-CS4-game-tutorials

A work-in-progress tutorial for introductory game programming in Adobe Flash Pro CS4
1
star
20

structured-knowledge-manager

A graph-structured tool for maintaining a personal knowledge base.
Python
1
star