iquiw / hyai

Haskell Yet Another Indentation
3 stars 2 forks source link

Conflicts with smart parens mode #14

Open s9gf4ult opened 7 years ago

s9gf4ult commented 7 years ago

I am using smartparens mode. When pressing C-right to move parens hyai tries to reindent current line. This does not happen with default haskell-indentation. Is there way to suppress this behaviour?

iquiw commented 7 years ago

I have never used smartparens, will need investigation.

s9gf4ult commented 7 years ago

I suppose it is somehow related with hyai's "auto indentation". When typing fields of record it authomatically reindent current string when , is typed in code like

data Struct = Struct 
  { field1 :: Int 
  ,| -- if cursor is here when you type ","  hyai reindents the line
s9gf4ult commented 7 years ago

If this behaviour can be disabled by customization then it should be customizable.

iquiw commented 7 years ago

I don't see the behavior, maybe combination with some other minor mode?

iquiw commented 7 years ago

haskell-mode disables indent-region-function for the purpose. (https://github.com/haskell/haskell-mode/commit/9e81a0b705425bc8c997fb4ba854660e77a01e40)

I think you can achieve similar by (setq indent-region-function 'ignore), e.g. in haskell-mode-hook.