Commit dcc344c
feat(view): indicate modified buffers (#1835)
* Outlined new options
* highlight_modified is highlight_opened_files
* prototype with autocmd
* moved modified into glyphs
* show_on_dirs and show_on_open_dirs
* icon placement before & after
* _get_filename_offset
* fixed :wq doesn't update modified indicator
* highlight_modified, signcolumn modified_placement
Refactored to make everything use HighlightedString to remove all the complex `insert_highlight` calculation.
Not tested.
* updated doc to match the reality of no multi char for glyphs.modified
* fixed git signcolumn doesn't show
* fixed highlight_modified gets replaced by highlight_opened_files
* fixed renderer.icons.show.modified = false crash
* updated doc to reflect empty icon not breaking rendering
* removed debounce_delay to implement in a later PR
* doc nit: order placement
* change modified dirs default to be consistent with git
* illegal git & modified placement changed to default
* don't assume icon exist
* nit remove comment
* Noted in doc that glyphs can't have more than 2 characters if in signcolumn
* Don't sign_define if placement isn't signcolumn
Co-authored-by: Alexander Courtis <[email protected]>1 parent 9ad93b6 commit dcc344c
File tree
10 files changed
+370
-135
lines changed- doc
- lua
- nvim-tree
- renderer
- components
10 files changed
+370
-135
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| 244 | + | |
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
246 | 248 | | |
247 | 249 | | |
248 | 250 | | |
249 | 251 | | |
| 252 | + | |
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| 258 | + | |
255 | 259 | | |
256 | 260 | | |
257 | 261 | | |
| |||
326 | 330 | | |
327 | 331 | | |
328 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
| |||
544 | 553 | | |
545 | 554 | | |
546 | 555 | | |
| 556 | + | |
547 | 557 | | |
548 | 558 | | |
549 | 559 | | |
| |||
619 | 629 | | |
620 | 630 | | |
621 | 631 | | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
622 | 652 | | |
623 | 653 | | |
624 | 654 | | |
| |||
779 | 809 | | |
780 | 810 | | |
781 | 811 | | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
782 | 819 | | |
783 | 820 | | |
784 | 821 | | |
| |||
821 | 858 | | |
822 | 859 | | |
823 | 860 | | |
824 | | - | |
| 861 | + | |
825 | 862 | | |
826 | 863 | | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
827 | 870 | | |
828 | 871 | | |
829 | | - | |
830 | 872 | | |
831 | 873 | | |
832 | 874 | | |
| |||
854 | 896 | | |
855 | 897 | | |
856 | 898 | | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
857 | 904 | | |
858 | 905 | | |
| 906 | + | |
| 907 | + | |
859 | 908 | | |
860 | 909 | | |
861 | 910 | | |
| |||
865 | 914 | | |
866 | 915 | | |
867 | 916 | | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
868 | 921 | | |
869 | 922 | | |
870 | 923 | | |
| |||
1471 | 1524 | | |
1472 | 1525 | | |
1473 | 1526 | | |
| 1527 | + | |
1474 | 1528 | | |
1475 | 1529 | | |
1476 | 1530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
476 | 477 | | |
477 | 478 | | |
478 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
479 | 489 | | |
480 | 490 | | |
481 | 491 | | |
| |||
532 | 542 | | |
533 | 543 | | |
534 | 544 | | |
| 545 | + | |
535 | 546 | | |
536 | 547 | | |
537 | 548 | | |
| |||
548 | 559 | | |
549 | 560 | | |
550 | 561 | | |
| 562 | + | |
551 | 563 | | |
552 | 564 | | |
553 | 565 | | |
554 | 566 | | |
555 | 567 | | |
556 | 568 | | |
557 | 569 | | |
| 570 | + | |
558 | 571 | | |
559 | 572 | | |
560 | 573 | | |
561 | 574 | | |
562 | 575 | | |
| 576 | + | |
563 | 577 | | |
564 | 578 | | |
565 | 579 | | |
| |||
634 | 648 | | |
635 | 649 | | |
636 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
637 | 656 | | |
638 | 657 | | |
639 | 658 | | |
| |||
810 | 829 | | |
811 | 830 | | |
812 | 831 | | |
| 832 | + | |
813 | 833 | | |
814 | 834 | | |
815 | 835 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments