-
Notifications
You must be signed in to change notification settings - Fork 0
feat: initial View Files #5
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
Open
Arilas
wants to merge
14
commits into
claude/chat-tab-implementation-fJK6U
Choose a base branch
from
claude/add-lsp-support-cJPBA
base: claude/chat-tab-implementation-fJK6U
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: initial View Files #5
Arilas
wants to merge
14
commits into
claude/chat-tab-implementation-fJK6U
from
claude/add-lsp-support-cJPBA
Conversation
This file contains hidden or 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
Add new LSP plugins with auto-detection capabilities: - Tailwind CSS: IntelliSense for Tailwind classes, enabled when tailwindcss is detected in package.json or lock files - ESLint: Linting and code actions, enabled when .eslintrc.* or eslint.config.* files are detected - Oxlint: Fast JavaScript/TypeScript linting, enabled when oxlintrc.json or oxlint dependency is detected - Prettier: Code formatting, enabled when .prettierrc.* files are detected - Biome: Fast all-in-one formatter/linter, enabled when biome.json is detected - Emmet: Abbreviation expansion for HTML/JSX, always enabled Update Monaco providers: - Add support for Vue, Svelte, Astro, Markdown, and GraphQL languages - Enhance completion trigger characters for Tailwind CSS support (colon, hyphen, space) for better class completion experience
- Add LspDialog component for managing language servers - Display active/inactive LSP status with error indicators - Allow restarting individual LSP servers from the dialog - Add LSP center status bar item showing active count - Implement restart method in PluginHost backend - Add restartPlugin API and store action on frontend
- Add oxfmt plugin for fast Prettier-compatible formatting via npx oxfmt --lsp - Add dockerfile plugin for Docker support via dockerfile-language-server - Add rust-analyzer plugin for Rust support (requires rust-analyzer in PATH) - Add taplo plugin for TOML support (requires taplo in PATH) - Add sql plugin for SQL support via sql-language-server - Update Monaco providers to register new languages (rust, toml, sql, dockerfile) - All plugins auto-detect based on project context
- Switch from taplo (requires binary in PATH) to tombi (via npx) - Tombi provides better schema validation and automatic key sorting - No longer requires separate binary installation
- Rename plugin directory from taplo to tombi - Rename TaploPlugin struct to TombiPlugin - Change plugin ID from panager.taplo to panager.tombi - Update all module references
- Add @prisma/language-server support via npx - Auto-detects schema.prisma or prisma dependency in package.json - Provides completions, hover, formatting, go-to-definition, references
- Vue: @vue/language-server (Volar) - auto-detects vue/nuxt projects - Astro: @astrojs/language-server - auto-detects astro.config.* - Svelte: svelte-language-server - auto-detects svelte.config.* or @sveltejs/kit - Angular: @angular/language-server - auto-detects angular.json or @angular/core All plugins use npx for easy installation without global dependencies.
- GraphQL: Auto-detects graphql config files, uses graphql-language-service-cli - Bash: Shell script support via bash-language-server (npx) - MDX: Auto-detects MDX dependencies, uses @mdx-js/language-server - Pyright: Python support, detects pyproject.toml/requirements.txt - Deno: Requires deno in PATH, detects deno.json/deno.jsonc - Go: Requires gopls in PATH, detects go.mod/go.sum - Zig: Requires zls in PATH, detects build.zig Also updates Monaco providers with new language IDs.
Add a comprehensive settings system for language servers:
- Add `languageServers` field to IdeSettings for per-server config
- Each server has `enabled` (bool) and `settings` (JSON) fields
- Settings merge: defaults + user overrides from settings file
- Add `server_id()` method to LspConfig trait for settings lookup
- Add `default_settings()` method for server-specific defaults
- Pass lsp_settings through ProjectOpened event to plugins
- Update all plugins to handle new event structure with `..` pattern
Users can now configure language servers in settings.jsonc:
```json
{
"languageServers": {
"typescript": {
"enabled": true,
"settings": {
"typescript.inlayHints.includeInlayParameterNameHints": "all"
}
},
"eslint": {
"enabled": false
}
}
}
```
The `enabled` field supports:
- `true`: Always enable (even without project detection)
- `false`: Always disable
- omitted: Auto-detect based on project files
Add support for using tsgo (Go-based TypeScript language server) as
an alternative to the default typescript-language-server.
Configure in settings.jsonc:
```json
{
"languageServers": {
"typescript": {
"settings": {
"useTsgo": true
}
}
}
}
```
When enabled:
- Uses `npx @anthropic/tsgo lsp` instead of `typescript-language-server`
- Status bar shows "tsgo" instead of TS version
- Simplified initialization options for tsgo
The official Microsoft package for the Go-based TypeScript compiler is @typescript/native-preview, not @anthropic/tsgo. Command: npx @typescript/native-preview --lsp --stdio
Replace console.error calls with a utility function logLspErrorIfNeeded to handle LSP error logging across various providers. This change ensures that only unexpected errors are logged, reducing console clutter and improving error management. The utility function checks for expected errors and logs them accordingly, enhancing the overall robustness of the LSP integration.
- Added functionality to check if a file is already open in the active tab before scrolling to its position, improving user experience. - Introduced support for additional programming languages in the LSP, including Dockerfile, Prisma, Rust, Python, Go, SQL, TOML, Markdown, Shell, GraphQL, Vue, Svelte, Astro, and more. - Updated LSP plugins to streamline language support checks, ensuring they only activate when the language is in the supported list, enhancing performance and reliability.
- Added Error Lens feature to display diagnostic messages inline at the end of affected lines, enhancing code readability. - Introduced settings for enabling/disabling the Error Lens and toggling the visibility of errors, warnings, information, and hints. - Integrated Error Lens functionality into the editor's settings and decoration management, ensuring seamless user experience. - Updated styles for inline diagnostics to visually differentiate between severity levels.
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.
No description provided.