2016-09-05 02:29:41 +00:00
|
|
|
;;; config.el --- Typescript Layer Configuration File for Spacemacs
|
|
|
|
;;
|
2022-05-31 16:12:58 +00:00
|
|
|
;; Copyright (c) 2012-2022 Sylvain Benner & Contributors
|
2016-09-05 02:29:41 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
2021-03-24 03:31:44 +00:00
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
;;
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2016-09-05 02:29:41 +00:00
|
|
|
|
2017-01-02 05:39:04 +00:00
|
|
|
;; variables
|
2016-10-13 06:49:13 +00:00
|
|
|
|
2016-02-02 22:49:37 +00:00
|
|
|
(defvar typescript-fmt-on-save nil
|
|
|
|
"Run formatter on buffer save.")
|
2016-05-02 09:11:16 +00:00
|
|
|
|
|
|
|
(defvar typescript-fmt-tool 'tide
|
2018-06-19 06:25:33 +00:00
|
|
|
"The name of the tool to be used for TypeScript source code formatting.
|
2021-03-18 05:06:24 +00:00
|
|
|
Possible values are 'tide (default), 'typescript-formatter and 'prettier.")
|
2016-09-05 02:29:41 +00:00
|
|
|
|
2021-03-18 05:06:24 +00:00
|
|
|
(defvar typescript-backend (if (configuration-layer/layer-used-p 'lsp) 'lsp 'tide)
|
2019-09-30 04:49:44 +00:00
|
|
|
"The backend to use for IDE features.
|
2021-03-18 05:06:24 +00:00
|
|
|
Possible values are `tide' and `lsp'.
|
2019-09-30 04:49:44 +00:00
|
|
|
If `nil' then `tide' is the default backend unless `lsp' layer is used.")
|
2018-04-27 04:51:30 +00:00
|
|
|
|
2019-04-26 01:05:13 +00:00
|
|
|
(defvar typescript-linter 'tslint
|
|
|
|
"The linter to use for typescript. Possible values are `tslint' `eslint'")
|
|
|
|
|
2019-04-13 07:12:06 +00:00
|
|
|
(defvar typescript-lsp-linter t
|
|
|
|
"If the backend is `lsp', and this variable is non-nil, then
|
|
|
|
use lsp as the linter, otherwise let flycheck choose the best
|
|
|
|
linter that's available.")
|
|
|
|
|
2016-09-05 02:29:41 +00:00
|
|
|
(spacemacs|define-jump-handlers typescript-mode)
|
2018-02-18 04:38:41 +00:00
|
|
|
(spacemacs|define-jump-handlers typescript-tsx-mode)
|