Skip to content

Commit

Permalink
Refacotr directory mode (#1759)
Browse files Browse the repository at this point in the history
* split directory-mode files

* move function definitions

* update -> update-buffer

* move definition

* update-all -> update-all-buffers

* extract function

* move file functions to file.lisp

* split pakcages

* extract function

* split packages

* cleanup

* rename buffer -> internal
  • Loading branch information
cxxxr authored Jan 25, 2025
1 parent 16170aa commit 7196d4c
Show file tree
Hide file tree
Showing 12 changed files with 876 additions and 700 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ build/*
/systems/

/result

TODO
8 changes: 4 additions & 4 deletions extensions/lisp-mode/repl.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@
:callback (lambda (&rest args)
(declare (ignore args))
(copy-down-to-repl 'pathname
(lem/directory-mode::get-pathname (current-point))))))
(lem/directory-mode/internal::get-pathname (current-point))))))

(defun repl-compute-context-menu-items ()
(if (lem/directory-mode::get-pathname (current-point))
(if (lem/directory-mode/internal::get-pathname (current-point))
(list (context-menu-copy-down-pathname-to-repl))
(remove
nil
Expand Down Expand Up @@ -612,8 +612,8 @@

(define-repl-shortcut ls ()
(insert-character (current-point) #\newline)
(lem/directory-mode::insert-directories-and-files (current-point)
(buffer-directory (current-buffer)))
(lem/directory-mode/internal::insert-directories-and-files (current-point)
(buffer-directory (current-buffer)))
(lem/listener-mode:refresh-prompt (current-buffer)))

(define-repl-shortcut pwd ()
Expand Down
10 changes: 9 additions & 1 deletion lem.asd
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,15 @@
(:file "link")
(:file "thingatp")
(:file "gtags")
(:file "directory-mode")
(:module "directory-mode"
:serial t
:components ((:file "file")
(:file "attributes")
(:file "mode")
(:file "internal")
(:file "commands")
(:file "keybinds")
(:file "main")))
(:file "abbrev")
(:file "rectangle")
(:file "auto-save")
Expand Down
Loading

0 comments on commit 7196d4c

Please sign in to comment.