[Geany-Devel] Hooks on calling some functions for plugins?
elextr at xxxxx
Wed Jul 5 07:03:19 UTC 2017
On 5 July 2017 at 16:15, Денис Феклушкин <feklushkin.denis at gmail.com> wrote:
> 2017-07-05 8:05 GMT+07:00 Lex Trotman <elextr at gmail.com>:
>> On 5 July 2017 at 02:00, Vasiliy Faronov <vfaronov at gmail.com> 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.
>> > And of course you can have a custom "Go to D Symbol Definition" command.
>> And keybinding.
>> > --
>> > Vasiliy
>> > _______________________________________________
>> > Devel mailing list
>> > Devel at lists.geany.org
>> > https://lists.geany.org/cgi-bin/mailman/listinfo/devel
>> Devel mailing list
>> Devel at lists.geany.org
> Devel mailing list
> Devel at lists.geany.org
More information about the Devel