Skip to content

Commit

Permalink
Remove some TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
archseer committed Jan 23, 2022
1 parent 80e920b commit 7c9ebd0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
13 changes: 0 additions & 13 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,12 @@

- tree sitter:
- markdown
- regex
- kotlin
- clojure
- erlang

- [ ] completion isIncomplete support

1
- [ ] respect view fullscreen flag
- [ ] Implement marks (superset of Selection/Range)

- [ ] = for auto indent line/selection
- [ ] :x for closing buffers
- [ ] lsp: signature help

2
- [ ] macro recording
- [ ] extend selection (treesitter select parent node) (replaces viw, vi(, va( etc )
- [ ] selection align
- [ ] store some state between restarts: file positions, prompt history
- [ ] highlight matched characters in picker

Expand Down
8 changes: 1 addition & 7 deletions helix-core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,14 +665,10 @@ impl Syntax {
layer.depth == depth && // TODO: track parent id instead
layer.config.language == config.language && layer.ranges == ranges
})
.map(|(id, _layer)| {
log::info!("match! {:?}", id);
id
});
.map(|(id, _layer)| id);

// ...or insert a new one.
let layer_id = layer.unwrap_or_else(|| {
log::info!("miss! {:?}", ranges);
self.layers.insert(LanguageLayer {
tree: None,
config,
Expand Down Expand Up @@ -714,7 +710,6 @@ impl Syntax {
.iter()
.filter_map(|(_, layer)| {
// TODO: if range doesn't overlap layer range, skip it
// we can calculate intersection and use it later for set_byte_range

// Reuse a cursor from the pool if available.
let mut cursor = PARSER.with(|ts_parser| {
Expand All @@ -729,7 +724,6 @@ impl Syntax {
unsafe { mem::transmute::<_, &'static mut QueryCursor>(&mut cursor) };

// if reusing cursors & no range this resets to whole range
// TODO: handle intersect (range & layer.range)
cursor_ref.set_byte_range(range.clone().unwrap_or(0..usize::MAX));

let mut captures = cursor_ref
Expand Down

0 comments on commit 7c9ebd0

Please sign in to comment.