-
-
Notifications
You must be signed in to change notification settings - Fork 896
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
lsp-javascript: supply correct path to tsserver for ts-ls #4202
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yyoncho
approved these changes
Oct 26, 2023
4 tasks
eginhard
added a commit
to eginhard/radian
that referenced
this pull request
Dec 9, 2023
The typescript language server `ts-ls` crashes on start-up because of a deprecated argument, which was fixed in emacs-lsp/lsp-mode#4202 See also doomemacs/doomemacs#7540
This was referenced Dec 9, 2023
ncaq
added a commit
to ncaq/lsp-mode
that referenced
this pull request
Feb 14, 2024
Stop reading `node_modules` directly by the file system. The problem with this direct loading is that projects without `node_modules` in the top-level directory will not work at all. For example, when I develop with aws cdk, I cut off the `cdk` or `infra` directory and create a new `package.json` and put `node_modules` there too, but in that case, the code before this modification will not work at all. I solved this problem by simply inserting an abstraction layer. Relation. * [lsp-javascript: supply correct path to tsserver for ts-ls by kiennq · Pull Request emacs-lsp#4202 · emacs-lsp/lsp-mode](emacs-lsp#4202) * [ts-ls: Wrong lsp-clients-typescript-server-path · Issue emacs-lsp#4254 · emacs-lsp/lsp-mode](emacs-lsp#4254)
Closed
jcs090218
pushed a commit
that referenced
this pull request
May 26, 2024
* fix: remove direct references to the node_modules directory Stop reading `node_modules` directly by the file system. The problem with this direct loading is that projects without `node_modules` in the top-level directory will not work at all. For example, when I develop with aws cdk, I cut off the `cdk` or `infra` directory and create a new `package.json` and put `node_modules` there too, but in that case, the code before this modification will not work at all. I solved this problem by simply inserting an abstraction layer. Relation. * [lsp-javascript: supply correct path to tsserver for ts-ls by kiennq · Pull Request #4202 · emacs-lsp/lsp-mode](#4202) * [ts-ls: Wrong lsp-clients-typescript-server-path · Issue #4254 · emacs-lsp/lsp-mode](#4254) * fix(lsp-javascript): remove shell redirect when call node In the case of Windows, etc., `shell-command-to-string` is to use a non-bash shell. To begin with, `shell-command-to-string` seems to ignore standard error output. * refactor(lsp-javascript): rename function and add docs `lsp-clients-typescript-server-path-by-node-require` is too long. * fix(lsp-javascript): use Node.js require to explore Pros === Since Node.js require indicates the path where the file actually exists, it automatically adapts to various environments unless there are significant system changes or changes in the usage environment. Cons === There is a small overhead at first startup due to the command execution. * refactor: use `if-let*` and `when-let*` Simplified based on code review.
cheerio-pixel
pushed a commit
to cheerio-pixel/lsp-mode
that referenced
this pull request
May 29, 2024
…p#4333) * fix: remove direct references to the node_modules directory Stop reading `node_modules` directly by the file system. The problem with this direct loading is that projects without `node_modules` in the top-level directory will not work at all. For example, when I develop with aws cdk, I cut off the `cdk` or `infra` directory and create a new `package.json` and put `node_modules` there too, but in that case, the code before this modification will not work at all. I solved this problem by simply inserting an abstraction layer. Relation. * [lsp-javascript: supply correct path to tsserver for ts-ls by kiennq · Pull Request emacs-lsp#4202 · emacs-lsp/lsp-mode](emacs-lsp#4202) * [ts-ls: Wrong lsp-clients-typescript-server-path · Issue emacs-lsp#4254 · emacs-lsp/lsp-mode](emacs-lsp#4254) * fix(lsp-javascript): remove shell redirect when call node In the case of Windows, etc., `shell-command-to-string` is to use a non-bash shell. To begin with, `shell-command-to-string` seems to ignore standard error output. * refactor(lsp-javascript): rename function and add docs `lsp-clients-typescript-server-path-by-node-require` is too long. * fix(lsp-javascript): use Node.js require to explore Pros === Since Node.js require indicates the path where the file actually exists, it automatically adapts to various environments unless there are significant system changes or changes in the usage environment. Cons === There is a small overhead at first startup due to the command execution. * refactor: use `if-let*` and `when-let*` Simplified based on code review.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to the docs, the
--tsserver-path
is deprecated and we should use the initialization option oftsserver.path
instead.Also, the path should point to
tsserver.js
or the typescript lib directory.Currently the newest
ts-ls
is broken on Windows. This PR fixes that.