From f53c9db63d62c75536b43802b1a0efade13a4918 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Tue, 31 Oct 2023 09:13:30 -0700 Subject: [PATCH] yamlfmt --- .config/nvim/fnl/lsp.fnl | 8 ++++++-- .config/yamlfmt/.yamlfmt | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .config/yamlfmt/.yamlfmt diff --git a/.config/nvim/fnl/lsp.fnl b/.config/nvim/fnl/lsp.fnl index 8214614..d0caea0 100644 --- a/.config/nvim/fnl/lsp.fnl +++ b/.config/nvim/fnl/lsp.fnl @@ -97,6 +97,8 @@ (local isort (fmt "isort --quiet --profile black -")) (local python [black isort]) +(local yamlfmt (fmt "yamlfmt -in")) + (setup-lsp :efm {:on_attach on-attach :init_options {:documentFormatting true :hover true @@ -108,13 +110,15 @@ : python :typescript javascript :typescriptreact javascript - :vue [prettier]}} + :vue [prettier] + :yaml [yamlfmt]}} :filetypes [:fennel :javascript :typescript :python :typescriptreact - :vue]}) + :vue + :yaml]}) (setup-lsp :ansiblels) (setup-lsp :elmls) diff --git a/.config/yamlfmt/.yamlfmt b/.config/yamlfmt/.yamlfmt new file mode 100644 index 0000000..ea20490 --- /dev/null +++ b/.config/yamlfmt/.yamlfmt @@ -0,0 +1,2 @@ +formatter: + retain_line_breaks: true