Skip to content

Commit 2cbcf98

Browse files
authored
Interpret flake.lock files as JSON
Nix flakes use lock files named `flake.lock`, which vim currently interprets as a plain text file. This commit adds an auto command that sets the `filetype` of files named `flake.lock` to `json`.
1 parent 63b47b3 commit 2cbcf98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ftdetect/nix.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
" URL: https://github.com/LnL7/vim-nix
55

66
au BufRead,BufNewFile *.nix setf nix
7+
au BufRead,BufNewFile flake.lock setf json

0 commit comments

Comments
 (0)