Open pakanek opened 1 month ago
Does this only happen in VIM mode or non-VIM mode as well?
The indentation behavior is handled by the bundled haskell zed extension:
Specifically there's a tree-sitter definition inside extensions/haskell/languages/haskell/indents.scm
which may need to be updated/improved to handle this.
Not sure what should be the default binding for editor::NewlineAbove
(Super + Shift + Enter isn't doing it). I turned off vim mode and added this to keymap.json
[
{
"context": "Editor",
"bindings": {
"ctrl-o": "editor::NewlineAbove"
}
}
]
Ctrl-o
now adds new line without indenting line below it, so it only happens in Vim mode.
Check for existing issues
Describe the bug / provide steps to reproduce it
With Haskell extension and Vim mode, if I add new line above definition, while there is another definition above, editor will indent line bellow added line.
Haskell uses indentation for code blocks like Python so this is very undesirable.
Environment
Zed: v0.143.7 (Zed) OS: Linux Wayland fedora 40 Memory: 30.5 GiB Architecture: x86_64
If applicable, add mockups / screenshots to help explain present your vision of the feature
Place cursor on line
g :: Int
and press O to insert new line above (Vim mode). Result isLine with
g :: Int
is indented.If applicable, attach your Zed.log file to this issue.
Zed.log