reorganisation and cleanup
This commit is contained in:
parent
b6a4c04a25
commit
f6cc725850
@ -11,8 +11,5 @@ include = ["src/*.rs", "Cargo.toml"]
|
|||||||
categories = ["text-editors"]
|
categories = ["text-editors"]
|
||||||
keywords = ["text-editor", "editor", "terminal", "tui"]
|
keywords = ["text-editor", "editor", "terminal", "tui"]
|
||||||
|
|
||||||
[profile.release]
|
|
||||||
panic = abort
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
crossterm = "0.25"
|
crossterm = "0.25"
|
||||||
|
2
TODO.md
2
TODO.md
@ -1,2 +1,2 @@
|
|||||||
- [ ] Make components (i.e statusbar) modular
|
|
||||||
- [ ] Modularise functions
|
- [ ] Modularise functions
|
||||||
|
- [ ] Make components (i.e statusbar) modular
|
||||||
|
1
src/core/mod.rs
Normal file
1
src/core/mod.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
pub mod editor;
|
@ -1,9 +1,8 @@
|
|||||||
mod editor;
|
mod core;
|
||||||
mod terminal;
|
mod terminal;
|
||||||
mod tui;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let lambda = editor::Editor::new();
|
let lambda = core::editor::Editor::new();
|
||||||
let mut screen = terminal::Screen::new().unwrap();
|
let mut screen = terminal::screen::Screen::new().unwrap();
|
||||||
tui::start(&mut screen, lambda);
|
terminal::tui::start(&mut screen, lambda);
|
||||||
}
|
}
|
||||||
|
2
src/terminal/mod.rs
Normal file
2
src/terminal/mod.rs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
pub mod screen;
|
||||||
|
pub mod tui;
|
@ -1,5 +1,5 @@
|
|||||||
use crate::editor::Editor;
|
use crate::core::editor::Editor;
|
||||||
use crate::terminal::{Coords, Screen};
|
use crate::terminal::screen::{Coords, Screen};
|
||||||
use crossterm::style::Stylize;
|
use crossterm::style::Stylize;
|
||||||
use crossterm::event::{read, Event, KeyCode, KeyEvent, KeyModifiers};
|
use crossterm::event::{read, Event, KeyCode, KeyEvent, KeyModifiers};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user