[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
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2007-12-31 1:27:57
Message-ID: 20071231012756.GA11654 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

On 30.12.07 23:29:33, Thomas Friedrichsmeier wrote:
> 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.

That already works fine. KDevelop's C++ support already adds
highlighting of all occurences of the variable currently under the
cursor for example. It also highlights function arguments in the
function body. Simply by using the existing KTE::Attribute stuff as far
as I can see (no guru on that part :)

> > > 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,

Already works, at least for #include using the normal code-completion
model AFAIK.

> 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.

I don't know how kates highlighting-stuff works, but KDevelop has its
own datatypes for knowing which parts of a text file are what kind of
language construct. So all I can imagine at the moment to help kate is
by transferring that knowledge over a KTE interface, i.e. doing
something like addFunctionDeclaration(name,begin,end), but doing all
that and duplicating all the information seems not like a good idea. And
I doubt that you want to port over the language support from KDevelop to
Kate (though that would allow a ton of interesting things I guess)

Andreas

-- 
You will be the last person to buy a Chrysler.
_______________________________________________
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