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
It's so weird, every time I restart emacs and open an javascript file, tsserver will auto start and the auto completion, tide-hl-identifier and all other tide feature worked like a charm, but then if I open an other file, the completion will break, no candidate will show, tide-hl-identifier also not work too. I have set TSS_LOG, bug still no clue where am I wrong.
I'm working on a react-native project. Here is my jsconfig file.
(defun setup-tide-mode ()
(interactive)
(setq tide-tsserver-process-environment '("TSS_LOG=-level verbose -file /tmp/tss.log"))
(tide-setup)
;;(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`
)
(use-package tide
:ensure t
:bind (("M-." . tide-jump-to-definition)
("M-," . tide-jump-back)
)
:config
(setup-tide-mode)
;; 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)
;; configure javascript-tide checker to run after your default javascript checker
(flycheck-add-next-checker 'javascript-eslint 'javascript-tide 'append)
(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)
)
The text was updated successfully, but these errors were encountered:
I would start checking your systems process list. Are the JS files all part of the same project? If they're not, you should see multiple tsserver-instances (one per project).
I don't really know how (use-package) works, so I can't tell if that's contributing to your issues.
I also don't do react, so I'm not sure if the whole JSX/TSX thing is causing additional troubles.
If you show us the log-output, we may be able to figure out what's going wrong, and how/if we can fix it.
Finally I have some spare time to check this. You are right, the problem is that only the first JS file enabled tide-mode. Thanks for your help to remind me check the configurations.
It's so weird, every time I restart emacs and open an javascript file, tsserver will auto start and the auto completion, tide-hl-identifier and all other tide feature worked like a charm, but then if I open an other file, the completion will break, no candidate will show, tide-hl-identifier also not work too. I have set TSS_LOG, bug still no clue where am I wrong.
I'm working on a react-native project. Here is my jsconfig file.
The text was updated successfully, but these errors were encountered: