{"id":13646398,"url":"https://github.com/ludwigpacifici/modern-cpp-font-lock","last_synced_at":"2026-04-02T18:09:29.108Z","repository":{"id":53122937,"uuid":"58670459","full_name":"ludwigpacifici/modern-cpp-font-lock","owner":"ludwigpacifici","description":"C++ font-lock for Emacs","archived":false,"fork":false,"pushed_at":"2021-04-05T21:47:10.000Z","size":1737,"stargazers_count":168,"open_issues_count":5,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-06T19:29:16.030Z","etag":null,"topics":["elisp","emacs","melpa","syntax-highlighting"],"latest_commit_sha":null,"homepage":"https://melpa.org/#/modern-cpp-font-lock","language":"Emacs Lisp","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/ludwigpacifici.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-12T19:24:17.000Z","updated_at":"2024-08-12T19:22:49.000Z","dependencies_parsed_at":"2022-09-08T11:51:25.591Z","dependency_job_id":null,"html_url":"https://github.com/ludwigpacifici/modern-cpp-font-lock","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludwigpacifici%2Fmodern-cpp-font-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludwigpacifici%2Fmodern-cpp-font-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludwigpacifici%2Fmodern-cpp-font-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludwigpacifici%2Fmodern-cpp-font-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ludwigpacifici","download_url":"https://codeload.github.com/ludwigpacifici/modern-cpp-font-lock/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250110818,"owners_count":21376541,"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":["elisp","emacs","melpa","syntax-highlighting"],"created_at":"2024-08-02T01:02:54.612Z","updated_at":"2026-04-02T18:09:29.073Z","avatar_url":"https://github.com/ludwigpacifici.png","language":"Emacs Lisp","readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ludwigpacifici/modern-cpp-font-lock/master/img/logo.png\"/\u003e\u003c/p\u003e\n\n[![License GPL 3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.txt)\n[![MELPA](http://melpa.org/packages/modern-cpp-font-lock-badge.svg)](http://melpa.org/#/modern-cpp-font-lock)\n[![Build Status](https://travis-ci.org/ludwigpacifici/modern-cpp-font-lock.svg?branch=master)](https://travis-ci.org/ludwigpacifici/modern-cpp-font-lock)\n\n[![Donate Paypal](https://img.shields.io/badge/Donate-Paypal-lightgrey.svg)](https://www.paypal.me/ludwigpacifici)\n\nSyntax highlighting support for \"Modern C++\" - until C++20 and Technical Specification. This package aims to provide a simple highlight of the C++ language without dependency.\n\nIt is recommended to use it in addition with the `c++-mode` major mode for extra highlighting (user defined types, functions, etc.) and indentation.\n\n# Preview\n\nWith `modern-c++-font-lock-mode`:\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ludwigpacifici/modern-cpp-font-lock/master/img/mc%2B%2Bfl-on.png\" /\u003e\u003c/p\u003e\n\nUsing `GNU Emacs 27.0.50` and `CC Mode version 5.33.2`.\n\n# Installation\n\n## Melpa\n\n`modern-cpp-font-lock` is available on the major `package.el` community maintained repo - [MELPA](http://melpa.org).\n\nYou can install it with the following command:\n\n\u003ckbd\u003eM-x\u003c/kbd\u003e `package-install` \u003ckbd\u003e[RET]\u003c/kbd\u003e `modern-cpp-font-lock` \u003ckbd\u003e[RET]\u003c/kbd\u003e\n\nIn your init Emacs file add:\n\n    (add-hook 'c++-mode-hook #'modern-c++-font-lock-mode)\n\nor:\n\n    (modern-c++-font-lock-global-mode t)\n\n## `use-package`\n\nIn your init Emacs file add:\n\n    (use-package modern-cpp-font-lock\n      :ensure t)\n\n## Manual\n\n### Global setup\n\nDownload `modern-cpp-font-lock.el` into a directory of your [load-path][load-path]. Place the following lines in a suitable init file:\n\n    (require 'modern-cpp-font-lock)\n    (modern-c++-font-lock-global-mode t)\n\n`modern-c++-font-lock-mode` will be activated for buffers using the `c++-mode` major-mode.\n\n[load-path]: https://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Libraries.html\n\n### Local\n\nFor the current buffer, the minor-mode can be turned on/off via the command:\n\n\u003ckbd\u003eM-x\u003c/kbd\u003e `modern-c++-font-lock-mode` \u003ckbd\u003e[RET]\u003c/kbd\u003e\n\n# Configuration\n\n## C++ Language\n\nYou can modify the following lists to recognize more words or set it to `nil` to partially disable font locking:\n\n * `modern-c++-attributes` - `[[deprecated]]`, `[[noreturn]]`, [etc](http://en.cppreference.com/w/cpp/language/attributes).\n * `modern-c++-keywords` - `if`, `constexpr`, `noexcept`, [etc](http://en.cppreference.com/w/cpp/keyword).\n * `modern-c++-operators` - `...`\n * `modern-c++-preprocessors` - `#define`, `__LINE__`, `__cplusplus`, [etc](http://en.cppreference.com/w/cpp/preprocessor).\n * `modern-c++-types` - `bool`, `char`, `double`, [etc](http://en.cppreference.com/w/cpp/language/type).\n\nSet to `t` (default value) to enable the following options or otherwise to `nil`:\n\n * `modern-c++-literal-boolean` - `false`, `true`\n * `modern-c++-literal-integer` - `0b101010`, `18446744073709550592LLU`, `0XdeadBABEu`, [etc](http://en.cppreference.com/w/cpp/language/integer_literal).\n * `modern-c++-literal-null-pointer` - `nullptr`\n * `modern-c++-literal-string` - `R\"xyz()\")xyz\"`, `L\"hello\\ngoodbye\"`, `\"abcd\"`, [etc](http://en.cppreference.com/w/cpp/language/string_literal).\n\nConfigure the following list to customize font locking for literal integers:\n\n * `modern-c++-literal-binary-prefix-face`\n * `modern-c++-literal-binary-infix-face`\n * `modern-c++-literal-binary-suffix-face`\n * `modern-c++-literal-octal-prefix-face`\n * `modern-c++-literal-octal-infix-face`\n * `modern-c++-literal-octal-suffix-face`\n * `modern-c++-literal-hex-prefix-face`\n * `modern-c++-literal-hex-infix-face`\n * `modern-c++-literal-hex-suffix-face`\n * `modern-c++-literal-dec-infix-face`\n * `modern-c++-literal-dec-suffix-face`\n\n## C++ standard library\n\nSet to `t` (default value) to enable the following font lock options. Otherwise use `nil`:\n\n * `modern-c++-stl-cstdint` - Define the header [`\u003ccstdint\u003e`](http://en.cppreference.com/w/cpp/header/cstdint)\n\n# Mode line\n\nWhen `modern-c++-font-lock-mode` is activated, `mc++fl` is displayed.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ludwigpacifici/modern-cpp-font-lock/master/img/mode-line.png\" width=\"640\" /\u003e\u003c/p\u003e\n\n# [Wiki](https://github.com/ludwigpacifici/modern-cpp-font-lock/wiki)\n\nThe Wiki is available: https://github.com/ludwigpacifici/modern-cpp-font-lock/wiki\n\n# Testing\n\nFont-lock keywords are tested with the [faceup](https://github.com/Lindydancer/faceup) package of [Anders Lindgren](https://github.com/Lindydancer).\n\n# Feedback\n\nIf you find a bug, please check if you can reproduce with `c++-mode` only. If it is the case, send your bug upstream to [CC Mode](http://cc-mode.sourceforge.net/)\n\nDo not hesitate to ask questions or share suggestions.\n\nHappy coding!\n\n[Lud](https://lud.cc)\n","funding_links":["https://www.paypal.me/ludwigpacifici"],"categories":["Emacs Lisp","Tools"],"sub_categories":["Misc"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludwigpacifici%2Fmodern-cpp-font-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fludwigpacifici%2Fmodern-cpp-font-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludwigpacifici%2Fmodern-cpp-font-lock/lists"}