Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Need a way to override filextension registration #6873

Closed
karl-sjogren opened this issue Feb 14, 2014 · 3 comments
Closed

Need a way to override filextension registration #6873

karl-sjogren opened this issue Feb 14, 2014 · 3 comments

Comments

@karl-sjogren
Copy link

I'm working on some small adjustments to an extension that gives you syntax highlighting for handlebars files. Currently it only supports .hbr files though since the extensions .hbs and .handlebars are registered by the html language.

I've looked at the LanuageManager implementation and it seems that there is no way for an extension to override the file extensions of a previously registered language. Am I missing something here?

My team and I use a modified main.js in Brackets 36 to get around this though I would really like to contribute my fixes for others as well and supporting the correct file extensions for handlebars would be great.

@dangoor
Copy link
Contributor

dangoor commented Feb 24, 2014

Reviewed low priority (for now) to @peterflynn, who I'm pretty sure has thought about this issue. I'm not sure that this is reported elsewhere.

@peterflynn
Copy link
Member

Yep -- see recent discussion in https://groups.google.com/d/msg/brackets-dev/7wKy5buVYCE/ufT_aj9tpN0J, for example

peterflynn added a commit that referenced this issue Mar 24, 2014
(#6873) - with unit tests.
- Remove inaccurate docs on Language add extension/name APIs
- Fix PHP mixed-mode handling so token-level detection (getLanguageForMode())
works - similar to our handling of "htmlmixed" mode. Allows us to remove
"clike" dummy language without breaking PHP Toggle Comment functionality
@peterflynn
Copy link
Member

New APis removeFileExtension() and removeFileName() will be available in Sprint 38 -- closing as fixed.

turhothgor-dev pushed a commit to turhothgor-dev/brackets that referenced this issue Mar 29, 2014
(adobe#6873) - with unit tests.
- Remove inaccurate docs on Language add extension/name APIs
- Fix PHP mixed-mode handling so token-level detection (getLanguageForMode())
works - similar to our handling of "htmlmixed" mode. Allows us to remove
"clike" dummy language without breaking PHP Toggle Comment functionality
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants