-
Notifications
You must be signed in to change notification settings - Fork 164
Description
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)