Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lines starting with # break indentation #49

Open
ppom0 opened this issue Jan 5, 2023 · 4 comments
Open

Lines starting with # break indentation #49

ppom0 opened this issue Jan 5, 2023 · 4 comments

Comments

@ppom0
Copy link

ppom0 commented Jan 5, 2023

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.

@qixiang-mft
Copy link

same issue

@hitsmaxft
Copy link

hitsmaxft commented May 25, 2023

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
hitsmaxft@7c5a324

@AgrYpn1a
Copy link

Any updates here? Has the fix been merged? I've installed the plugin directly from nix but I have the same problem.

@bam80
Copy link

bam80 commented Apr 25, 2024

Ping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants