Skip to content

feat: add parser configuration option to extension#18

Merged
ram-nadella merged 3 commits intomainfrom
add-parser-configuration
Jun 30, 2025
Merged

feat: add parser configuration option to extension#18
ram-nadella merged 3 commits intomainfrom
add-parser-configuration

Conversation

@ram-nadella
Copy link
Owner

Summary

  • Add configurable parser backend selection for the pydance extension
  • Users can now choose between "ruff" and "tree-sitter" parsers
  • Default parser is set to "ruff" for better performance

Changes

  • Added pydance.parser configuration property in package.json
  • Updated extension.ts to read the parser configuration and pass it to pylight via --parser flag
  • Configuration appears in VS Code settings UI with dropdown for easy selection

Test plan

  • npm run format - code is properly formatted
  • npm run lint - no linting errors
  • npm test - all tests pass
  • Manual testing with both parser options
  • Verify parser selection is logged in output channel

🤖 Generated with Claude Code

ram-nadella and others added 3 commits June 29, 2025 22:23
The workspaceRoot check was preventing the language server from starting
when no workspace folder was open. This is overly restrictive since:

- LSP servers can operate without a workspace (single file mode)
- Workspace information is automatically passed via LSP initialization
- The LSP spec allows for null workspace folders

This change allows the extension to be more flexible and follow VSCode
LSP best practices by letting the server handle workspace scenarios.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add pydance.parser configuration setting with values "ruff" and "tree-sitter"
- Set default parser to "ruff" as requested
- Update extension to pass --parser flag to pylight server
- Log selected parser in output channel for debugging

This allows users to choose between the ruff and tree-sitter parser backends
in the pylight language server.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ram-nadella ram-nadella merged commit 9582a37 into main Jun 30, 2025
4 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.

1 participant