LnL7 / vim-nix

Vim configuration files for Nix http://nixos.org/nix
MIT License
287 stars 26 forks source link

Update nix.vim #25

Closed SRGOM closed 5 years ago

SRGOM commented 5 years ago

I removed the custom formatting- it's never included in file type plugins. Seeing as yours is a super popular plugin, I figured you wouldn't mind me changing this. Thanks.

LnL7 commented 5 years ago

I'm not sure what the problem is, it's the indentation from the nix styleguide. And it's pretty common for lanuage plugins to set this by default, it's not global.

Use 2 spaces of indentation per indentation level in Nix expressions, 4 spaces in shell scripts.

SRGOM commented 5 years ago

Thanks for considering my pull request. Would you be open to me adding the g:nix_recommended_style if check around the expand tab code, how python and ruby have done it?

You're right about Nix recommending it, of course.

LnL7 commented 5 years ago

Yeah, I don't understand the usecase but adding an option to disable it would be fine.

SRGOM commented 5 years ago

Thanks, let me know what you think.

SRGOM commented 5 years ago

Thank you, I've made the recommended changes. Please let me know if there is anything else needed.

LnL7 commented 5 years ago

That's perfect, Thanks!

SRGOM commented 5 years ago

Thank you for the review.

asymmetric commented 4 years ago

AFAIU, this is not set by default to 1, right? So the recommended style is opt-in, correct?

The Python plugin, for reference, checks whether the variable is defined.