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

DTD file completion not detected properly #945

Closed
ejgutierrez74 opened this issue Nov 12, 2023 · 17 comments
Closed

DTD file completion not detected properly #945

ejgutierrez74 opened this issue Nov 12, 2023 · 17 comments
Assignees
Labels
bug Something isn't working completion DTD
Milestone

Comments

@ejgutierrez74
Copy link

I have one file called ( of course in the same directory as xml file) a DTD file called bautistamonicaoriginal.dtd.....In vscode it detects lots of files...except the one i need....

imagen

At the same time you wrote the file name, it appear lots of files....

imagen

imagen

But no one even began with b or ba or bau or baut...and so on....the files which name is helping are far similar to the one i seek

@fbricon
Copy link
Collaborator

fbricon commented Nov 13, 2023

I can reproduce this weird behavior. When completing on <!DOCTYPE foo SYSTEM "|">, it seems it's listing the contents of the parent directory instead of the current one.

@angelozerr
Copy link
Contributor

@ejgutierrez74 if I remember you need to write ./ before, but I agree it is an annoying issue.

@ejgutierrez74
Copy link
Author

ejgutierrez74 commented Nov 15, 2023

@ejgutierrez74 if I remember you need to write ./ before, but I agree it is an annoying issue.

No i dont, im on linux system...in xml copy editor and other like netbeans works ok. I remind that both files are in same directory. I put an Example of changing directory without ./

imagen

Also in vscode when you programming in HTML you put:

<link rel="stylesheet" type="text/css" href="CSS/styles.css" />

supposed you have styles.css in CSS folder...no ./ needed

@fbricon fbricon changed the title DTD file not detected properly DTD file completion not detected properly Nov 15, 2023
@fbricon
Copy link
Collaborator

fbricon commented Nov 15, 2023

The issue is caused by https://github.com/eclipse/lemminx/pull/1293/files

The current file completion has some outstanding issues:

  • it lists files from the parent directory, when requesting completion for something that doesn't start with a files separator
  • it prefixes all results with a /, even when requesting ./something
  • applying completion appends the text to the existing value. eg. if you complete "|./foo.dtd" and select the existing "foo.dtd", the result will be "foo.dtd./foo.dtd"

@ejgutierrez74
Copy link
Author

The issue is caused by https://github.com/eclipse/lemminx/pull/1293/files

The current file completion has some outstanding issues:

* it lists files from the parent directory, when requesting completion for something that doesn't start with a files separator

* it prefixes all results with a /, even when requesting ./something

* applying completion appends the text to the existing value. eg. if you complete "|./foo.dtd" and select the existing "foo.dtd", the result will be "foo.dtd./foo.dtd"

Its then solved the error ? I see amerged code, dont know if its fixed in new release or nightly or prerelease code....Thanks

@angelozerr
Copy link
Contributor

As soon as the issue is not closed it means that it is not fixed.

We need to create a PR. @fbricon have you the intention to fix it?

@ejgutierrez74
Copy link
Author

@fbricon ???

@fbricon
Copy link
Collaborator

fbricon commented Nov 22, 2023

Sorry I'm busy with other tasks so don't expect me to fix it any time soon.

The problem was introduced in eclipse/lemminx#1293. @ejgutierrez74 feel free to open a PR to fix it.

@angelozerr
Copy link
Contributor

Thanks @fbricon for your answer.

I think this file completion must be revisited . I will try to do that to integrate to the next release but I cannot promise you @ejgutierrez74 that I will be able to do that.

@ejgutierrez74
Copy link
Author

Dont promise me, promise to fix it to my students @angelozerr ;)

@angelozerr
Copy link
Contributor

@ejgutierrez74 here a demo with my current work:

DTDFileCompletion

@ejgutierrez74
Copy link
Author

Seems great
Thank you for your effort

@angelozerr angelozerr self-assigned this Nov 29, 2023
@angelozerr angelozerr added this to the 0.27.0 milestone Nov 29, 2023
@angelozerr
Copy link
Contributor

Fixed with eclipse/lemminx#1604

@ejgutierrez74 the DTD file completion should work now. Please install the pre-release (I think it will be available tomorrow) and give us feedback if it is working correctly for you. Thanks!

@ejgutierrez74
Copy link
Author

My tests three or four files, in VsCode in Ubuntu 22.04 seems that work great....
Any ETA when avalaible to general public ?

Thanks for your work.
Didnt test it because we havent arrived to Schema....but should work and detect XSD files....no ??

@angelozerr
Copy link
Contributor

seems that work great.

Nice!

Any ETA when avalaible to general public ?

We will try to create a release next week if we have time.

Thanks for your work.

You are welcome.

but should work and detect XSD files....no ??

Yes it should work.

@ejgutierrez74
Copy link
Author

Any news ??
Happy new year
Seems no new release has been published....

@angelozerr
Copy link
Contributor

Happy new year @ejgutierrez74

We need to find time to create this release, since we are very busy with other projects.

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 DTD
Projects
Archived in project
Development

No branches or pull requests

3 participants