[tern] Remove unmaintained package company-tern
Company tern is not longer on melpa and had to be removed. See #13725 for details.
This commit is contained in:
parent
5ea876a161
commit
b68b44a1b1
|
@ -13,7 +13,7 @@
|
|||
- [[#rjsx-mode][rjsx-mode]]
|
||||
- [[#formatting-web-beautify][Formatting (web-beautify)]]
|
||||
- [[#documentation-js-doc][Documentation (js-doc)]]
|
||||
- [[#auto-complete-and-documentation-tern][Auto-complete and documentation (tern)]]
|
||||
- [[#documentation-tern][Documentation (tern)]]
|
||||
|
||||
* Description
|
||||
ES6 and JSX ready configuration layer for React
|
||||
|
@ -151,7 +151,7 @@ You can check more [[https://github.com/mooz/js-doc/][here]]
|
|||
| ~SPC m r d t~ | insert tag to comment |
|
||||
| ~SPC m r d h~ | show list of available jsdoc tags |
|
||||
|
||||
** Auto-complete and documentation (tern)
|
||||
** Documentation (tern)
|
||||
|
||||
| Key binding | Description |
|
||||
|---------------+------------------------------------------------------------------------------------------|
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
(defun spacemacs//react-setup-company ()
|
||||
"Conditionally setup company based on backend."
|
||||
(pcase javascript-backend
|
||||
(`tern (spacemacs/tern-setup-tern-company 'rjsx-mode))
|
||||
(`tide (spacemacs//tide-setup-company 'rjsx-mode))))
|
||||
|
||||
(defun spacemacs//react-setup-next-error-fn ()
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
(defun spacemacs//javascript-setup-company ()
|
||||
"Conditionally setup company based on backend."
|
||||
(pcase (spacemacs//javascript-backend)
|
||||
(`tern (spacemacs//javascript-setup-tern-company))
|
||||
(`tide (spacemacs//tide-setup-company 'js2-mode))))
|
||||
|
||||
(defun spacemacs//javascript-setup-dap ()
|
||||
|
@ -71,13 +70,6 @@
|
|||
(message (concat "Tern was configured as the javascript backend but "
|
||||
"the `tern' layer is not present in your `.spacemacs'!"))))
|
||||
|
||||
(defun spacemacs//javascript-setup-tern-company ()
|
||||
(if (configuration-layer/layer-used-p 'tern)
|
||||
(when (locate-file "tern" exec-path)
|
||||
(spacemacs/tern-setup-tern-company 'js2-mode))
|
||||
(message (concat "Tern was configured as the javascript backend but "
|
||||
"the `tern' layer is not present in your `.spacemacs'!"))))
|
||||
|
||||
|
||||
;; js-doc
|
||||
|
||||
|
@ -154,7 +146,7 @@
|
|||
(call-interactively 'web-beautify-js))
|
||||
(t (error (concat "%s isn't valid javascript-fmt-tool value."
|
||||
" It should be 'web-beutify or 'prettier.")
|
||||
(symbol-name javascript-fmt-tool)))))
|
||||
(symbol-name javascript-fmt-tool)))))
|
||||
|
||||
(defun spacemacs/javascript-fmt-before-save-hook ()
|
||||
(add-hook 'before-save-hook 'spacemacs/javascript-format t t))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; config.el --- Tern Layer configuration File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; funcs.el --- Tern Layer functions File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -16,14 +16,3 @@ Must be called by a layer using tern."
|
|||
(when tern-disable-port-files
|
||||
(add-to-list 'tern-command "--no-port-file" 'append))
|
||||
(tern-mode))
|
||||
|
||||
(defun spacemacs/tern-setup-tern-company (&rest modes)
|
||||
"Setup tern auto-completion for given MODES.
|
||||
Must be called by a layer using tern."
|
||||
(eval `(spacemacs|add-company-backends
|
||||
:backends company-tern
|
||||
:modes ,@modes
|
||||
:append-hooks nil
|
||||
:call-hooks t))
|
||||
(company-mode)
|
||||
(tern-mode))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; packages.el --- Tern Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
||||
;; Copyright (c) 2012-2020 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
|
@ -9,12 +9,8 @@
|
|||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq tern-packages '((company-tern :requires company)
|
||||
tern))
|
||||
|
||||
(defun tern/init-company-tern ()
|
||||
(use-package company-tern
|
||||
:defer t))
|
||||
(defconst tern-packages
|
||||
'(tern))
|
||||
|
||||
(defun tern/init-tern ()
|
||||
(use-package tern
|
||||
|
|
Loading…
Reference in New Issue