Closed Alexey-T closed 3 years ago
Wiki info on this https://wiki.lazarus.freepascal.org/CudaText_API#How_plugin_can_fill_code-tree
I don't think you can use tree-helper API here, so you need the wiki info.
Tree-helper API - https://wiki.lazarus.freepascal.org/CudaText_API#TreeHelpers
If I understand correctly, the only problem with tree helpers that I see - I can only know: is currently running lsp-servers support this functionalty -- so I can't list supported lexers in 'install.inf'
Is there some workaround for this, or should I use code-tree directly?
I don't see the workaround so you have to fill code-tree as here- https://wiki.lazarus.freepascal.org/CudaText_API#How_plugin_can_fill_code-tree
Well, it works:
Now I would like to clarify a few things...
From the item-types that server can give me, these I ignore:
PROPERTY FIELD VARIABLE CONSTANT STRING NUMBER BOOLEAN ARRAY OBJECT KEY NULL ENUMMEMBER EVENT OPERATOR TYPEPARAMETER
and these I put in the tree, correct?
FILE MODULE NAMESPACE PACKAGE CLASS METHOD CONSTRUCTOR ENUM INTERFACE FUNCTION STRUCT
Should this feature be enabled by default? And a global+server options to disable? Or maybe only for some lexers, like if writing cuda-lexer is too difficult?
and these I put in the tree, correct?
IMO an option (per server) will be good here (comma-separated str / list of str)
Should this feature be enabled by default?
no! off by default. it gives the slowdown. option per-server will be ok.
Added. Off by default, and symbol kinds to show are configured via an option.
Great, thanks, and readme is updated too - good.
https://github.com/Alexey-T/CudaText/issues/3369#issuecomment-841801712