Skip to content

ess company-tabnine backend #955

@George9000

Description

@George9000

company-tabnine is a completion backend for company mode. It provides completion based on a machine learning completer called TabNine

This backend works successfully in all modes except ess. Attempts to solve the problem included adding it as a company-backend to ess following the discussion in #565 or adding it to the list ess-r-company-backends. Completion is tested in the source buffer after starting an inferior R. However, the TabNIne backend completion is ignored in ESS. Switching to fundamental-mode immediately restores functionality.

Example of one configuration attempt:
(require 'company-tabnine)
(add-to-list 'company-backends #'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)

;; Use the tab-and-go frontend.
;; Allows TAB to select and complete at the same time.
(company-tng-configure-default)
(setq company-frontends
'(company-tng-frontend
company-pseudo-tooltip-frontend
company-echo-metadata-frontend))

;; don't auto-insert ess backends
(setq ess-use-company nil)

(defun my-ess-config ()
(make-variable-buffer-local 'company-backends)
(add-to-list 'company-backends
'(company-tabnine company-R-args company-R-objects company-dabbrev-code :separate)))

(add-hook 'ess-mode-hook #'my-ess-config)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions