Skip to content

feat(monaco): add CSV file extension support#45285

Open
yeelam-gordon wants to merge 1 commit intomainfrom
issue/33811
Open

feat(monaco): add CSV file extension support#45285
yeelam-gordon wants to merge 1 commit intomainfrom
issue/33811

Conversation

@yeelam-gordon
Copy link
Contributor

@yeelam-gordon yeelam-gordon commented Feb 2, 2026

Summary of the Pull Request

Adds .csv extension to Monaco editor's plaintext file types, enabling syntax highlighting for CSV files in Peek and Dev File Preview.

PR Checklist

Detailed Description of the Pull Request / Additional comments

Problem

CSV files were not recognized by Monaco editor and showed no preview or defaulted to binary mode.

Solution

Added .csv to the txtExt language definition in src/Monaco/monaco_languages.json.

Validation Steps Performed

  1. Created a .csv file with sample data
  2. Selected file in File Explorer
  3. Pressed Peek hotkey
  4. Verified CSV content displays with plaintext highlighting

…cp-config.json": ENOENT: no such file or directory, open 'Q:\PowerToys-ed64\.github\skills\submit-pr\references\mcp-config.json'
@github-actions
Copy link

github-actions bot commented Feb 2, 2026

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

Unrecognized words (1)

mrt

These words are not needed and should be removed Mrt

Some files were automatically ignored 🙈

These sample patterns would exclude them:

^src/modules/powerrename/unittests/testdata/avif_test\.avif$
^src/modules/powerrename/unittests/testdata/heif_test\.heic$

You should consider adding them to:

.github/actions/spell-check/excludes.txt

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.

To accept these unrecognized words as correct, update file exclusions, and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:microsoft/PowerToys.git repository
on the issue/33811 branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/21574943555/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Warnings ⚠️ (2)

See the 📂 files view, the 📜action log, or 📝 job summary for details.

⚠️ Warnings Count
⚠️ large-file 2
⚠️ no-newline-at-eof 1

See ⚠️ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Copy link
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

Updates Monaco language/extension mapping so .csv files are treated as text for Peek/Monaco-based preview scenarios (fixing #33811 where CSV preview incorrectly routes to an Office/Excel preview path).

Changes:

  • Add .csv to the set of extensions handled as text (txtExt) in Monaco’s language list.

@yeelam-gordon yeelam-gordon changed the title fix: address issue #33811 feat(monaco): add CSV file extension support Feb 5, 2026
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.

[Peek] Preview CSV correctly (Works if rename ext to .txt) (Unrelated to Office files preview)

1 participant