@@ -333,7 +333,6 @@ M.config = function()
333333 lvim .builtin .which_key .mappings [" h" ] = { " <cmd>nohlsearch<CR>" , " No Highlight" }
334334 lvim .builtin .which_key .mappings .g .name = " Git"
335335 if vim .fn .has " nvim-0.10" == 1 then
336-
337336 lvim .builtin .which_key .mappings [" I" ] = { " <cmd>lua require('user.neovim').inlay_hints()<cr>" , " Toggle Inlay" }
338337 end
339338 lvim .builtin .which_key .mappings .l .name = " LSP"
@@ -501,57 +500,47 @@ M.config = function()
501500end
502501
503502M .set_mind_keymaps = function ()
503+ local mind = require " mind"
504504 lvim .builtin .which_key .mappings [" M" ] = {
505505 name = " Mind" ,
506506 c = {
507507 function ()
508- require (" mind" ).wrap_smart_project_tree_fn (function (args )
509- require (" mind.commands" ).create_node_index (
510- args .get_tree (),
511- require (" mind.node" ).MoveDir .INSIDE_END ,
512- args .save_tree ,
513- args .opts
514- )
508+ mind .wrap_smart_project_tree_fn (function (args )
509+ mind .commands .create_node_index (args .get_tree (), mind .node .MoveDir .INSIDE_END , args .save_tree , args .opts )
515510 end )
516511 end ,
517512 " Create node index" ,
518513 },
519514 C = {
520515 function ()
521- require (" mind" ).wrap_main_tree_fn (function (args )
522- require (" mind.commands" ).create_node_index (
523- args .get_tree (),
524- require (" mind.node" ).MoveDir .INSIDE_END ,
525- args .save_tree ,
526- args .opts
527- )
516+ mind .wrap_main_tree_fn (function (args )
517+ mind .commands .create_node_index (args .get_tree (), mind .node .MoveDir .INSIDE_END , args .save_tree , args .opts )
528518 end )
529519 end ,
530520 " Create node index" ,
531521 },
532522 i = {
533523 function ()
534524 vim .notify " initializing project tree"
535- require ( " mind" ) .wrap_smart_project_tree_fn (function (args )
525+ mind .wrap_smart_project_tree_fn (function (args )
536526 local tree = args .get_tree ()
537- local mind_node = require " mind.node"
538527
539- local _ , tasks = mind_node .get_node_by_path (tree , " /Tasks" , true )
528+ local _ , tasks = mind . node .get_node_by_path (tree , " /Tasks" , true )
540529 tasks .icon = " "
541530
542- local _ , backlog = mind_node .get_node_by_path (tree , " /Tasks/Backlog" , true )
531+ local _ , backlog = mind . node .get_node_by_path (tree , " /Tasks/Backlog" , true )
543532 backlog .icon = " "
544533
545- local _ , on_going = mind_node .get_node_by_path (tree , " /Tasks/On-going" , true )
534+ local _ , on_going = mind . node .get_node_by_path (tree , " /Tasks/On-going" , true )
546535 on_going .icon = " "
547536
548- local _ , done = mind_node .get_node_by_path (tree , " /Tasks/Done" , true )
537+ local _ , done = mind . node .get_node_by_path (tree , " /Tasks/Done" , true )
549538 done .icon = " "
550539
551- local _ , cancelled = mind_node .get_node_by_path (tree , " /Tasks/Cancelled" , true )
540+ local _ , cancelled = mind . node .get_node_by_path (tree , " /Tasks/Cancelled" , true )
552541 cancelled .icon = " "
553542
554- local _ , notes = mind_node .get_node_by_path (tree , " /Notes" , true )
543+ local _ , notes = mind . node .get_node_by_path (tree , " /Notes" , true )
555544 notes .icon = " "
556545
557546 args .save_tree ()
@@ -561,33 +550,33 @@ M.set_mind_keymaps = function()
561550 },
562551 l = {
563552 function ()
564- require ( " mind" ) .wrap_smart_project_tree_fn (function (args )
565- require ( " mind.commands" ) .copy_node_link_index (args .get_tree (), nil , args .opts )
553+ mind .wrap_smart_project_tree_fn (function (args )
554+ mind .commands .copy_node_link_index (args .get_tree (), nil , args .opts )
566555 end )
567556 end ,
568557 " Copy node link index" ,
569558 },
570559 L = {
571560 function ()
572- require ( " mind" ) .wrap_main_tree_fn (function (args )
573- require ( " mind.commands" ) .copy_node_link_index (args .get_tree (), nil , args .opts )
561+ mind .wrap_main_tree_fn (function (args )
562+ mind .commands .copy_node_link_index (args .get_tree (), nil , args .opts )
574563 end )
575564 end ,
576565 " Copy node link index" ,
577566 },
578567 j = {
579568 function ()
580- require ( " mind" ) .wrap_main_tree_fn (function (args )
569+ mind .wrap_main_tree_fn (function (args )
581570 local tree = args .get_tree ()
582571 local path = vim .fn .strftime " /Journal/%Y/%b/%d"
583- local _ , node = require ( " mind.node" ) .get_node_by_path (tree , path , true )
572+ local _ , node = mind .node .get_node_by_path (tree , path , true )
584573
585574 if node == nil then
586575 vim .notify (" cannot open journal 🙁" , vim .log .levels .WARN )
587576 return
588577 end
589578
590- require ( " mind.commands" ) .open_data (tree , node , args .data_dir , args .save_tree , args .opts )
579+ mind .commands .open_data (tree , node , args .data_dir , args .save_tree , args .opts )
591580 args .save_tree ()
592581 end )
593582 end ,
@@ -598,16 +587,16 @@ M.set_mind_keymaps = function()
598587 m = { " <cmd>MindOpenSmartProject<CR>" , " Open smart project tree" },
599588 s = {
600589 function ()
601- require ( " mind" ) .wrap_smart_project_tree_fn (function (args )
602- require ( " mind.commands" ) .open_data_index (args .get_tree (), args .data_dir , args .save_tree , args .opts )
590+ mind .wrap_smart_project_tree_fn (function (args )
591+ mind .commands .open_data_index (args .get_tree (), args .data_dir , args .save_tree , args .opts )
603592 end )
604593 end ,
605594 " Open data index" ,
606595 },
607596 S = {
608597 function ()
609- require ( " mind" ) .wrap_main_tree_fn (function (args )
610- require ( " mind.commands" ) .open_data_index (args .get_tree (), args .data_dir , args .save_tree , args .opts )
598+ mind .wrap_main_tree_fn (function (args )
599+ mind .commands .open_data_index (args .get_tree (), args .data_dir , args .save_tree , args .opts )
611600 end )
612601 end ,
613602 " Open data index" ,
0 commit comments