diff --git a/README.org b/README.org index fa959c2..2867b4e 100644 --- a/README.org +++ b/README.org @@ -24,7 +24,11 @@ An unofficial TabNine(with TabNine Chat supported) package for Emacs. [[file:./assets/screenshot-2.png]] @@html:@@ -* Installation +* Setup + +** Installation + +*** Install TabNine package TabNine is available on [[https://melpa.org/#/tabnine][Melpa]], you can install it with your favorite package manager. @@ -168,9 +172,18 @@ dotspacemacs-additional-packages #+end_src @@html:@@ + +*** Install TabNine binary + +After install TabNine package, you should execute =tabnine-install-binary= interactive command to install Tabnine binary to finish installation. + +** TabNine configuration + +The advanced features(eg: advanced completions, TabNine Chat) requires a =TabNine Pro= account, open TabNine Hub page with =tabnine-configuration= after installation. Then login with your account. + ** TabNine Chat -TabNine Chat is still in BETA - to join the BETA - send =Tabnine Pro= email to =support@tabnine.com= to join BETA test. +TabNine Chat is still in BETA - to join the BETA - send =Tabnine Pro= email to =support@tabnine.com= to join BETA, while chat fails you can try with vscode to see whether the beta feature is available, also you can view you account's capabilities with =tabnine-capabilities= function. | Command | Prompt | |-------------------------------------+-----------------------------------------------| diff --git a/tabnine-core.el b/tabnine-core.el index 58bc30c..a0360fd 100644 --- a/tabnine-core.el +++ b/tabnine-core.el @@ -519,11 +519,15 @@ REQUEST should be JSON-serializable object." (defun tabnine-capabilities () "Query TabNine server Capabilities." + (interactive) (when-let* ((response (tabnine--request 'capabilities)) (enabled-features (plist-get response :enabled_features))) (seq-doseq (feature enabled-features) (when (equal feature "plugin.feature.tabnine_chat") (setq tabnine--chat-enabled t))) + (when (called-interactively-p 'interactive) + (unless tabnine--chat-enabled + (user-error "TabNine Chat feature is not available"))) response)) (defun tabnine-state ()