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

List:       kwrite-devel
Subject:    Re: [Bug 154810] word completion: detect filetype and populate word
From:       Thomas Friedrichsmeier <thomas.friedrichsmeier () ruhr-uni-bochum ! de>
Date:       2007-12-30 22:29:33
Message-ID: 200712302329.37532.thomas.friedrichsmeier () ruhr-uni-bochum ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Sunday 30 December 2007, Anders Lund wrote:
> On Sunday 30 December 2007, Thomas Friedrichsmeier wrote:
> > Therefore, the first wish would be the ability to force a *specific*
> > version of a highlighting defintion to be used, e.g. by filename.
>
> It is possible to select the highlight using the configuration dialog,
> either by setting priority, by defining it in a filetype of by using a
> document variable, possibly in a .kateconfig file. I think that covers
> that.

I'm not entirely sure, we're talking about the same thing, here. My concern is 
more about IDEs that want to do *more* than what can easily be fit into a 
highlighting definition (but at the same time only deal with a limited number 
of different file types). For instance kdevelop might want to add some 
specialities to C/C++ files, quanta to php / html files, RKWard to R files, 
etc. In that situation it might be useful for those applications to control 
the highlighting definition in use more closely (i.e. independently of user 
settings or kate filetypes). For those cases kdevelop/quanta/rkward might 
want to make sure that a very specific version of the highlighting defintion 
is used, independently from any version(s) of the highligthing defintion the 
user might have installed elsewhere.

(But then again, maybe you are right and this could be solved by shipping an 
own highlighting definition which simply sets a high priority?)

> > Further wishes:
> > - get and set <list/>s of keywords
> > e.g. void setKeywordList(const QString &listname, const QStringList
> > &list);
>
> I don't know why we would want to edit the highlight files this way.
> Afterall the user is blind in this case, as she can't possibly know for
> sure how the list is used.

Yes, but see above, again. kdevelop might want to provide code completion for 
preprocessor directives, quanta might want to make sure additional PHP 
functions which are defined in the project get highlighted, RKWard might want 
to add highlighting for functions / symbol names loaded from arbitrary 
packages. This is possible by implementing arbitrary highlighting rules, but 
it would simply be very convenient to be able to pass on the job to the kate 
highlighting engine, which already deals with those same aspects, and just 
refine/reuse the data in some cases.

> > - on a more basic level, the ability to find out at least, whether a
> > specified cursor is inside a comment region, or perhaps in a string
> > literal.
>
> This would be covered  by the above if i am not wrong? It can currently be
> done by checking the attribute.

Yes, this would be covered by the above (now snipped, though it actually would 
be the most important feature). This is just a more limited suggestion, in 
case the above is too hard to accomplish.

How would I get at this attribute, right now?

> > - ability to get and set the regexp defining a "word". See
> > http://lists.kde.org/?l=kwrite-devel&m=119400167931455&w=2 .
>
> First, there is no regexp, rather a list of characters defined as word
> separators. And it's global to the highlight i believe.

I guess you may be right. Inside 
KateCompletionWidget::cursorPositionChanged(), a regexp is being used, though 
(and perhaps that is the point where it should be addressed, instead).

Regards
Thomas

["signature.asc" (application/pgp-signature)]

_______________________________________________
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