forked from adobe/brackets
-
Notifications
You must be signed in to change notification settings - Fork 0
Language Support
DennisKehrig edited this page Dec 12, 2012
·
84 revisions
See branch dk/less-refactoring
- Idea: rename LESS to MORE and add an extension that adds support for MORE
- Added an extension that just requires the CodeMirror mode
Result: Called EditorUtils.js _getModeFromFileExtensions with an unhandled file extension: more (EditorUtils.js:163) - Task: Add an easy way to map a file extension to a CodeMirror mode
- Monkey-patched getModeFromFileExtensions to use file extension as mode name if such a mode exists
- Task: Load (language) extensions earlier to support their CodeMirror modes for the file automatically opened at startup (last open file)
- Added a function that changes the mode of current editors if (after adding the new mode) a different one would be used when re-opening the editor
- Task: Allow extensions to define how to add comments for a specific CodeMirror mode (in progress)
- Monkey patching not easily possible due to references to internal functions. A difficulty when making comments more generic is that we rely on the defined comment symbols to be completely contained in one CodeMirror token. I.e. we cannot define "//~" as the prefix for line comments (like SciTE does) because it is not a prefix of the "//" token.