rename session to persistence

pull/9143/head
Ingrid 10 months ago
parent 1ae19d9171
commit 1e99b62828

@ -1,6 +1,6 @@
pub mod config;
pub mod grammar;
pub mod session;
pub mod persistence;
use helix_stdx::{env::current_working_dir, path};

@ -1,7 +1,7 @@
use arc_swap::{access::Map, ArcSwap};
use futures_util::Stream;
use helix_core::{diagnostic::Severity, pos_at_coords, syntax, Selection};
use helix_loader::session;
use helix_loader::persistence;
use helix_lsp::{
lsp::{self, notification::Notification},
util::lsp_range_to_range,
@ -153,7 +153,7 @@ impl Application {
&config.editor
})),
handlers,
HashMap::from_iter(session::read_file_history().iter().map(|entry| {
HashMap::from_iter(persistence::read_file_history().iter().map(|entry| {
(
entry.path.clone(),
ViewPosition {
@ -169,13 +169,13 @@ impl Application {
#[cfg(not(feature = "integration"))]
editor
.registers
.write(':', session::read_command_history())
.write(':', persistence::read_command_history())
// TODO: do something about this unwrap
.unwrap();
#[cfg(not(feature = "integration"))]
editor
.registers
.write('/', session::read_search_history())
.write('/', persistence::read_search_history())
// TODO: do something about this unwrap
.unwrap();

@ -2,7 +2,7 @@ use crate::compositor::{Component, Compositor, Context, Event, EventResult};
use crate::{alt, ctrl, key, shift, ui};
use arc_swap::ArcSwap;
use helix_core::syntax;
use helix_loader::session;
use helix_loader::persistence;
use helix_view::document::Mode;
use helix_view::input::KeyEvent;
use helix_view::keyboard::KeyCode;
@ -616,7 +616,7 @@ impl Component for Prompt {
cx.editor.set_error(err.to_string());
}
#[cfg(not(feature = "integration"))]
session::push_reg_history(register, &self.line);
persistence::push_reg_history(register, &self.line);
};
}

@ -13,7 +13,7 @@ use crate::{
Document, DocumentId, View, ViewId,
};
use dap::StackFrame;
use helix_loader::session::{push_file_history, FileHistoryEntry};
use helix_loader::persistence::{push_file_history, FileHistoryEntry};
use helix_vcs::DiffProviderRegistry;
use futures_util::stream::select_all::SelectAll;

Loading…
Cancel
Save