Re: [Geany-Devel] Hooks on calling some functions for plugins?

2017-07-18 Thread Денис Феклушкин
2017-07-05 13:17 GMT+07:00 Денис Феклушкин :

>
>
> 2017-07-04 23:00 GMT+07:00 Vasiliy Faronov :
>
>> Hi Denis,
>>
>> As far as I understand, none of this is directly supported by Geany right
>> now.
>>
>> This is a known problem: https://github.com/geany/geany/issues/1458
>
>
Please provide more links for subscribtion to related or same problem
(plugin API, languages API etc)
Thanks!
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Hooks on calling some functions for plugins?

2017-07-05 Thread Lex Trotman
On 5 July 2017 at 17:25, Thomas Martitz  wrote:
> Am 03.07.2017 um 12:33 schrieb Денис Феклушкин:
>>
>> Hi!
>>
>> I am writing D language plugin on D:
>> https://github.com/denizzzka/geany_dlang
>>
>> This plugin isn't adds any new functionality but I planning replace
>> already implemented Geany functionality.
>>
>> Especially, it will replace autocomplete list, tips list, symbol
>> searching, syntax highlighting by same D's infrastructural libraries calls.
>>
>> Questions: It is possible to...
>>
>> ... intercept some Geany to Scintillia messages by a plugin?
>> (SCI_AUTOCSHOW, SCI_CALLTIPSHOW)
>>
>> ... replace call "Go to Symbol Definition"?
>>
>> ... fill out ctags info from external library instead of internal
>> functions?
>
>
> I would rather ask how the plugin could provide Geany the information to do
> proper autocompletion, symbol pane updates and tags on its own.
>
> Maybe we need an interface so that TMTags can be provided by a plugin?

It makes sense that if a language specific symbol table is available
in a library then it would be the thing to use.

Cheers
Lex

>
> Best regards.
>
> ___
> Devel mailing list
> Devel@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Hooks on calling some functions for plugins?

2017-07-05 Thread Thomas Martitz

Am 03.07.2017 um 12:33 schrieb Денис Феклушкин:

Hi!

I am writing D language plugin on D:
https://github.com/denizzzka/geany_dlang

This plugin isn't adds any new functionality but I planning replace 
already implemented Geany functionality.


Especially, it will replace autocomplete list, tips list, symbol 
searching, syntax highlighting by same D's infrastructural libraries 
calls.


Questions: It is possible to...

... intercept some Geany to Scintillia messages by a plugin? 
(SCI_AUTOCSHOW, SCI_CALLTIPSHOW)


... replace call "Go to Symbol Definition"?

... fill out ctags info from external library instead of internal 
functions?


I would rather ask how the plugin could provide Geany the information to 
do proper autocompletion, symbol pane updates and tags on its own.


Maybe we need an interface so that TMTags can be provided by a plugin?

Best regards.
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Hooks on calling some functions for plugins?

2017-07-05 Thread Lex Trotman
On 5 July 2017 at 16:15, Денис Феклушкин  wrote:
>
>
> 2017-07-05 8:05 GMT+07:00 Lex Trotman :
>>
>> On 5 July 2017 at 02:00, Vasiliy Faronov  wrote:
>> > Hi Denis,
>> >
>> > As far as I understand, none of this is directly supported by Geany
>> > right now.
>> >
>> > This is a known problem: https://github.com/geany/geany/issues/1458
>> >
>> > Until it is solved systematically (if ever), you might be able to hack
>> > around it.
>>
>> Sadly the discussion seems to have hung again.  Maybe it simply isn't
>> easily solvable for Geany core.
>>
>> >
>> > For custom autocompletion, see:
>> >
>> > https://github.com/notetau/geany-jedi-complete/tree/master/geany-complete-core
>>
>> The use of a separate completion popup as used by the above is the
>> best current solution, keep asynchronism in the plugin, remember
>> neither Geany now GTK is re-entrant, you need to use `g_idle_add()` to
>> synchronise any code that is going to call Geany or GTK or Scintilla.
>> ATM I don't think plugins can turn Geany autocomplete off, but it can
>> prompt the user to do so.
>>
>> >
>> > For tags, you do have access to parts of TagManager such as
>> > tm_workspace_add_source_file -- maybe you could use that creatively
>> > somehow.
>>
>> Its possible, however if your plugin has accurate information about
>> what is visible at any point, then you may not want to use tagmanager
>> for autocompletion, but it could be used to display symbols in the
>> symbols pane.  Tagmanager does not know about what is/is not in scope,
>> so using it will therefore lose the accuracy your plugin had.
>>
>
> Tags also used for syntax highlighting, right? By this I want to add more
> accuracy syntax highlighting for D.

Tag highlighting works by providing a list of words from the tags to
Scintilla to highlight, it has no information about the context of the
words, so all Scintilla will do is highlight the word any time it
encounters it.  Thats not very accurate, and would be difficult to
improve without replacing the Scintilla lexer.

Cheers
Lex

>
>>
>> >
>> > And of course you can have a custom "Go to D Symbol Definition" command.
>>
>> And keybinding.
>>
>> Cheers
>> Lex
>> >
>> > --
>> > Vasiliy
>> > ___
>> > Devel mailing list
>> > Devel@lists.geany.org
>> > https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>> ___
>> Devel mailing list
>> Devel@lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
>
>
> ___
> Devel mailing list
> Devel@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Hooks on calling some functions for plugins?

2017-07-04 Thread Денис Феклушкин
2017-07-04 23:00 GMT+07:00 Vasiliy Faronov :

