sbt: add sbt configuration
This commit is contained in:
parent
531719b8f1
commit
9cba809041
@ -13,22 +13,25 @@ backup_existing() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Create required directories before making links
|
# Create required directories before making links
|
||||||
mkdir -p "$HOME/.config"
|
mkdir -p "$HOME/.config/sbt"
|
||||||
|
|
||||||
# Backup configs that are not already symlinked
|
# Backup configs that are not already symlinked
|
||||||
backup_existing "$HOME/.bashrc"
|
backup_existing "$HOME/.bashrc"
|
||||||
backup_existing "$HOME/.config/fish"
|
backup_existing "$HOME/.config/fish"
|
||||||
|
backup_existing "$HOME/.config/git"
|
||||||
backup_existing "$HOME/.config/kitty"
|
backup_existing "$HOME/.config/kitty"
|
||||||
backup_existing "$HOME/.config/nix"
|
backup_existing "$HOME/.config/nix"
|
||||||
backup_existing "$HOME/.config/nvim"
|
backup_existing "$HOME/.config/nvim"
|
||||||
backup_existing "$HOME/.config/git"
|
backup_existing "$HOME/.config/sbt"
|
||||||
|
|
||||||
# Create symlinks, forcing updates
|
# Create symlinks, forcing updates
|
||||||
ln -fsv "$ROOTDIR/bash/.bashrc" "$HOME/.bashrc" # Bash does not support XDG config
|
ln -fsv "$ROOTDIR/bash/.bashrc" "$HOME/.bashrc" # Bash does not support XDG config
|
||||||
ln -fsv "$ROOTDIR/fish" "$HOME/.config"
|
ln -fsv "$ROOTDIR/fish" "$HOME/.config"
|
||||||
|
ln -fsv "$ROOTDIR/git" "$HOME/.config"
|
||||||
ln -fsv "$ROOTDIR/kitty" "$HOME/.config"
|
ln -fsv "$ROOTDIR/kitty" "$HOME/.config"
|
||||||
ln -fsv "$ROOTDIR/nix" "$HOME/.config"
|
ln -fsv "$ROOTDIR/nix" "$HOME/.config"
|
||||||
ln -fsv "$ROOTDIR/nvim" "$HOME/.config"
|
ln -fsv "$ROOTDIR/nvim" "$HOME/.config"
|
||||||
ln -fsv "$ROOTDIR/git" "$HOME/.config"
|
ln -fsv "$ROOTDIR/sbt/settings" "$HOME/.config/sbt"
|
||||||
|
ln -fsv "$ROOTDIR/sbt/plugins" "$HOME/.config/sbt"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
2
sbt/plugins/.gitignore
vendored
Normal file
2
sbt/plugins/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/project/
|
||||||
|
/target/
|
1
sbt/plugins/plugins.sbt
Normal file
1
sbt/plugins/plugins.sbt
Normal file
@ -0,0 +1 @@
|
|||||||
|
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.2")
|
11
sbt/settings/aliases.sbt
Normal file
11
sbt/settings/aliases.sbt
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
addCommandAlias("ls", "projects")
|
||||||
|
addCommandAlias("cd", "project")
|
||||||
|
addCommandAlias("c", "compile")
|
||||||
|
addCommandAlias("tc", "Test/compile")
|
||||||
|
addCommandAlias("to", "Test/testOnly")
|
||||||
|
addCommandAlias("tt", "Test/test")
|
||||||
|
addCommandAlias("itc", "IntegrationTest/compile")
|
||||||
|
addCommandAlias("ito", "IntegrationTest/testOnly")
|
||||||
|
addCommandAlias("itt", "IntegrationTest/test")
|
||||||
|
addCommandAlias("up", "update")
|
||||||
|
addCommandAlias("dup", "dependencyUpdates")
|
10
sbt/settings/prompt.sbt
Normal file
10
sbt/settings/prompt.sbt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import scala.sys.process._
|
||||||
|
|
||||||
|
shellPrompt := { state =>
|
||||||
|
val extracted = Project.extract(state)
|
||||||
|
val projectId = (extracted.currentRef / name).get(extracted.structure.data).getOrElse(extracted.currentProject.id)
|
||||||
|
val gitBranch = Seq("git", "branch", "--show-current").!!.trim
|
||||||
|
val projectIdSegment = Def.withColor(projectId, Option(scala.Console.CYAN), useColor = true)
|
||||||
|
val gitBranchSegment = Def.withColor(gitBranch, Option(scala.Console.YELLOW), useColor = true)
|
||||||
|
s"[$projectIdSegment $gitBranchSegment]> "
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user