Skip to content

refactor: use project service for lsp#239

Merged
hardfist merged 6 commits intomainfrom
yj/use-project-service
Aug 12, 2025
Merged

refactor: use project service for lsp#239
hardfist merged 6 commits intomainfrom
yj/use-project-service

Conversation

@hardfist
Copy link
Copy Markdown
Contributor

@hardfist hardfist commented Aug 12, 2025

align lsp implementation with tsgo for better consistency behavior

@hardfist hardfist marked this pull request as ready for review August 12, 2025 14:54
Copilot AI review requested due to automatic review settings August 12, 2025 14:54
Copy link
Copy Markdown
Contributor

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 refactor aligns the LSP implementation with the typescript-go project service architecture, moving away from manual program creation to using the more sophisticated project service.

  • Refactors LSP server to use project.Service instead of manually creating TypeScript programs
  • Introduces RunLinterInProgram function to enable single-program linting
  • Simplifies configuration discovery by removing file-path-based search strategies

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
internal/utils/utils.go Adds generic Must utility function for error handling
internal/linter/linter.go Extracts RunLinterInProgram from existing logic and refactors for project service integration
cmd/rslint/lsp_test.go Updates test to match simplified findRslintConfig signature
cmd/rslint/lsp.go Major refactor to use project service, simplifies configuration discovery and file handling
cmd/rslint/cmd.go Adds empty line in function call (formatting change)

hardfist and others added 4 commits August 12, 2025 22:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@hardfist hardfist merged commit 4cd54a4 into main Aug 12, 2025
4 checks passed
@hardfist hardfist deleted the yj/use-project-service branch August 12, 2025 15:17
ScriptedAlchemy pushed a commit that referenced this pull request Aug 15, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants