aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/application.rs12
-rw-r--r--helix-term/src/commands.rs13
-rw-r--r--helix-term/src/compositor.rs3
-rw-r--r--helix-term/src/keymap.rs1
-rw-r--r--helix-term/src/ui/editor.rs10
5 files changed, 3 insertions, 36 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index c22cf996..f239a2f0 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -221,15 +221,3 @@ impl Application {
Ok(())
}
}
-
-// TODO: language configs:
-// tabSize, fileExtension etc, mapping to tree sitter parser
-// themes:
-// map tree sitter highlights to color values
-//
-// TODO: expand highlight thing so we're able to render only viewport range
-// TODO: async: maybe pre-cache scopes as empty so we render all graphemes initially as regular
-////text until calc finishes
-// TODO: scope matching: biggest union match? [string] & [html, string], [string, html] & [ string, html]
-// can do this by sorting our theme matches based on array len (longest first) then stopping at the
-// first rule that matches (rule.all(|scope| scopes.contains(scope)))
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 507e5be6..16f43591 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -460,19 +460,6 @@ pub fn select_regex(cx: &mut Context) {
}
pub fn split_selection(cx: &mut Context) {
- // TODO: this needs to store initial selection state, revert on esc, confirm on enter
- // needs to also call the callback function per input change, not just final time.
- // could cheat and put it into completion_fn
- //
- // kakoune does it like this:
- // # save state to register
- // {
- // # restore state from register
- // # if event == abort, return early
- // # add to history if enabled
- // # update state
- // }
-
let prompt = ui::regex_prompt(cx, "split:".to_string(), |doc, regex| {
let text = doc.text().slice(..);
let selection = selection::split_on_matches(text, doc.selection(), &regex);
diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs
index ba8453f3..d7ca6f26 100644
--- a/helix-term/src/compositor.rs
+++ b/helix-term/src/compositor.rs
@@ -54,9 +54,6 @@ pub trait Component {
/// May be used by the parent component to compute the child area.
/// viewport is the maximum allowed area, and the child should stay within those bounds.
fn required_size(&mut self, viewport: (u16, u16)) -> Option<(u16, u16)> {
- // TODO: the compositor should trigger this on push_layer too so that we can use it as an
- // initializer there too.
- //
// TODO: for scrolling, the scroll wrapper should place a size + offset on the Context
// that way render can use it
None
diff --git a/helix-term/src/keymap.rs b/helix-term/src/keymap.rs
index 35b83b1a..67490003 100644
--- a/helix-term/src/keymap.rs
+++ b/helix-term/src/keymap.rs
@@ -90,7 +90,6 @@ use std::collections::HashMap;
// #[cfg(feature = "term")]
pub use crossterm::event::{KeyCode, KeyEvent as Key, KeyModifiers as Modifiers};
-// TODO: could be trie based
pub type Keymap = HashMap<Key, Command>;
pub type Keymaps = HashMap<Mode, Keymap>;
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 31a19649..eb951a26 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -124,6 +124,9 @@ impl EditorView {
use helix_core::graphemes::{grapheme_width, RopeGraphemes};
+ // TODO: scope matching: biggest union match? [string] & [html, string], [string, html] & [ string, html]
+ // can do this by sorting our theme matches based on array len (longest first) then stopping at the
+ // first rule that matches (rule.all(|scope| scopes.contains(scope)))
let style = match spans.first() {
Some(span) => theme.get(theme.scopes()[span.0].as_str()),
None => Style::default().fg(Color::Rgb(164, 160, 232)), // lavender
@@ -138,8 +141,6 @@ impl EditorView {
// iterate over range char by char
for grapheme in RopeGraphemes::new(text) {
- // TODO: track current char_index
-
if grapheme == "\n" {
visual_x = 0;
line += 1;
@@ -433,9 +434,7 @@ impl Component for EditorView {
Event::Key(event) => {
let view = cx.editor.view_mut();
- // TODO: sequences (`gg`)
let mode = view.doc.mode();
- // TODO: handle count other than 1
let mut cxt = commands::Context {
executor: cx.executor,
editor: &mut cx.editor,
@@ -479,8 +478,6 @@ impl Component for EditorView {
if let Some(command) = self.keymap[&mode].get(&event) {
command(&mut cxt);
-
- // TODO: simplistic ensure cursor in view for now
}
}
}
@@ -503,7 +500,6 @@ impl Component for EditorView {
fn render(&self, mut area: Rect, surface: &mut Surface, cx: &mut Context) {
for (view, is_focused) in cx.editor.tree.views() {
- // TODO: use parent area
self.render_view(view, view.area, surface, &cx.editor.theme, is_focused);
}
}