purescript-contrib / purescript-vim

Syntax highlighting and indentation for PureScript
BSD 2-Clause "Simplified" License
154 stars 35 forks source link

Words beginning with "in" triggering indentation accidentally #74

Open andys8 opened 4 years ago

andys8 commented 4 years ago

It's somehow hard to come up with a good example, but just playing around in a do block, where let is also used without in, it feels like in triggers indentation accidentally. This is especially the case for words beginning with "in" e.g. intercalate.

It could be an improvement to use in<space> as trigger for indentation and not in.

simplescreenrecorder-2020-10-13_23 43 57

andys8 commented 3 years ago

I see this behavior even with

let g:purescript_disable_indent = 1

or

let g:purescript_indent_in = 0

Is this possible?

Update Okay, It looks like _disable_indent is not released until today. https://github.com/purescript-contrib/purescript-vim/blob/fada016149e37c0d1e0e7c766104867384263b12/CHANGELOG.md

And I'm using https://github.com/sheerun/vim-polyglot

thomashoneyman commented 3 years ago

@vladciobanu Could we release a new version of the library? Looks like there are some nice improvements included in the latest. I can take a look at releasing this if you don't have time.

i-am-the-slime commented 2 years ago

@andys8 Can you help maintain this so we don't all need to use your fork?

andys8 commented 1 year ago

Hey, it's two years later and I'm currently trying to figure out what I did and why :D

The only difference of my fork is: https://github.com/purescript-contrib/purescript-vim/compare/main...andys8:purescript-vim:main

But turns out, I'm not using my fork myself, but instead disabled indentation completely.

https://github.com/andys8/dotfiles/commit/d3de003849308797fc22611dd8de08480342edec

Since you seem to be using the fork: do you think it makes sense to open a pull request for the in commit today?