Skip to content

Commit

Permalink
trigger indent before inserting a newline
Browse files Browse the repository at this point in the history
Fixes NixOS#12
  • Loading branch information
LnL7 committed Apr 30, 2017
1 parent dce0529 commit 867488a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion indent/nix.vim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ endif
let b:did_indent = 1

setlocal indentexpr=GetNixIndent()
setlocal indentkeys+=0=then,0=else,0=in
setlocal indentkeys+=0=then,0=else,0=inherit,*<Return>

if exists("*GetNixIndent")
finish
Expand Down
2 changes: 1 addition & 1 deletion syntax/nix.vim
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ syn region nixAttributeAssignment start="=" end="\ze;" contained contains=@nixEx
syn region nixAttributeDefinition start=/\ze[a-zA-Z_"$]/ end=";" contained contains=nixComment,nixAttribute,nixInterpolation,nixSimpleString,nixAttributeDot,nixAttributeAssignment

syn region nixInheritAttributeScope start="(" end=")" contained contains=nixComment,nixAttributeDot
syn region nixAttributeDefinition matchgroup=nixInherit start="\<inherit\>" matchgroup=NONE end=";" contained contains=nixComment,nixInheritAttributeScope,nixAttribute
syn region nixAttributeDefinition matchgroup=nixInherit start="\<inherit\>" end=";" contained contains=nixComment,nixInheritAttributeScope,nixAttribute

syn region nixAttributeSet start="{" end="}" contains=nixComment,nixAttributeDefinition

Expand Down

0 comments on commit 867488a

Please sign in to comment.