koffice: various project updates

wip/yesman
Katharina Fey 3 years ago
parent 5ffd5328db
commit bb5f28a3db
Signed by: kookie
GPG Key ID: 90734A9E619C8A6C
  1. 1
      apps/koffice/.envrc
  2. 0
      apps/koffice/.projectile
  3. 36
      apps/koffice/libko/src/log_util.rs
  4. 1
      apps/koffice/rustfmt.toml
  5. 8
      apps/koffice/shell.nix

@ -0,0 +1 @@
eval "$(lorri direnv)"

@ -0,0 +1,36 @@
#[macro_export]
macro_rules! fatal {
() => {
error!("Unknown failure!");
std::process::exit(2)
};
($($arg:tt)*) => ({
error!($($arg)*);
std::process::exit(2)
})
}
use colored::*;
use env_logger::Builder;
use log::Level;
use std::io::Write;
pub fn initialise() {
let mut b = Builder::from_default_env();
b.format(|buf, record| {
let lvl = record.level().to_string();
write!(
buf,
"[{}]: {}\n",
match record.level() {
Level::Error => lvl.red(),
Level::Warn => lvl.yellow(),
Level::Info => lvl.green(),
Level::Debug => lvl.purple(),
Level::Trace => lvl.cyan(),
},
record.args()
)
})
.init();
}

@ -0,0 +1 @@
inline_attribute_width = 50

@ -0,0 +1,8 @@
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "koffice";
buildInputs = with pkgs; [
rustc cargo rust-analyzer rustfmt clangStdenv
];
}
Loading…
Cancel
Save