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

Post Reply
w3mbox2
Posts: 8
Joined: 17.11.2023 10:09

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

Post 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.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

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

Post 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
w3mbox2
Posts: 8
Joined: 17.11.2023 10:09

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

Post 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.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

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

Post by main Alexey »

yes, code-tree finds classes/functions but app does not offer them for auto-completion. they are not connected.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

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

Post 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.
w3mbox2
Posts: 8
Joined: 17.11.2023 10:09

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

Post 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.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

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

Post 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.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

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

Post 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).
Post Reply