Skip to content

feat(web): add Basic language support in file viewer#1054

Merged
brendan-kellam merged 3 commits intomainfrom
brendan-kellam/basic-language-support
Mar 27, 2026
Merged

feat(web): add Basic language support in file viewer#1054
brendan-kellam merged 3 commits intomainfrom
brendan-kellam/basic-language-support

Conversation

@brendan-kellam
Copy link
Copy Markdown
Contributor

@brendan-kellam brendan-kellam commented Mar 27, 2026

Summary

  • Maps .bas extension to BASIC language in language detection
  • Adds basic CodeMirror language using the VB stream language parser
  • Enables syntax highlighting for Basic files in the file viewer

Test plan

  • Open a .bas file in the file viewer and verify syntax highlighting renders correctly
  • Verify the BASIC language icon appears correctly

Summary by CodeRabbit

New Features

  • Introduced BASIC language syntax highlighting support in the file viewer for improved code readability.
  • Implemented automatic detection of .bas file extensions to ensure proper language identification and syntax highlighting.

@github-actions

This comment has been minimized.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 27, 2026

Walkthrough

This pull request adds support for BASIC language syntax highlighting in the file viewer. It introduces CodeMirror language definition mapping, file extension detection override for .bas files, and updates language metadata to enable highlighting for BASIC code files.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md
Added entry documenting the introduction of basic language syntax highlighting feature.
Language Support Configuration
packages/web/src/lib/codemirrorLanguage.ts, packages/web/src/lib/languageMetadata.ts
Added CodeMirror language mapping for "basic" using legacy VB mode and updated BASIC language metadata to reference the new CodeMirror language definition.
File Extension Detection
packages/web/src/lib/languageDetection.ts
Extended ambiguous extension overrides to map .bas file extension to BASIC language.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • PR #1026: Introduced ambiguousExtensionOverrides mechanism for language detection, which this PR builds upon by adding the .bas→BASIC mapping.

Suggested reviewers

  • msukkari
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding Basic language syntax highlighting support to the web file viewer.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch brendan-kellam/basic-language-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CHANGELOG.md`:
- Line 12: The CHANGELOG entry uses "Basic" but the codebase uses the all-caps
key "BASIC"; update the CHANGELOG line to use "BASIC" (matching
languageMetadataMap["BASIC"] and ambiguousExtensionOverrides) so the wording is
consistent with the repository's language identifiers and documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 833f52d3-528c-4433-900c-2015524479b1

📥 Commits

Reviewing files that changed from the base of the PR and between 5fc21fd and be0a813.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • packages/web/src/lib/codemirrorLanguage.ts
  • packages/web/src/lib/languageDetection.ts
  • packages/web/src/lib/languageMetadata.ts

@brendan-kellam brendan-kellam merged commit f6c2418 into main Mar 27, 2026
10 checks passed
@brendan-kellam brendan-kellam deleted the brendan-kellam/basic-language-support branch March 27, 2026 00:59
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