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

Completion not working for attribute value in JSX #70616

Closed
pucelle opened this issue Mar 16, 2019 · 4 comments
Closed

Completion not working for attribute value in JSX #70616

pucelle opened this issue Mar 16, 2019 · 4 comments
Assignees
Labels
extensions Issues concerning extensions info-needed Issue requires more information from poster

Comments

@pucelle
Copy link

pucelle commented Mar 16, 2019

  • VSCode Version: 1.32.3
  • OS Version: Win10 1803

Steps to Reproduce:

I created an extension CSS Navigation these days. When I trying to support class name completion in JSX file (it works well in HTML file), I found it can't work in some places:
<div c[CURSOR] /> - Here, the completion work.
<div className="c[CURSOR]" /> - Here, the completion failed, No request send to language service.

So I want to know if this is an issue, or I have missed some thing in providing completion?

Thanks very much.

Does this issue occur when all extensions are disabled?: No

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 18, 2019

Please share some example code that demonstrates this in an extension

@pucelle
Copy link
Author

pucelle commented Mar 18, 2019

Hi, hmbvz, Thanks for your reply. My extension is here: CSS Navigation

And here is some codes for E2E testing (it's only code pieces):
https://github.com/pucelle/vscode-css-navigation/blob/master/client/test/fixture/index.jsx#L1-L13

You may clone the code of this extension and debug it, or just install the extension, and save the test file into one workspace directory, then try completion, and debug the communication messages between client and language server.

I'm not sure if this is enough for you, if you need more resources, just comment here.

@mjbvz
Copy link
Collaborator

mjbvz commented Mar 18, 2019

Do you see the completions requests being made if you manually trigger intellisense inside the string using ctrl+space? We don't automatically trigger completions inside strings by default. Alternatively, add this to your settings:

	"editor.quickSuggestions": {
		"other": true,
		"comments": false,
		"strings": true
	}

@mjbvz mjbvz added extensions Issues concerning extensions info-needed Issue requires more information from poster labels Mar 18, 2019
@pucelle
Copy link
Author

pucelle commented Mar 18, 2019

Yes, it works, Thanks very much!!!

Otherwise I have some suggestions: I searched about this in Google but I didn't get any helpful answer.
Now I found VSCode document intellisense has some descriptions about quickSuggestions, but mot much. Can it give more details about?

Thanks again.

@pucelle pucelle closed this as completed Mar 18, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators May 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants