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

Add support for completion requests from empty character #112

Closed
fbricon opened this issue Sep 10, 2018 · 7 comments
Closed

Add support for completion requests from empty character #112

fbricon opened this issue Sep 10, 2018 · 7 comments
Assignees
Labels
completion This issue or enhancement is related to completion support enhancement New feature or request
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Sep 10, 2018

Given:

<foo>
    <bar>
     // press ctrl-space here
</foo>

There's no completion until I press <. While I understand autocompletion is triggered on <, explicit completion requests (ctrl+space), should also return results from anywhere in the document. In this case, it should return </bar>.

In Eclipse, when explicitely requesting completion from an empty space, you get :
1 - proposition to close the last opened tag
2 - list of all possible tags (i.e existing siblings)

xml-complete

1/ is really important. 2/ we can probably live without for a bit.

@fbricon fbricon added enhancement New feature or request completion This issue or enhancement is related to completion support labels Sep 10, 2018
@angelozerr angelozerr self-assigned this Sep 10, 2018
@angelozerr
Copy link
Contributor

This issue is for several features. Now completion with ctrl+space provides elements:

image

  1. is working only when you are after the start of element

image

  1. starts working

image

@fbricon
Copy link
Contributor Author

fbricon commented Sep 22, 2018

So here's a strange behaviour. Given:

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
		 http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">
         <context-param>
                //ctrl+space here
         </context-param>
</web-app>

Inside <context-param>, ctrl+space gives me 3 results: description, param-name, param-value. After <description></description> is inserted, next ctrl+space after </description> gives me 0 results from the server. I should have at least param-name and param-value

@angelozerr
Copy link
Contributor

So here's a strange behaviour.

I will fix it.

@angelozerr
Copy link
Contributor

@fbricon your problem should be fixed now. The last thing I must support is the close tag.

@angelozerr
Copy link
Contributor

@fbricon I have improved a lot the close tag (works with empty character, indent apply of completion, provide several close tag to close. See the following demo:

closetag

Please closet this issue of it's OK for you.

@fbricon
Copy link
Contributor Author

fbricon commented Oct 9, 2018

Very nice @angelozerr! Me likey

@fbricon fbricon closed this as completed Oct 9, 2018
@angelozerr
Copy link
Contributor

Glad it pleases you @fbricon !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completion This issue or enhancement is related to completion support enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants