Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-view/src/editor.rs')
| -rw-r--r-- | helix-view/src/editor.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index d6efd25f..d9b20012 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -23,6 +23,7 @@ use helix_vcs::DiffProviderRegistry; use futures_util::stream::select_all::SelectAll; use futures_util::{future, StreamExt}; use helix_lsp::{Call, LanguageServerId}; +use parking_lot::RwLock; use tokio_stream::wrappers::UnboundedReceiverStream; use std::{ @@ -51,7 +52,7 @@ use helix_core::{ self, config::{AutoPairConfig, IndentationHeuristic, LanguageServerFeature, SoftWrap}, }, - Change, LineEnding, Position, Range, Selection, Uri, NATIVE_LINE_ENDING, + Change, LineEnding, Position, Range, Selection, SpellingLanguage, Uri, NATIVE_LINE_ENDING, }; use helix_dap as dap; use helix_stdx::path::canonicalize; @@ -1133,8 +1134,12 @@ pub struct Editor { pub mouse_down_range: Option<Range>, pub cursor_cache: CursorCache, + + pub dictionaries: Dictionaries, } +type Dictionaries = HashMap<SpellingLanguage, Arc<RwLock<spellbook::Dictionary>>>; + pub type Motion = Box<dyn Fn(&mut Editor)>; #[derive(Debug)] @@ -1255,6 +1260,7 @@ impl Editor { handlers, mouse_down_range: None, cursor_cache: CursorCache::default(), + dictionaries: HashMap::new(), } } |