feat: add streamd lsp subcommand with LSP server #90

Merged
kfickel merged 12 commits from 89_streamd-lsp-subcommand into main 2026-04-19 21:18:45 +02:00
Showing only changes of commit dbf0808233 - Show all commits

View file

@ -65,7 +65,14 @@ pub fn run(date: Option<String>) -> Result<(), StreamdError> {
Command::new(&editor).arg(file_path).status()?; Command::new(&editor).arg(file_path).status()?;
} else { } else {
let now_local = Utc::now().with_timezone(&tz); let now_local = Utc::now().with_timezone(&tz);
let file_name = now_local.format("%Y%m%d-%H%M%S_daily.md").to_string(); let file_timestamp = if target_date == now_local.date_naive() {
now_local
} else {
tz.from_local_datetime(&NaiveDateTime::new(target_date, NaiveTime::MIN))
.earliest()
.unwrap()
};
let file_name = file_timestamp.format("%Y%m%d-%H%M%S_daily.md").to_string();
let file_path = base_folder.join(&file_name); let file_path = base_folder.join(&file_name);
fs::write(&file_path, "# ")?; fs::write(&file_path, "# ")?;
Command::new(&editor).arg(&file_path).status()?; Command::new(&editor).arg(&file_path).status()?;