intellij-haskell icon indicating copy to clipboard operation
intellij-haskell copied to clipboard

Syntax check must treat dot and apostrophe as delimiters

Open develop7 opened this issue 6 years ago • 17 comments

image

Same goes for foo'barBazQux — the foo'bar part gets underlined, the BazQux is not.

Expected: Data.IO syntax should be checked as two words, Data and IO. In case of foo'bar, it should be treated as foo and bar.

The issue reproduction rate is not 100%, sadly.

develop7 avatar Apr 03 '19 17:04 develop7

Can you explain more?

rikvdkleij avatar Apr 03 '19 17:04 rikvdkleij

The PSI-tree of import Data.IORef is correct.

rikvdkleij avatar Apr 03 '19 17:04 rikvdkleij

I do not know where Data.IO comes from.

rikvdkleij avatar Apr 03 '19 17:04 rikvdkleij

Seems that the spellchecker is using camel case to parse the text. I always disable the spellchecker for code and literals.

rikvdkleij avatar Apr 03 '19 17:04 rikvdkleij

Can you explain more?

Updated issue description

The PSI-tree … is correct

it is to me as well! Crazy, right?

I always disable the spellchecker for code and literals.

well, I don't as I've actually found it quite useful

develop7 avatar Apr 03 '19 17:04 develop7

There is also some hidden Java identifier "logic" hidden in IntelliJ where I do not get rid of.

I already spend so/too much time on it. See e.g. https://youtrack.jetbrains.com/issue/IDEA-204576

rikvdkleij avatar Apr 03 '19 17:04 rikvdkleij

Oh, so it's the upstream issue, got it. Totes fine. Thank you for your work.

Anyway let's leave this issue written down here for the bookkeeping purposes. Also, since this issue doesn't seem to be duplicate of https://youtrack.jetbrains.com/issue/IDEA-204576, do you want me to mirror this one for them?

develop7 avatar Apr 03 '19 18:04 develop7

Also, since this issue doesn't seem to be duplicate of https://youtrack.jetbrains.com/issue/IDEA-204576

Yes, that's right.

do you want me to mirror this one for them?

Yes, maybe they can help. Thanks!

rikvdkleij avatar Apr 03 '19 18:04 rikvdkleij

@develop7 Still an issue? Did you create a Jetbrains IntelliJ issue?

rikvdkleij avatar May 22 '19 13:05 rikvdkleij

Still an issue?

yes

Did you create a Jetbrains IntelliJ issue?

nope, sorry

develop7 avatar May 22 '19 19:05 develop7

@develop7 Can we close this issue?

rikvdkleij avatar Sep 26 '20 13:09 rikvdkleij

@rikvdkleij interestingly enough, the Scala plugin is affected as well. Guess it's really upstream.

develop7 avatar Nov 03 '20 16:11 develop7

@develop7 Thanks for your feedback!

Didn't you are also a Scala developer 😉

rikvdkleij avatar Nov 03 '20 18:11 rikvdkleij

I've filed a follow-up issue at https://youtrack.jetbrains.com/issue/IDEA-254531, feel free to chime in just in case I've missed anything.

develop7 avatar Nov 03 '20 19:11 develop7

Didn't you are also a Scala developer

Since Scala is a requirement to contribute to ij-haskell, I am :)

develop7 avatar Nov 03 '20 19:11 develop7

@develop7 Thanks!

rikvdkleij avatar Nov 03 '20 20:11 rikvdkleij

Now the aforementioned upstream issue got resolved with the following answer:

In case of Haskell and Scala that behavior should be tuned on the language plugin side. There is SpellcheckingStrategy that makes possible introduction of additional splitters of words before spellchecker will see them.

Which puts the ball back to our side

develop7 avatar Nov 16 '21 10:11 develop7