Skip to content

Watch files over LSP #806

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

Merged
merged 22 commits into from
May 14, 2025
Merged

Watch files over LSP #806

merged 22 commits into from
May 14, 2025

Conversation

andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented Apr 17, 2025

This adds LSP file watching requests for wildcard directories, failed/affecting lookup locations, and tsconfig files.

@andrewbranch andrewbranch marked this pull request as ready for review April 28, 2025 23:10
@Copilot Copilot AI review requested due to automatic review settings April 28, 2025 23:10
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for watching files over LSP by integrating file watcher functionality into various parts of the project and refactoring how file events are processed.

  • Introduces new file watch APIs and methods in the project and LSP server modules.
  • Refactors and propagates comparePathsOptions, file watchers, and diagnostic publishing across services and tests.
  • Updates tests and utilities for consistent use of configuration and file watching.

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/tsoptions/* Introduces new utility functions for pattern matching.
internal/project/* Adds file watcher fields and update logic in projects.
internal/lsp/server.go Integrates LSP file watch requests, notifications, and dynamic registration.
internal/api/api.go Updates to script info creation reflecting FS injection.
internal/testutil/projecttestutil/projecttestutil.go Refactors file variable naming to improve consistency.
Comments suppressed due to low confidence (1)

internal/lsp/server.go:70

  • The variable name 'watcheEnabled' appears to have a typo. Consider renaming it to 'watchEnabled' for clarity and consistency.
watcheEnabled  bool

@andrewbranch andrewbranch marked this pull request as draft May 12, 2025 18:48
@andrewbranch andrewbranch marked this pull request as ready for review May 12, 2025 23:56
@andrewbranch andrewbranch requested a review from sheetalkamat May 13, 2025 22:37
@andrewbranch andrewbranch enabled auto-merge May 14, 2025 16:10
@andrewbranch andrewbranch added this pull request to the merge queue May 14, 2025
Merged via the queue into microsoft:main with commit 866466e May 14, 2025
23 checks passed
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.

3 participants