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

Extend selection by expression #54

Closed
unthingable opened this issue Oct 31, 2016 · 10 comments
Closed

Extend selection by expression #54

unthingable opened this issue Oct 31, 2016 · 10 comments

Comments

@unthingable
Copy link

Currently "Extend selection" functionality is rather naive (selects the whole function). Haskforce (and emacs) do it by selecting the outer expression, this is very useful when looking at expression types.

@rikvdkleij
Copy link
Owner

Good point. I will try to fix that in next beta.

@rikvdkleij
Copy link
Owner

Version 1.0.0.-beta3 supports "Extend selection"

@rikvdkleij rikvdkleij reopened this Nov 8, 2016
@rikvdkleij
Copy link
Owner

Can you check if it works like you expect?

@unthingable
Copy link
Author

Perfect, thanks!

@ice1000
Copy link
Contributor

ice1000 commented Dec 11, 2018

I think current "extend selection" is broken. It's trying to select the AST by hierarchy where intellij-haskell's AST is really a flat token sequence, even with a parenthesis.

@rikvdkleij
Copy link
Owner

Yes, expressions are flat because parser does not take layout into account. That's why we need to improver the parser.

But the current workaround solution works fine for me 😄

@ice1000
Copy link
Contributor

ice1000 commented Dec 11, 2018

What workaround? I didn't see one.

BTW it's not the problem of layout. If you have

f :: (<selection start>a -> b<selection end>) -> c

and you do extend selection, it'll become

f :: (<selection start>a -> b)<selection end> -> c

Which is terrible.

@rikvdkleij
Copy link
Owner

My use case is expressions and for that it works well.

@ice1000
Copy link
Contributor

ice1000 commented Dec 12, 2018

Could you please add parenthesis support for type declarations too?

@rikvdkleij
Copy link
Owner

Yes, can do that.

Btw, it is implemented in HaskellExtendWordSelectioner.

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

No branches or pull requests

3 participants