Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove tern port files #3465

Closed

Conversation

mijoharas
Copy link
Contributor

Javascript mode leaves a bunch of .tern-port files lying around everywhere you edit a javascript file. To avoid having to add these to any projects .gitignore don't create them in the first place.

@CestDiego
Copy link
Contributor

does this have any drawbacks?

@mijoharas
Copy link
Contributor Author

--no-port-file
The server won’t write a .tern-port file. Can be used if the port files are a problem for you. Will prevent other clients from finding the server (and may thus result in multiple servers for the same project).

from here.

@mijoharas
Copy link
Contributor Author

I guess I can make it a spacemacs variable. It's been a while since I've added much, what's the correct way of introducing a variable with a default value that can be overridden in a users .spacemacs file? (is there a spacemacs-ey way of doing this? it seems like a common pattern.)

@robbyoconnor
Copy link
Contributor

Yeah make it a variable -- not everybody is bothered by it.

@mijoharas mijoharas force-pushed the feature-remove-tern-port-files branch from ad0b85a to 807108c Compare October 20, 2015 12:40
@mijoharas
Copy link
Contributor Author

All done.

@nixmaniack
Copy link
Contributor

Need this! Just edited some Javascript files and found .tern-port all around 😞

@CestDiego
Copy link
Contributor

Should this variable be t by default? I think people might appreciate it, @TheBB

@syl20bnr
Copy link
Owner

+1 for t by default.

@robbyoconnor
Copy link
Contributor

You're going to need to rebase ;)

@mijoharas mijoharas force-pushed the feature-remove-tern-port-files branch from 807108c to 6935ee5 Compare November 30, 2015 14:24
@mijoharas
Copy link
Contributor Author

Done and done.

@mijoharas mijoharas force-pushed the feature-remove-tern-port-files branch from 6935ee5 to 5904d79 Compare November 30, 2015 14:31
@mijoharas
Copy link
Contributor Author

Hey, can we merge this?

@CestDiego
Copy link
Contributor

@StreakyCobra this looks ok should be merged if there is no argument against it

@mijoharas
Copy link
Contributor Author

OK to be merged? (sorry about the spam, just want to move off've my branch with this enabled to develop with this in it 😄 )

@robbyoconnor
Copy link
Contributor

Should prolly squash

@mijoharas mijoharas force-pushed the feature-remove-tern-port-files branch from 5904d79 to deb9b39 Compare January 8, 2016 12:06
@mijoharas
Copy link
Contributor Author

squashed. For future reference, is that standard practice for spacemacs? should I be doing that in general if I have multi-commit PRs? should be ready to be merged now.

@@ -191,6 +191,9 @@
:init (add-hook 'js2-mode-hook 'tern-mode)
:config
(progn
(if javascript-disable-tern-port-files
(setq tern-command (append tern-command '("--no-port-file")))
nil)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaner: (when javascript-disable-tern-port-files (add-to-list 'tern-command "--no-port-file" 'append))

@TheBB
Copy link
Collaborator

TheBB commented Jan 8, 2016

Yes, at least when they are this small and related to each other.

I made one last comment. Other than that it looks ok to me.

@@ -54,6 +54,12 @@ To activate error checking using flycheck install =JSHint=:

* Configuration

To make tern re-use the server across multiple different editing sessions (thus creating multiple `.tern-port` files for each document you have open [[http://ternjs.net/doc/manual.html][see here for more details]]):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, and this line is too long. :-s

@mijoharas mijoharas force-pushed the feature-remove-tern-port-files branch from deb9b39 to 73031fd Compare January 8, 2016 15:34
@mijoharas
Copy link
Contributor Author

All done!

@TheBB
Copy link
Collaborator

TheBB commented Jan 8, 2016

👍

@TheBB TheBB added the Reviewed label Jan 8, 2016
@TheBB
Copy link
Collaborator

TheBB commented Jan 8, 2016

Thank you! Cherry-picked in develop. You can safely delete your branch.

@TheBB TheBB closed this Jan 8, 2016
@TheBB TheBB removed the Reviewed label Jan 8, 2016
@syl20bnr
Copy link
Owner

Reopen for hotfix.

@syl20bnr
Copy link
Owner

syl20bnr commented Apr 2, 2016

Hotfixed in 0.105.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants