fish: functions: Execute fast-tags only if in a git project
In neovim, we run this after saving a file. However, when opening a Haskell file which is outside of a project or in a directory which has all other Haskell code, it would generate tags for every project in this directory blocking neovim in the mean time.
This commit is contained in:
parent
b2e66cbff4
commit
f3593d60d1
1 changed files with 6 additions and 4 deletions
|
@ -1,7 +1,9 @@
|
||||||
function fasttags --description "Generate tags for Haskell project"
|
function fasttags --description "Generate tags for Haskell project"
|
||||||
if not test -e tags
|
if test -d .git
|
||||||
fast-tags --fully-qualified -R .
|
if not test -e tags
|
||||||
else
|
fast-tags --fully-qualified -R .
|
||||||
fast-tags --fully-qualified -R $argv
|
else
|
||||||
|
fast-tags --fully-qualified -R $argv
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue