vim-nix
vim-nix copied to clipboard
Lines starting with `#` break indentation
It seems like lines starting with #
(either a nix comment or in a ''double apostrophe''
string, like a shebang for example) reset previous indentation.
{
# bad indentation on this comment will propagate
# to the next lines if typing `=i{`
programs.fish.enable = true;
}
↓ (after typing =i{
)
{
# bad indentation on this comment will propagate
# to the next lines if typing `=i{`
programs.fish.enable = true;
}
This makes it hard to apply the new indentation of a block, when surrounded by new {}
for example.
same issue
I found it was effect by this code;
" Skip indentation for single line comments explicitly, in case a
" comment was just inserted (eg. visual block mode)
if getline(v:lnum) =~ '^\s*#'
return indent(v:lnum)
endif
I 've commented that code , it seems works https://github.com/hitsmaxft/vim-nix/commit/7c5a324c76ce85e1501861adb68756f7966a57f7
Any updates here? Has the fix been merged? I've installed the plugin directly from nix
but I have the same problem.
Ping?