#100 Declined
kriegaex kriegaex
birkenfeld birkenfeld

Kconfig lexer: recognise Trac setting 'tab_width'

  1. Alexander Kriegisch avatarAlexander Kriegisch

Thanks for importing my Kconfig lexer, but because the patch was old there was an update that went unnoticed. I just committed it and kindly request you to pull it upstream. It should simplify Trac integration, but uses reflection (import inspect), so please review it before pulling. I hope it is acceptable.

Reference changeset from the Freetz project: http://freetz.org/changeset?reponame=&new=7939%40trunk%2Ftools%2Fdeveloper%2Fkconfig.pygments.patch&old=7914%40trunk%2Ftools%2Fdeveloper%2Fkconfig.pygments.patch

Comments (1)

  1. Alexander Kriegisch author

    Sounds reasonable from a Pygments perspective. The thing is, I guess Trac does tab expansion either for all files or for none, and I guess it does so before sending them to Pygments. So indentation-aware support would only work for Kconfig if it would also be applicable to tab-expanded files with a variable tab width (we use 4 at Freetz). I.e. Pygments would not see any tabs and it would not be safe to asssume that a tab always equals 8 spaces. This is what makes my lexer so complicated and why I added this hack in the first place.

    Should you ever add indentation-aware support in the way Kconfig files sent by Trac need it, please do not hesitate to ask me to be a tester. I am no longer with Freetz, but this ugly little lexer is my baby, so I will test it for you.

    P.S.: Maybe you can accept the comment updates unrelated to Trac, i.e. everything in this patch except "import inspect" and the "special case" hunk? It is just cosmetics, but anyway.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.