On Thu, Aug 28, 2008 at 1:26 AM, Jeff Wheeler <[EMAIL PROTECTED]> wrote:
> I think these are good. I'm not able to fully understand much of what > is done in these files, especially Yi.Mode.Haskell, but I think > they're creating an AST. From what I can make out, the cleverMode is > mostly doing this for the purpose of "clever" indentation settings and > Yi.Sytnax.Paren just creates a structure based on the parentheses. cleverMode is based on parens mostly; preciseMode is in development and should understand much more of the haskell syntax. > Both are useful, but neither has a concept of something like a > "function", from what I can tell. The cleverMode looks is used for > indentation, but is it used for syntax highlighting? A 'Mode' groups syntax handling and syntax-specific operations like indentation. See the type Yi.Buffer.Mode. > I think the themes should have more of an idea of the syntax tree of > the file, instead of just colorizing a static list of token names. Ok, that's what Yi.Syntax.Paren does. Eg. it shows parens in red when they are not matched; this is done by looking at the syntax tree. > I'm not sure, yet, how to implement this. I was just throwing my vote > in the hat for a neat feature, and suggesting how I thought it should > work. If I can help to implement it, I will, but I'm certainly not an > expert. Of course, I'm not suggesting that this needs to be > implemented immediately --- it's a fairly difficult change --- just > that it is probably a good design in the end. > > I agree that all languages should use the same theme (I just put > "haskell" in the hierarchy to demonstrate the flexibility to colorize > something differently with the same token name in Haskell vs. other > languages, for example; ignore that if it makes no sense :D). Ok; I've committed the 1st step towards this: the Themes are now defined in terms of Prototypes (see Data.Prototype). This basically gives you the ability to define styles in terms of each other at the top-level. If this is done intelligently, each sub-theme can override as much or as little as it wants. See Yi.Style.Library for details. Now, the fields of Yi.Style are quite bad (there is no structure in it). Would you like to define a fields that make sense for you? Cheers, JP. --~--~---------~--~----~------------~-------~--~----~ Yi development mailing list [email protected] http://groups.google.com/group/yi-devel -~----------~----~----~----~------~----~------~--~---
