[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Default Styles (take two)
From:       Milian Wolff <mail () milianw ! de>
Date:       2014-02-18 9:49:59
Message-ID: 1956691.ZODa1eseTb () milian-kdab2
[Download RAW message or body]

On Tuesday 18 February 2014 10:06:20 Dominik Haumann wrote:
> Ok, next round. The current list looks as follows:
> Legend:
>  '-': already exists
>  '+': new, and makes a lot of sense (only these will survive in the end)
>  '?': new, really needed?
> 
> Text
> - dsNormal
> - dsKeyword
> + dsExtension   (same as keyword, e.g. Qt, tr1, and other extensions)
> + dsControlFlow (or dsStructure, if, else, switch, continue)
> - dsFunction
> - dsDataType
> + dsVariable    ($bla in php or perl)
> + dsOperator    (for +-*/::<> etc..., lots of languages define this)
> 
> Strings & Characters
> - dsChar
> - dsString
> + dsRawString   ('' in Perl, CoffeeScript and Bash, r'' or r"" in Python)
> ? dsSpecialString (was dsRegExp previously)
> ? dsSpecialChar   (no idea what this is?)

As far as I understood Matthew, this would be e.g. a non-escaped character of 
special meaning. E.g. any of (){}.*? in regular expressions. Would/could also 
be used by \n \t and other escape sequences in "normal" strings.

> Numbers & Types
> - dsDecVal
> - dsBaseN
> - dsFloat
> + dsBoolean     (true, false, TRUE, FALSE, often used in languages)

I don't like this. These are just keywords and should be highlighted like 
that. The dsConstant at least would be useful in some languages, to e.g. 
highlight enums, or built-in constant values.

> Comments & Documentation
> - dsComment
> - dsRegionMarker
> + dsDocumentation (e.g. @brief in doxygen, or """ in Python)
> + dsAnnotation  (e.g. @... in Java, @param in Doxygen)
> + dsCommentVar  (e.g. foobar in "@param foobar", etc...)
> + dsInformation (e.g. @note)
> + dsWarning     (e.g. in doxygen @warning)
> 
> Notifications
> - dsError
> - dsAlert       (TODO, FIXME, HACK, doxygen: @todo)
> 
> Misc
> - dsOthers
> 
> This makes 11 new default styles (+), and again 2 new default styles marked
> with "?".
> 
> 
> 
> 
> Items that were criticized and therefore removed:
> ? dsRegExp      (new, JavaScript and other languages heavily rely on it)
> ? dsRegExpOp    (new, RegExp semantics: ^\., [:space:], ...)
> ? dsSection     (new, e.g. [general] in ini file, or \section in LaTeX)
> ? dsConstant    (new, if needed? maybe M_PI or similar things? not sure...)
> ? dsLink        (new, url, path)
> ? dsDeprecated  (new: maybe for deprecated stuff?)
> ? dsExample     (new, e.g. @code ... @endcode, or dsVerbatim ? )
> 
> and:
> ? dsInterface: C# interfaces, Scala mixins, declarations, protocols
> ? dsReference: Markdown links, C pointers, LaTeX refs
> ? dsBuiltin: Value keywords like Java's true, R's FALSE, Python's None,
>              JS' null, as well as Python's open, reversed, ..., and Go's
>              predeclared identifiers like new, print, ...
> ? dsBuiltinValue
> ? dsBuiltinFunction
> ? dsException: Often with Exception or Error in the name
> ? dsSymbol
> 
> Again:
> Will these default styles enable us to ditch many/most of the hard-coded
> colors?

Looks really good. Imo once this is in, one could start to port the languages 
and then see what is missing. Maybe we still need some generic "misc0-9" 
colors.

I hope to have some time tomorrow for hacking on a unified place to provide 
such default colors. Then, one could add the new colors there in one central 
place.

Cheers
-- 
Milian Wolff
mail@milianw.de
http://milianw.de
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic