Skip to content

Commit

Permalink
✨ Lint cucumber files with internal indenter
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhomer committed Dec 26, 2023
1 parent 1f26bc6 commit 1b3f6ed
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion dotfiles/vim/.vim/autoload/my.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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!
Expand Down

0 comments on commit 1b3f6ed

Please sign in to comment.