{"id":19299424,"url":"https://github.com/jeff-hykin/better-cpp-syntax","last_synced_at":"2025-12-11T21:55:02.730Z","repository":{"id":38081779,"uuid":"168881176","full_name":"jeff-hykin/better-cpp-syntax","owner":"jeff-hykin","description":"💾 The source of VS Code's C++ syntax highlighting","archived":false,"fork":false,"pushed_at":"2024-07-12T21:36:38.000Z","size":14405,"stargazers_count":165,"open_issues_count":140,"forks_count":32,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-09T00:07:31.116Z","etag":null,"topics":["syntax","syntax-highlighter","syntax-highlighting","textmate-grammar","visual-studio-code","vscode"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeff-hykin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-02T21:39:34.000Z","updated_at":"2025-05-03T22:13:51.000Z","dependencies_parsed_at":"2024-11-09T23:11:49.331Z","dependency_job_id":"0e0a90fb-8961-4ea2-85ae-699e680923b3","html_url":"https://github.com/jeff-hykin/better-cpp-syntax","commit_stats":null,"previous_names":["jeff-hykin/cpp-textmate-grammer","jeff-hykin/cpp-textmate-grammar"],"tags_count":87,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-hykin%2Fbetter-cpp-syntax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-hykin%2Fbetter-cpp-syntax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-hykin%2Fbetter-cpp-syntax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeff-hykin%2Fbetter-cpp-syntax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeff-hykin","download_url":"https://codeload.github.com/jeff-hykin/better-cpp-syntax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253166520,"owners_count":21864482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["syntax","syntax-highlighter","syntax-highlighting","textmate-grammar","visual-studio-code","vscode"],"created_at":"2024-11-09T23:11:37.610Z","updated_at":"2025-12-11T21:55:02.679Z","avatar_url":"https://github.com/jeff-hykin.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg height=\"90\" alt=\"Screen Shot 2022-02-11 at 12 01 19 PM\" src=\"https://user-images.githubusercontent.com/17692058/153645502-f106a481-faaf-450f-9f5e-10da3981d8dc.png\"\u003e\n\u003c/p\u003e\n\n# Sponsors\n\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003e\n                \u003ca href=\"https://bit.ly/3BdYRfu\"\u003e\n                    \u003cimg src=https://storage.googleapis.com/gitduck/img/duckly-sponsor-vsc-opt.png \u003e\n                \u003c/a\u003e\n            \u003c/th\u003e\n            \u003cth\u003e\n                \u003cp align=\"left\"\u003e\n                    Easy pair programming with any IDE. Duckly enables you to talk, share your code in real-time, server and terminal with people using different IDEs.\n                    \u003cbr\u003e\n                    \u003ca href=\"https://bit.ly/3BdYRfu\"\u003eTry it out for free\u003c/a\u003e\n                \u003c/p\u003e\n            \u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n\u003c/table\u003e\n\n\u003c!-- \u003cimg src=https://user-images.githubusercontent.com/17692058/153651656-2607a088-4b85-4729-9118-fe721246eb27.svg \u003e --\u003e\n\n\u003cbr\u003e\n\n# What does this extension do?\nThis will get you the bleeding-edge syntax highlighting for C++. Which means your theme will be able to color your code better. This used to be a fix, but then VS Code starting using it as the official source for C and C++ highlighting.\n\nNOTE: The default VS Code theme does not color much. Switch to the Dark+ theme (installed by default) or use a theme like one of the following to benefit from the changes:\n- [XD Theme](https://marketplace.visualstudio.com/items?itemName=jeff-hykin.xd-theme)\n- [Noctis](https://marketplace.visualstudio.com/items?itemName=liviuschera.noctis)\n- [Kary Pro Colors](https://marketplace.visualstudio.com/items?itemName=karyfoundation.theme-karyfoundation-themes)\n- [Material Theme](https://marketplace.visualstudio.com/items?itemName=Equinusocio.vsc-material-theme)\n- [One Monokai Theme](https://marketplace.visualstudio.com/items?itemName=azemoh.one-monokai)\n- [Winteriscoming](https://marketplace.visualstudio.com/items?itemName=johnpapa.winteriscoming)\n- [Popping and Locking](https://marketplace.visualstudio.com/items?itemName=hedinne.popping-and-locking-vscode)\n- [Syntax Highlight Theme](https://marketplace.visualstudio.com/items?itemName=peaceshi.syntax-highlight)\n- [Default Theme Enhanced](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools-themes)\n\n## How do I use the extension?\nJust install the VS Code extension and the changes will automatically be applied to all relevant files.\n\u003cbr\u003eLink: https://marketplace.visualstudio.com/items?itemName=jeff-hykin.better-cpp-syntax\n\n# Comparison (Material Theme)\n\u003cimg width=\"2794\" alt=\"compare\" src=\"https://user-images.githubusercontent.com/17692058/153653793-3685ffd5-cf96-43c3-a883-da79ba33d037.png\"\u003e\n\n## How do I use the grammar? (as an upstream for my non-vs code editor)\n\n1. Watch the the \"Major Changes\" thread [here](https://github.com/jeff-hykin/better-cpp-syntax/issues/64) to know when I change licenses, the codebase structure, or just major highlighting changes.\n2. I support non-VS Code usecases. E.g. yes, you are welcome to open issues [like this one](https://github.com/jeff-hykin/better-cpp-syntax/issues/653) that don't affect VS Code.\n\n## What is different from atom/language-c?\nIt fixes:\n- The issue of single quotes inside #error and #warning being highlighted when then shouldn't be \n- The issue of initialization functions only highlighting the first parenthesis\n- The bug that treats the 'and' and 'or' operator as functions (instead of operators) when they are followed by ()'s\n- Old C99 function highlighting that broke the standard function highlighting\n- The failure of highlighting for the semicolon after namespaces\n- The missing operator overloading symbols\n- The failure to tag operator overloading functions as functions\n- The failure to tag implicit operator overrides\n- The marking of some %'s as invalid inside of strings https://github.com/atom/language-c/issues/289\n- The highlighting of namespaces with ::'s https://github.com/atom/language-c/issues/260 \n- The issue of the C++ syntax depending on (and getting screwed up by) the C syntax\n- multiple inheritance https://github.com/atom/language-c/issues/245\n- And many many more issues (#318, #309, #270, #246, etc)\n\nIt adds:\n- Parameter highlighting\n- Highlighting of embedded assembly code (if you have an assembly syntax installed)\n- Function-pointer highlighting\n- Lambda highlighting\n- C++14 literal support (`100'000ms`)\n- Template definition syntax highlighting (including C++ 2020 syntax)\n- Better object identification\n- Improved scope resolution `::` syntax\n- Highlighting of templated function calls `aFunction\u003cint\u003e(arguments)`\n- Additional specificity for many existing tags\n- Many other features\n\n### Like this extension?\n\u003cul\u003e\n    \u003cli\u003e\n        You'll probably like this as well: \u003ca href=\"https://marketplace.visualstudio.com/items?itemName=jeff-hykin.better-syntax\"\u003eMy \"Better Syntax\" Megapack\u003c/a\u003e\n    \u003c/li\u003e\n\u003c/ul\u003e\n\n## Contributing\nIf you'd like to help improve the syntax, take a look at `main/main.rb`. And make sure to take a look at `documentation/CONTRIBUTING.md` to get a better idea of how the code works.\n\nPlanned future fixes/features:\n- Add tagging for type-casting statements\n- Add tagging for custom types words\n- Better support for dereferenced/pointer tagging\n- Full C++ 2020 support (module imports, arrow return types, etc.)\n- Improving template types\n\n## What if I see a highlighting bug?\nLet me know! Post an issue on https://github.com/jeff-hykin/better-cpp-syntax\nI love regular expressions, and PR's are always welcome.\n\n## Did you write all of this yourself?\nThe original JSON was taken from https://github.com/atom/language-c\n\u003cbr\u003e@matter123 wrote every massive pull request, from simple bugfixes up to the entire textmate testing suite\n\u003cbr\u003e@j-cortial has fixed many lingering bugs\n\u003cbr\u003eThe #error fix was taken from fnadeau's pull request here: https://github.com/atom/language-c/pull/251\n\u003cbr\u003eThank you @matter123, @j-cortial, and @fnadeau!\n\u003cbr\u003eThe rest of the ruby is authored by @jeff-hykin\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeff-hykin%2Fbetter-cpp-syntax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeff-hykin%2Fbetter-cpp-syntax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeff-hykin%2Fbetter-cpp-syntax/lists"}