rikvdkleij / intellij-haskell

IntelliJ plugin for Haskell
https://rikvdkleij.github.io/intellij-haskell/
Apache License 2.0
1.32k stars 94 forks source link

Syntax check must treat dot and apostrophe as delimiters #410

Open develop7 opened 5 years ago

develop7 commented 5 years ago

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.

rikvdkleij commented 5 years ago

Can you explain more?

rikvdkleij commented 5 years ago

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

rikvdkleij commented 5 years ago

I do not know where Data.IO comes from.

rikvdkleij commented 5 years ago

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

develop7 commented 5 years ago

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

rikvdkleij commented 5 years ago

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

develop7 commented 5 years ago

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?

rikvdkleij commented 5 years ago

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 commented 5 years ago

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

develop7 commented 5 years ago

Still an issue?

yes

Did you create a Jetbrains IntelliJ issue?

nope, sorry

rikvdkleij commented 4 years ago

@develop7 Can we close this issue?

develop7 commented 4 years ago

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

rikvdkleij commented 4 years ago

@develop7 Thanks for your feedback!

Didn't you are also a Scala developer 😉

develop7 commented 4 years ago

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 commented 4 years ago

Didn't you are also a Scala developer

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

rikvdkleij commented 4 years ago

@develop7 Thanks!

develop7 commented 2 years ago

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