You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! This is mainly an issue in monorepo-like setups, but when a breaking change is made in a Gleam project, it would be nice to have the LSP show diagnostics for any project in the current editor scope. Given this monorepo structure where the server project depends on types from the client project via a path dependency:
If my editor opens to the my_project directory, I can see both projects simultaneously; however, I will only get LSP diagnostics for one project at a time (whichever one has the currently focused file). This is usually fine, but it becomes jarring when a breaking change is made in the client project and not warned about in the server project. Since the errors are only shown in the part of the codebase, it usually leads to me fixing all the errors in the client project, then running the project entry point in the server project, just to get another dump of errors in the console related to the change in the client project.
To fix this, I must navigate to a file in the server project and make a trivial edit to activate the LSP. After the edit, nice in-editor diagnostics in the server project will finally appear.
I used a simple, concrete example here, but this gets harder and more annoying to deal with given more projects in one repo.
The text was updated successfully, but these errors were encountered:
lpil
changed the title
LSP: Show diagnostics for all projects in the editor's open root directory
LSP: Show diagnostics for all packages currently open when using path deps
Feb 27, 2025
Hello! This is mainly an issue in monorepo-like setups, but when a breaking change is made in a Gleam project, it would be nice to have the LSP show diagnostics for any project in the current editor scope. Given this monorepo structure where the
server
project depends on types from theclient
project via a path dependency:If my editor opens to the
my_project
directory, I can see both projects simultaneously; however, I will only get LSP diagnostics for one project at a time (whichever one has the currently focused file). This is usually fine, but it becomes jarring when a breaking change is made in theclient
project and not warned about in theserver
project. Since the errors are only shown in the part of the codebase, it usually leads to me fixing all the errors in theclient
project, then running the project entry point in theserver
project, just to get another dump of errors in the console related to the change in theclient
project.To fix this, I must navigate to a file in the
server
project and make a trivial edit to activate the LSP. After the edit, nice in-editor diagnostics in theserver
project will finally appear.I used a simple, concrete example here, but this gets harder and more annoying to deal with given more projects in one repo.
The text was updated successfully, but these errors were encountered: