Skip to content

Conversation

@dkattan
Copy link

@dkattan dkattan commented Oct 27, 2025

  • Introduced workspace_mode option in LintOptions to enable workspace-wide linting.
  • Updated ServerLinter to handle workspace mode, suppressing per-file tsgo linting.
  • Implemented lint_workspace method in WorkspaceWorker for batch linting of all files.
  • Added support for workspace mode in TsgoLinter for batch linting.
  • Created log_bridge to forward log messages to the LSP client.
  • Enhanced logging for linting operations, including performance metrics.
  • Updated VSCode extension configuration to include workspaceMode setting.
  • Modified Options struct to support supported_extensions for linting.
  • Improved diagnostics caching and handling for isolated and tsgo linting.

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 27, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter A-editor Area - Editor and Language Server labels Oct 27, 2025
@dkattan dkattan changed the title Feature/workspace-mode [feat] Workspace Mode Oct 27, 2025
@dkattan dkattan changed the title [feat] Workspace Mode feat(vscode) Workspace Mode Oct 27, 2025
@dkattan dkattan force-pushed the feature/workspace-mode branch from 2b4068c to e5ffb8d Compare October 27, 2025 22:11
@dkattan dkattan changed the title feat(vscode) Workspace Mode feat(editor) Workspace Mode Oct 27, 2025
@dkattan dkattan force-pushed the feature/workspace-mode branch from e5ffb8d to 866e578 Compare October 27, 2025 22:14
@dkattan dkattan changed the title feat(editor) Workspace Mode feat(editor): Workspace Mode Oct 27, 2025
@github-actions github-actions bot added the C-enhancement Category - New feature or request label Oct 27, 2025
@Sysix
Copy link
Member

Sysix commented Oct 28, 2025

hello 👋
thank you for the work. I peaked a bit in the code, and it looks like you want to rebuild workspace/diagnostic.
Would prefer to go the LSP specs way, before creating new options for it. :)

Sadly to support this spec, we need to support textDocument/diagnostic first.
Which is blocked by TsGoLinter In-Memory capability in #14733.
I already had a small prototype ready with #11447 and #11414.
/cc @camc314

- Introduced `workspaceMode` option in the configuration to enable linting across all files in the workspace.
- Updated `Options` struct to include `supported_extensions` for file type filtering.
- Enhanced `lint_workspace` method to handle multiple file types based on supported extensions.
- Implemented source file watchers for workspace mode to monitor changes in relevant files.
- Updated VSCode extension to support new configuration options and handle workspace mode changes.
- Added logging capabilities to forward log messages to the LSP client for better visibility.
- Refactored `TsGoLintState` to support batch linting of multiple paths and return diagnostics grouped by file.
- Improved error handling and diagnostics reporting in the linter service.
@dkattan dkattan force-pushed the feature/workspace-mode branch from dbef6fe to 9907d59 Compare October 28, 2025 20:32
@camc314
Copy link
Contributor

camc314 commented Oct 29, 2025

Would prefer to go the LSP specs way, before creating new options for it. :)

I agree, if there is a spec for it in the LSP, we should follow it.

@Sysix do you want me to merge the tsgolint in memory diagnostic side?

@Sysix
Copy link
Member

Sysix commented Oct 29, 2025

@camc314 yes we can merge both PRs. Had finally time to install "go" to my WSL2 setup and test it :)

@dkattan
Copy link
Author

dkattan commented Oct 30, 2025

hello 👋 thank you for the work. I peaked a bit in the code, and it looks like you want to rebuild workspace/diagnostic. Would prefer to go the LSP specs way, before creating new options for it. :)

Sadly to support this spec, we need to support textDocument/diagnostic first. Which is blocked by TsGoLinter In-Memory capability in #14733. I already had a small prototype ready with #11447 and #11414. /cc @camc314

Ah! It didn't even occur to me that the LSP spec accomodated for this. The description in #11447 helps big time.

It looks like you guys just got oxc-project/tsgolint#291 merged to support this which should unblock and allow us to merge #14733

@Sysix do you want to re-open and rebase #11447 and #11414 once that is done or would you prefer I integrate those changes into this PR?

@Sysix
Copy link
Member

Sysix commented Oct 31, 2025

@Sysix do you want to re-open and rebase #11447 and #11414 once that is done or would you prefer I integrate those changes into this PR?

I would prefer to rebase the PR's. Created the PR #15166 so the code path are similar to the outdated PR's :)
But I think we still need to wait for a new release of lsp-types and tower-lsp-server crate. :/
cc @mrnossiom

@Sysix Sysix closed this Oct 31, 2025
@mrnossiom
Copy link

On it :)

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

Labels

A-editor Area - Editor and Language Server A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants