Closed stardiviner closed 8 years ago
You can put .tern-config
in your home directory. It's like a global fallback for .tern-project
. Don't know if that helps.
I tried .tern-config
in my home directory, but it still does not work.
I bind run-js
to global keybinding, it seems will use current buffer's path, not set to home dir by default.
But after I tried to launch run-js
in a buffer which is in home directory path, Still does not work.
I even tried to start run-js
from a JS project path. still does not work.
WEIRD.
The Emacs mode was written with the assumption that the buffer corresponds to a file, in order to know where to spawn the server and such. It could be changed to remove that assumption, if someone spends the time on that, but I'm probably not going to do that myself.
Attached patch fixes the crash, landing you on the intentional error message "Buffer is not associated with a fle" instead
I see. Thanks.
I found a way to fake current buffer as a file.
Here is an advice for making flycheck work in org babel editing source code.
;; how to correctly enable flycheck in babel source blocks
(defadvice org-edit-src-code (around set-buffer-file-name activate compile)
(let ((file-name (buffer-file-name)))
ad-do-it
(setq buffer-file-name file-name)))
Do you know how to adapt to this case? If it work, I think it should add into tern.
I want company-tern work in js-comint (JavaScript inferior buffer) too. But I got error like this:
Seems Tern need to check file is in a project.
Why Tern can't support general JS source code completion.