From 1b3f6edf41c5f0d029ca50a75280c329546a24f4 Mon Sep 17 00:00:00 2001 From: Ian Homer Date: Tue, 26 Dec 2023 19:43:46 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Lint=20cucumber=20files=20with=20in?= =?UTF-8?q?ternal=20indenter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dotfiles/vim/.vim/autoload/my.vim | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dotfiles/vim/.vim/autoload/my.vim b/dotfiles/vim/.vim/autoload/my.vim index 07100a92..a94984e8 100644 --- a/dotfiles/vim/.vim/autoload/my.vim +++ b/dotfiles/vim/.vim/autoload/my.vim @@ -24,6 +24,14 @@ function! my#GitSynk(onlyPush) endfunction function my#LintMe() + if &filetype == "cucumber" + " Internal vim indentation formatter best for cucumber linting + normal ma + normal gg=G + normal `a + " then drop through to any other linting + endif + if knobs#("none_ls") let linter="lsp" " Use none_ls for formatting, not tsserver @@ -117,7 +125,7 @@ endfunction function my#EnableAutoSave() augroup MyAutoSave - " Auto write when text changes using debouncing to wait for pause in text + " Auto write when text changes using debouncing to wait for pause in text " entry. If we save too often then tools that watch for change will get too " busy. autocmd TextChangedI,TextChangedP * ++nested silent!