You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first js file work well,but if I kill the buffer or open other js files,it doesn't work.
I use spacemacs, so I add the configuration(from readme) on dotspacemacs/user-config.
;;tide
;;use package
(use-package tide
:ensure t
:after (typescript-mode company flycheck)
;;:hook ((typescript-mode . tide-setup)
;; (typescript-mode . tide-hl-identifier-mode)
;; (before-save . tide-format-before-save))
)
;;typescript
(require 'flycheck)
(defun setup-tide-mode ()
(interactive)
(tide-setup)
(flycheck-mode +1)
(setq flycheck-check-syntax-automatically '(save mode-enabled))
(eldoc-mode +1)
(tide-hl-identifier-mode +1)
;; company is an optional dependency. You have to
;; install it separately via package-install
;; `M-x package-install [ret] company`
(company-mode +1))
;; aligns annotation to the right hand side
(setq company-tooltip-align-annotations t)
;; formats the buffer before saving
(add-hook 'before-save-hook 'tide-format-before-save)
(add-hook 'typescript-mode-hook #'setup-tide-mode)
(add-hook 'js2-mode-hook #'setup-tide-mode)
;;tsx
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode))
(add-hook 'web-mode-hook
(lambda ()
(when (string-equal "tsx" (file-name-extension buffer-file-name))
(setup-tide-mode))))
;; enable typescript-tslint checker
(flycheck-add-mode 'typescript-tslint 'web-mode)
;;javascript
(setq tide-format-options '(:insertSpaceAfterFunctionKeywordForAnonymousFunctions t :placeOpenBraceOnNewLineForFunctions nil))
;; configure javascript-tide checker to run after your default javascript checker
;;(flycheck-add-next-checker 'javascript-eslint 'javascript-tide 'append)
;;jsx
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.jsx\\'" . web-mode))
(add-hook 'web-mode-hook
(lambda ()
(when (string-equal "jsx" (file-name-extension buffer-file-name))
(setup-tide-mode))))
;; configure jsx-tide checker to run after your default jsx checker
(flycheck-add-mode 'javascript-eslint 'web-mode)
;;(flycheck-add-next-checker 'javascript-eslint 'jsx-tide 'append)
;;tide
tide-mode is enabled,and tsserver looks well,I don't know how to fix this problem.
The text was updated successfully, but these errors were encountered:
A minimal project which reproduces this issue would help us with identifying the problem. With the current description, there aren't any clues as to where the issue might be.
The first js file work well,but if I kill the buffer or open other js files,it doesn't work.
I use spacemacs, so I add the configuration(from readme) on
dotspacemacs/user-config
.tide-mode is enabled,and tsserver looks well,I don't know how to fix this problem.
The text was updated successfully, but these errors were encountered: