@@ -478,36 +478,6 @@ local BisectDetailsSection = Component.new(function(props)
478
478
})
479
479
end )
480
480
481
- local SectionItemTodo = Component .new (function (item )
482
- local function present_item (item )
483
- return row ({
484
- text .highlight (item .highlight )(item .kind ),
485
- text (" " ),
486
- text (item .message ),
487
- }, {
488
- yankable = (" %s:%d" ):format (item .path , item .line ),
489
- item = {
490
- goto_path = item .path ,
491
- goto_cursor = { item .line , item .column },
492
- },
493
- })
494
- end
495
-
496
- local grouped_items = map (item , present_item )
497
- table.insert (
498
- grouped_items ,
499
- 1 ,
500
- row {
501
- text (item [1 ].path ),
502
- text .highlight (" NeogitObjectId" )(" (" ),
503
- text .highlight (" NeogitObjectId" )(# item ),
504
- text .highlight (" NeogitObjectId" )(" )" )
505
- }
506
- )
507
-
508
- return col .tag (" Section" )(grouped_items , { foldable = true , folded = true })
509
- end )
510
-
511
481
function M .Status (state , config )
512
482
-- stylua: ignore start
513
483
local show_hint = not config .disable_hint
@@ -567,9 +537,6 @@ function M.Status(state, config)
567
537
local show_recent = # state .recent .items > 0
568
538
and not config .sections .recent .hidden
569
539
570
- local show_todos = vim .fn .executable (" rg" ) == 1
571
- and not config .sections .todo .hidden
572
-
573
540
return {
574
541
List {
575
542
items = {
@@ -767,38 +734,6 @@ function M.Status(state, config)
767
734
folded = config .sections .unpulled_pushRemote .folded ,
768
735
name = " pushRemote_unpulled" ,
769
736
},
770
- Section {
771
- visible = show_todos ,
772
- title = SectionTitle { title = " TODOs" , highlight = " NeogitRecentcommits" },
773
- render = SectionItemTodo ,
774
- folded = true ,
775
- name = " todos_plugin" ,
776
- items = function ()
777
- local Collection = require (" neogit.lib.collection" )
778
-
779
- local kinds = table.concat (vim .tbl_keys (config .sections .todo .keywords ), " |" )
780
- local items = vim .system (
781
- { " rg" , " (" .. kinds .. " ): " , " --vimgrep" , " --sortr=path" },
782
- { text = true }
783
- ):wait ()
784
-
785
- items = filter_map (vim .split (items .stdout , " \n " ), function (line )
786
- local path , linenr , column , kind , msg = line :match (" ^([^:]+):(%d+):(%d+):.- (%w+): (.+)$" )
787
- if path then
788
- return {
789
- path = path ,
790
- line = linenr ,
791
- column = column ,
792
- message = msg ,
793
- kind = kind ,
794
- highlight = config .sections .todo .keywords [kind ]
795
- }
796
- end
797
- end )
798
-
799
- return Collection .new (items ):group_by (" path" )
800
- end
801
- }
802
737
},
803
738
},
804
739
}
0 commit comments