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

Support string literal language injection #358

Merged
merged 5 commits into from Dec 17, 2018
Merged

Conversation

@ice1000
Copy link
Contributor

@ice1000 ice1000 commented Dec 14, 2018

And fix #272 by the way.

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 14, 2018

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 15, 2018

DO NOT MERGE.
Some local changes cannot be pushed due to my PC's internet connection problem.
Please wait patiently.

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 17, 2018

It's working now. Feel free to merge.

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 17, 2018

@ice1000 ice1000 force-pushed the ice1k:lang-inj branch from e0f64f5 to fc37e2c Dec 17, 2018
@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 17, 2018

Rebased on master/

@rikvdkleij rikvdkleij merged commit 8880f7c into rikvdkleij:master Dec 17, 2018
@rikvdkleij
Copy link
Owner

@rikvdkleij rikvdkleij commented Dec 17, 2018

Thanks!

@rikvdkleij
Copy link
Owner

@rikvdkleij rikvdkleij commented Dec 17, 2018

@ice1000 I see that #272 is fixed but what else gives this change as feature to the user?

@ice1000 ice1000 deleted the ice1k:lang-inj branch Dec 18, 2018
@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 18, 2018

screen

Do you like what you see?

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 18, 2018

I've just found a bug. Will fix tonight

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 18, 2018

screen

Demonstration of the bug

@rikvdkleij
Copy link
Owner

@rikvdkleij rikvdkleij commented Dec 18, 2018

Do you like what you see?

Really cool! Does it also work for SQL (with code completion of table and field names)?

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 18, 2018

Does it also work for SQL

Yes

with code completion of table and field names

No :(

@rikvdkleij
Copy link
Owner

@rikvdkleij rikvdkleij commented Dec 31, 2018

It looks like this change broke the feature that inserts automatically closing " after entering starting ".

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Dec 31, 2018

How?
Is there some old codes about that feature? I may take a look.

@rikvdkleij
Copy link
Owner

@rikvdkleij rikvdkleij commented Dec 31, 2018

The implementation is minimal, see HaskellQuoteHandler. I already added HS_TEXT_LITERAL but that does not help.

@rikvdkleij
Copy link
Owner

@rikvdkleij rikvdkleij commented Dec 31, 2018

Btw, I checked out revision before this change and there it still works.

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Jan 4, 2019

  public SimpleTokenSetQuoteHandler(IElementType... _literalTokens) {
    this(TokenSet.create(_literalTokens));
  }

You can see that it only accepts tokens, not Psi element types.
I'll investigate later

@rikvdkleij
Copy link
Owner

@rikvdkleij rikvdkleij commented Jan 4, 2019

You can see that it only accepts tokens, not Psi element types

You mean that the String Literal Injection feature changed the "behavior" of " so it's not a token anymore at that location?

@ice1000
Copy link
Contributor Author

@ice1000 ice1000 commented Jan 4, 2019

No, I still don't know why is that happening. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants