Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autocomplete for labels in custom environments #3620

Open
BerniProgrammer opened this issue Aug 2, 2024 Discussed in #3579 · 0 comments
Open

autocomplete for labels in custom environments #3620

BerniProgrammer opened this issue Aug 2, 2024 Discussed in #3579 · 0 comments
Labels
enhancement New feature or (non bug related) change to the program.

Comments

@BerniProgrammer
Copy link

Discussed in #3579

Originally posted by BerniProgrammer June 11, 2024
I really love this plugin. Keep up the work!

There are only minor flaws that bother me from time to time.

When working with bigger projects I setup some custom environments for listings, that set the caption and label for the listing through parameters of the environement.

Something like this:

\lstnewenvironment{java}[2][]{
    \lstset{
        captionpos=b,
        language=Java,
        % other style attributes
        caption={#1},
        label={#2},
    }
}{}

the use of it would look like this.

image
(I think warning supression for environments is something for another day ^^)

The problem then is, that the label string is not considered for autocompletion.
image

I did not find any documentation that showed a feature for this.
I am aware that it could be very tricky to implement an automated detection for such a feature as the syntax can differ for custom environments.

But I could imagine some sort of comment hint for the plugin when defining a new environment. Or globally for any environment with a given name.
e.g. %lblhint env java #2

All in all this kind of feature could improve the correctness of warnings and errors.

@PHPirates PHPirates added the enhancement New feature or (non bug related) change to the program. label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or (non bug related) change to the program.
Projects
None yet
Development

No branches or pull requests

2 participants