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

Update emacs docs to include yasnippet #1068

Merged
merged 1 commit into from Nov 16, 2019

Conversation

@ckipp01
Copy link
Member

ckipp01 commented Nov 15, 2019

This will close #1045 which was an inaccurate description of what was actually happening. It was bugging me since I know we came across the "magic" indentation of some editors, but with emacs, it seemed odd that the last } was never being indented correctly. Plus, after @gabro made the #1057 fix, I didn't understand why it seemed that emacs lsp-mode was saying it supported snippets, when they obviously weren't working right. Turns out lsp-mode has a configuration option lsp-enable-snippet which is on by default. This then requires you to use the yasnippet package, or snippets won't work correctly, and also some of the indentations will be wrong. An emacs buff may have known this, but I am anything but an emacs buff. Either way, I think we should mention this in the docs as it may save someone time trying to set Metals up with emacs.

This PR gives extra info in the docs to make sure your snippets go from looking like this...
old

to working and looking correctly like this...
2019-11-15 21 32 07

Copy link
Member

olafurpg left a comment

Very to nice have this clarified! Great job tracking this down 👍

@olafurpg olafurpg merged commit eecfc75 into scalameta:master Nov 16, 2019
9 checks passed
9 checks passed
Windows unit tests
Details
Linux unit tests
Details
Sbt integration
Details
Maven integration
Details
Gradle integration
Details
Mill integration
Details
Slow tests
Details
Scala cross tests
Details
Scalafmt/Scalacheck/Docs
Details
@ckipp01 ckipp01 deleted the ckipp01:emacs-doc-update branch Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.