Page 1 of 1

How to include user defined classes/methods/fields in auto-complete ?

Posted: 17.11.2023 13:18
by w3mbox2
How can I configure the auto-complete functionality to include also the classes/methods/fields seen in the file/project ?

I want to see not just the programming language default classes/methods/fields but also those that I have created in my source code files.

This question is specifically in the context of Java programming.

Thank you.

Re: How to include user defined classes/methods/fields in auto-complete ?

Posted: 17.11.2023 13:21
by main Alexey
This is the work for intelliSense, ie LSP plugin (or similar plugin, but nowdays LSP is the main+preferred method).
with Python 3.4, try to use 'LSP Client' plugin. I did not test LSP on Python 3.4 on Windows XP.

Wiki:
see 'LSP server for Java' on https://wiki.freepascal.org/CudaText_plugins

Re: How to include user defined classes/methods/fields in auto-complete ?

Posted: 17.11.2023 13:49
by w3mbox2
You mean that CudaText is able to construct a very good Code Tree with all classes/methods seen in my source code files but I have to install a plugin to see these same classes/methods listed in the auto-complete list ? I am puzzled.

Re: How to include user defined classes/methods/fields in auto-complete ?

Posted: 17.11.2023 14:20
by main Alexey
yes, code-tree finds classes/functions but app does not offer them for auto-completion. they are not connected.

Re: How to include user defined classes/methods/fields in auto-complete ?

Posted: 17.11.2023 14:22
by main Alexey
app does not know which 'function' belongs to which 'class', even if it can show the code-tree. sorry.

future plugin is possible to do this (show autocompletion items from code-tree).
but not sure here.
e.g. this preudo code

Code: Select all

  var_name: Class1;
  ...
  var_name.<caret>
at the <caret> position I call autocompletion. how app knows that var_name belongs to Class1? it's not simple. so app cannot show methods of Class1.

Re: How to include user defined classes/methods/fields in auto-complete ?

Posted: 17.11.2023 15:19
by w3mbox2
As a programmer myself I cannot understand how an application can generate data/information that it cannot use to provide related functionality.

As a software user I become annoyed when an application requires plugins for the most basic functionality, specially when other similar applications can provide such basic functionality by default.

Food for thought.

Re: How to include user defined classes/methods/fields in auto-complete ?

Posted: 17.11.2023 15:21
by main Alexey
maybe other editors use the CTags system: they can give the auto-completion result from it. this editor don't use CTags.

Re: How to include user defined classes/methods/fields in auto-complete ?

Posted: 18.11.2023 19:35
by main Alexey
I remembered now the partly solution for this case: plugin 'Complete From Text'. it will suggest all id's found in the code.

2nd variant: plugin 'Intext Complete' (analog to 1st).