Setup Neovim yamllint the same way as xmllint

Do not install globally.
Provide configuration at expected location as default / fallback.
This commit is contained in:
Daniel Siepmann 2022-04-14 14:31:19 +02:00
parent bbea479930
commit 048c0df915
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
3 changed files with 25 additions and 1 deletions

View file

@ -67,7 +67,6 @@
pkgs.silver-searcher
pkgs.curl
pkgs.wget
pkgs.yamllint
pkgs.kcachegrind
pkgs.geckodriver
@ -134,6 +133,7 @@
"ctags/config.ctags".source = ./home/files/ctags;
"litecli/config".source = ./home/files/litecli;
"phpactor".source = ./home/files/phpactor;
"yamllint/config".source = ./home/files/yamllint/config;
"tig/config".source = ./home/files/tig;
"cmus/smyckblue.theme".source = ./home/files/cmus/smyckblue.theme;

View file

@ -0,0 +1,23 @@
extends: default
rules:
line-length: disable
document-start: disable
braces:
min-spaces-inside-empty: 0
max-spaces-inside-empty: 0
brackets:
min-spaces-inside-empty: 0
max-spaces-inside-empty: 0
comments:
level: error
min-spaces-from-content: 1
comments-indentation:
level: error
empty-lines:
max: 1
empty-values:
forbid-in-block-mappings: true
forbid-in-flow-mappings: true
indentation:
spaces: 2

View file

@ -321,6 +321,7 @@ in {
# Keep line break as fileContents strips last EOL
+ ''
let g:ale_yaml_yamllint_executable = '${pkgs.yamllint}/bin/yamllint'
let g:ale_xml_xmllint_executable = '${pkgs.libxml2}/bin/xmllint'
let g:ale_gitcommit_gitlint_executable = '${pkgs.gitlint}/bin/gitlint'
let g:ale_nix_statix_check_executable = '${pkgs.statix}/bin/statix'