Completion backend for company-mode and eldoc support for tsconfig files.
- Emacs >= 27.1
- company
- npm package
typescript(either locally or globally installed)
Ensure that typescript installed either globally:
npm i -g typescriptor locally
npm i typescriptDownload the repository and it to your load path in your init file:
(add-to-list 'load-path "/path/to/company-tsconfig")
(require 'company-tsconfig)(use-package company-tsconfig
:straight (company-tsconfig
:repo "KarimAziev/company-tsconfig"
:type git
:host github)
:commands (company-tsconfig-mode))
You can use this library in three ways.
It will add and activate company-mode with company-tsconfig backend. Also, add eldoc functions. To disable eldoc setup, customize variable company-tsconfig-enable-eldoc.
To use only the backend without activating company-tsconfig-mode, add company-tsconfig to the list of company backends.
(defun my-company-tsconfig-setup ()
"Locally add `company-tsconfig' to the list of company backends."
(interactive)
(require 'company)
(set (make-local-variable 'company-backends)
(append '(company-tsconfig) company-backends)))
Manually enable eldoc-mode with tsconfig annotations.
Whether to set up eldoc functions.