Skip to content

Instantly share code, notes, and snippets.

@yossan
Last active July 6, 2021 12:52
Show Gist options
  • Save yossan/f8df2197ac92856a7dad1760936f20ad to your computer and use it in GitHub Desktop.
Save yossan/f8df2197ac92856a7dad1760936f20ad to your computer and use it in GitHub Desktop.
setup gradle project in vim
aug cargo_project_enter
au!
au VimEnter * if empty($filetype) && !empty(findfile('Cargo.toml')) | call SetupCargo() | endif
aug END
fu! SetupCargo()
echom "detect a cargo project"
setl path+=src/**
endfu
aug project_enter
au!
au VimEnter * if empty($filetype) && !empty(findfile('gradlew')) | call SetupGradle() | endif
aug END
fu! SetupGradle()
echom "detect a gradle project"
setl path+=app/src/main/**
endfu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment