ITADN

hls-class-plugin ignores indentation of already existing method and always indents by 2

#4935OpenAster89 创建于 2026-05-14
type: bugcomponent: hls-class-plugin
A
Aster89commented
### Your environment Irrelevant to the bug (might be relevant to the solution). Which OS do you use? ArchLinux Which version of GHC do you use and how did you install it? 9.14.1 via ghcup How is your project built (alternative: link to the project)? not relevant Which LSP client (editor/plugin) do you use? YCM in Vim Which version of HLS do you use and how did you install it? 2.13 via GHCup Have you configured HLS in any way (especially: a `hie.yaml` file)? ### Steps to reproduce Ask HLS to add missing methods to the `instance Applicative` below ```haskell instance Functor Foo where instance Applicative Foo where pure = undefined ``` ### Expected behaviour ```haskell instance Functor Foo where instance Applicative Foo where pure = undefined (<*>) = _ ``` ### Actual behaviour ```haskell instance Functor Foo where instance Applicative Foo where pure = undefined (<*>) = _ ``` notice the only 2 spaces of indentation on the last line. ### Debug information irrelevant <!-- Include any useful debug information, such as relevant log snippets. -->
1 条评论