> Hi Denis,
>
> As far as I understand, none of this is directly supported by Geany right
> now.
>
> This is a known problem: https://github.com/geany/geany/issues/1458
>
> Until it is solved systematically (if ever), you might be able to hack
> around it.
>
I am subscribed to this issue. Thanks!


> For custom autocompletion, see:
> https://github.com/notetau/geany-jedi-complete/tree/
> master/geany-complete-core


It uses same hacks as in my code.


>
>
> For tags, you do have access to parts of TagManager such as
> tm_workspace_add_source_file -- maybe you could use that creatively
> somehow.
>
> And of course you can have a custom "Go to D Symbol Definition" command.
>
>
> --
> Vasiliy
> ___
> Devel mailing list
> Devel@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Hooks on calling some functions for plugins?

2017-07-04 Thread Денис Феклушкин
2017-07-05 8:05 GMT+07:00 Lex Trotman :

> On 5 July 2017 at 02:00, Vasiliy Faronov  wrote:
> > Hi Denis,
> >
> > As far as I understand, none of this is directly supported by Geany
> right now.
> >
> > This is a known problem: https://github.com/geany/geany/issues/1458
> >
> > Until it is solved systematically (if ever), you might be able to hack
> > around it.
>
> Sadly the discussion seems to have hung again.  Maybe it simply isn't
> easily solvable for Geany core.
>
> >
> > For custom autocompletion, see:
> > https://github.com/notetau/geany-jedi-complete/tree/master/
> geany-complete-core
>
> The use of a separate completion popup as used by the above is the
> best current solution, keep asynchronism in the plugin, remember
> neither Geany now GTK is re-entrant, you need to use `g_idle_add()` to
> synchronise any code that is going to call Geany or GTK or Scintilla.
> ATM I don't think plugins can turn Geany autocomplete off, but it can
> prompt the user to do so.
>
> >
> > For tags, you do have access to parts of TagManager such as
> > tm_workspace_add_source_file -- maybe you could use that creatively
> > somehow.
>
> Its possible, however if your plugin has accurate information about
> what is visible at any point, then you may not want to use tagmanager
> for autocompletion, but it could be used to display symbols in the
> symbols pane.  Tagmanager does not know about what is/is not in scope,
> so using it will therefore lose the accuracy your plugin had.
>
>
Tags also used for syntax highlighting, right? By this I want to add more
accuracy syntax highlighting for D.


> >
> > And of course you can have a custom "Go to D Symbol Definition" command.
>
> And keybinding.
>
> Cheers
> Lex
> >
> > --
> > Vasiliy
> > ___
> > Devel mailing list
> > Devel@lists.geany.org
> > https://lists.geany.org/cgi-bin/mailman/listinfo/devel
> ___
> Devel mailing list
> Devel@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Hooks on calling some functions for plugins?

2017-07-04 Thread Lex Trotman
On 5 July 2017 at 02:00, Vasiliy Faronov  wrote:
> Hi Denis,
>
> As far as I understand, none of this is directly supported by Geany right now.
>
> This is a known problem: https://github.com/geany/geany/issues/1458
>
> Until it is solved systematically (if ever), you might be able to hack
> around it.

Sadly the discussion seems to have hung again.  Maybe it simply isn't
easily solvable for Geany core.

>
> For custom autocompletion, see:
> https://github.com/notetau/geany-jedi-complete/tree/master/geany-complete-core

The use of a separate completion popup as used by the above is the
best current solution, keep asynchronism in the plugin, remember
neither Geany now GTK is re-entrant, you need to use `g_idle_add()` to
synchronise any code that is going to call Geany or GTK or Scintilla.
ATM I don't think plugins can turn Geany autocomplete off, but it can
prompt the user to do so.

>
> For tags, you do have access to parts of TagManager such as
> tm_workspace_add_source_file -- maybe you could use that creatively
> somehow.

Its possible, however if your plugin has accurate information about
what is visible at any point, then you may not want to use tagmanager
for autocompletion, but it could be used to display symbols in the
symbols pane.  Tagmanager does not know about what is/is not in scope,
so using it will therefore lose the accuracy your plugin had.

>
> And of course you can have a custom "Go to D Symbol Definition" command.

And keybinding.

Cheers
Lex
>
> --
> Vasiliy
> ___
> Devel mailing list
> Devel@lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


Re: [Geany-Devel] Hooks on calling some functions for plugins?

2017-07-04 Thread Vasiliy Faronov
Hi Denis,

As far as I understand, none of this is directly supported by Geany right now.

This is a known problem: https://github.com/geany/geany/issues/1458

Until it is solved systematically (if ever), you might be able to hack
around it.

For custom autocompletion, see:
https://github.com/notetau/geany-jedi-complete/tree/master/geany-complete-core

For tags, you do have access to parts of TagManager such as
tm_workspace_add_source_file -- maybe you could use that creatively
somehow.

And of course you can have a custom "Go to D Symbol Definition" command.


-- 
Vasiliy
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel


[Geany-Devel] Hooks on calling some functions for plugins?

2017-07-03 Thread Денис Феклушкин
Hi!

I am writing D language plugin on D:
https://github.com/denizzzka/geany_dlang

This plugin isn't adds any new functionality but I planning replace already
implemented Geany functionality.

Especially, it will replace autocomplete list, tips list, symbol searching,
syntax highlighting by same D's infrastructural libraries calls.

Questions: It is possible to...

... intercept some Geany to Scintillia messages by a plugin?
(SCI_AUTOCSHOW, SCI_CALLTIPSHOW)

... replace call "Go to Symbol Definition"?

... fill out ctags info from external library instead of internal functions?

Thanks!
___
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel