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

Unwanted autocompletion #668

Closed
DaWolfi opened this issue Feb 24, 2022 · 15 comments · Fixed by eclipse-lemminx/lemminx#1293 · May be fixed by #670
Closed

Unwanted autocompletion #668

DaWolfi opened this issue Feb 24, 2022 · 15 comments · Fixed by eclipse-lemminx/lemminx#1293 · May be fixed by #670
Assignees
Labels
bug Something isn't working completion

Comments

@DaWolfi
Copy link

DaWolfi commented Feb 24, 2022

Every time I start typing in an empty string or at the end of a string, an autocompletion window opens with filenames of the directory, which contains the file in use:

image

If I disable the XML extension this autocompletion doesn't show up any more.

Can anybody please help me to disable this "feature"!

Version: 1.65.0-insider (user setup)

@angelozerr
Copy link
Contributor

Its not possible to disable it. We need to provide a settings for that like xml.completion.fileSupport

@fbricon what do you think about that?

@fbricon
Copy link
Collaborator

fbricon commented Feb 25, 2022

Agree, we need a setting

@angelozerr
Copy link
Contributor

What about xml.completion.fileSupport.enabled?

@AlexXuChen are you interested to work on this issue?

@DaWolfi
Copy link
Author

DaWolfi commented Feb 25, 2022

Thanks for your quick support guys, great extension!

@AlexXuChen
Copy link
Contributor

@fbricon What should the default behaviour be for this setting?

@fbricon
Copy link
Collaborator

fbricon commented Feb 28, 2022

I'd say it could support boolean (true by default) and file glob patterns.

@fbricon
Copy link
Collaborator

fbricon commented Feb 28, 2022

@DaWolfi I don't understand how you get file name completion though, from your picture. It should only kick in if you start the attribute value with / or \ or .

@angelozerr
Copy link
Contributor

Instead of having only glob patterns I think we should have xpath too exactly like we have for symbole filters.

All mechanism already exists (perhaps with some refactoring)

@angelozerr
Copy link
Contributor

With xpath I mean we could write @path to allow file completion for path attribute

@DaWolfi
Copy link
Author

DaWolfi commented Feb 28, 2022

@DaWolfi I don't understand how you get file name completion though, from your picture. It should only kick in if you start the attribute value with / or \ or .

@fbricon : I also thought that it should work this way, because I used a path autocompletion extension before. But even though I disabled all other extensions, the result is always the same.

@fbricon
Copy link
Collaborator

fbricon commented Feb 28, 2022

@DaWolfi can you set the "xml.trace.server" preference to "verbose" and give us the logs from the "XML Support" Output channel, from startup to file name completion?

@DaWolfi
Copy link
Author

DaWolfi commented Feb 28, 2022

Trace.log

Here you are...

@DaWolfi
Copy link
Author

DaWolfi commented Jul 11, 2022

Hi guys, any news about this issue?

@angelozerr
Copy link
Contributor

No sorry we had.no time to work on that. I know this completion file feature is annoting for camel //cc @apupier

We need to filter this file completion with a new completion file filtrer wherr we can write some xpath like we have with symbol filter. We could define a default value to allow some attributs like @path @file

@datho7561
Copy link
Contributor

@DaWolfi I don't understand how you get file name completion though, from your picture. It should only kick in if you start the attribute value with / or \ or .

If you manually trigger completion in an attribute value that has non-empty content, file names are suggested for completion. None of these suggestions work, since the completion item doesn't replace the text you've already entered. I'll look into addressing two things

  • Don't suggest path names unless the string starts with a / or a ./ or a [A-Z]:\\ or a .\\
  • Make sure the path autocompletions replace the entire attribute value when you accept them

Instead of having only glob patterns I think we should have xpath too exactly like we have for symbole filters.

I honestly don't think this is worth the while if all we need to do is fix the existing behaviour of path completion suggestions.

@datho7561 datho7561 assigned datho7561 and unassigned AlexXuChen Sep 14, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Sep 14, 2022
@fbricon fbricon added bug Something isn't working and removed enhancement New feature or request labels Sep 14, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Sep 15, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Sep 15, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Sep 15, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Sep 15, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Sep 22, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Sep 28, 2022
datho7561 added a commit to datho7561/lemminx that referenced this issue Sep 28, 2022
angelozerr pushed a commit to eclipse-lemminx/lemminx that referenced this issue Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completion
Projects
None yet
6 participants