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 Yarn SDK instructions for Emacs #6120

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

domq
Copy link

@domq domq commented Feb 7, 2024

What's the problem this PR addresses?

Emacs-related instructions in the official documentation are lagging behind a bit:

  • they mention eval-after-load even though the recommended .dir-locals.el settings don't make use of that anymore
  • they only work with LSP, not the new eglot package which has been merged into Emacs version 29.1

How did you fix it?

I provided no code, just a doc touchup.

Checklist

  • I have read the Contributing Guide.

  • I have set the packages that need to be released for my changes to be effective.

  • I will check that all automated PR checks pass before the PR gets reviewed.

@domq
Copy link
Author

domq commented Feb 22, 2024

Hello, I have had no feedback with this pull request for two weeks?

Comment on lines +87 to +99
If, rather than LSP, you are using `eglot` (either bundled with Emacs 29.1 and later versions, or installed separately), your `.dir-locals.el` should instead read

```lisp
((typescript-ts-mode
. ((eglot-server-programs
. (((tsx-ts-mode typescript-ts-mode typescript-mode)
. (lambda (&rest ignored)
(let* ((project-directory (car (dir-locals-find-file default-directory)))
(tsserver-path (concat project-directory ".yarn/sdks/typescript/bin/tsserver")))
`("typescript-language-server" "--stdio"
:initializationOptions
(:tserver (:path ,tsserver-path)))))))))))
```
Copy link
Member

Choose a reason for hiding this comment

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

If that's the configuration for the most up-to-date version of Emacs, perhaps it should be the first thing in the section?

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

Successfully merging this pull request may close these issues.

None yet

2 participants