Fix indentation again
This commit is contained in:
parent
d8ecbc3b98
commit
c6f4a197dd
9
guix.scm
9
guix.scm
|
@ -36,10 +36,11 @@
|
||||||
(local-file
|
(local-file
|
||||||
(dirname (current-filename))
|
(dirname (current-filename))
|
||||||
#:recursive? #t
|
#:recursive? #t
|
||||||
#:select? (λ (file stat)
|
#:select?
|
||||||
(not (any (λ (my-string)
|
(λ (file stat)
|
||||||
(string-contains file my-string))
|
(not (any (λ (my-string)
|
||||||
(list ".git" ".dir-locals.el" "guix.scm"))))))
|
(string-contains file my-string))
|
||||||
|
(list ".git" ".dir-locals.el" "guix.scm"))))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
|
|
@ -11,12 +11,12 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(use-modules (config)
|
(use-modules (config)
|
||||||
(config api)
|
(config api)
|
||||||
(config licenses)
|
(config licenses)
|
||||||
(config parser sexp)
|
(config parser sexp)
|
||||||
(sloth editor)
|
(sloth editor)
|
||||||
(sloth interface)
|
(sloth interface)
|
||||||
(ncurses curses))
|
(ncurses curses))
|
||||||
|
|
||||||
;; Commandline handling
|
;; Commandline handling
|
||||||
|
|
||||||
|
@ -29,14 +29,14 @@
|
||||||
(license @LICENSE@)
|
(license @LICENSE@)
|
||||||
(synopsis "Text editor based on tree-sitter")
|
(synopsis "Text editor based on tree-sitter")
|
||||||
(description
|
(description
|
||||||
"TODO")
|
"TODO")
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
(argument (name 'file)
|
(argument (name 'file)
|
||||||
(default "")
|
(default "")
|
||||||
(test string?)
|
(test string?)
|
||||||
(synopsis "The file to open")
|
(synopsis "The file to open")
|
||||||
(example "./file.txt"))))
|
(example "./file.txt"))))
|
||||||
(directory (in-home ".config/"))
|
(directory (in-home ".config/"))
|
||||||
(parser simple-sexp-parser)
|
(parser simple-sexp-parser)
|
||||||
(generate-cmdtree? #t)))
|
(generate-cmdtree? #t)))
|
||||||
|
|
|
@ -59,18 +59,18 @@
|
||||||
|
|
||||||
(define (normal-mode-process-input state key)
|
(define (normal-mode-process-input state key)
|
||||||
(case key
|
(case key
|
||||||
((left h) (move-cursor state #:x -1 #:relative? #t))
|
((left h) (move-cursor state #:x -1 #:relative? #t))
|
||||||
((right l) (move-cursor state #:x 1 #:relative? #t))
|
((right l) (move-cursor state #:x 1 #:relative? #t))
|
||||||
((up k) (move-cursor state #:y -1 #:relative? #t))
|
((up k) (move-cursor state #:y -1 #:relative? #t))
|
||||||
((down j) (move-cursor state #:y 1 #:relative? #t))
|
((down j) (move-cursor state #:y 1 #:relative? #t))
|
||||||
((n) (next-node state))
|
((n) (next-node state))
|
||||||
((d) (down-node state))
|
((d) (down-node state))
|
||||||
((p) (prev-node state))
|
((p) (prev-node state))
|
||||||
((u) (up-node state))
|
((u) (up-node state))
|
||||||
((i) (set! (mode state) 'insert-mode))
|
((i) (set! (mode state) 'insert-mode))
|
||||||
((q)
|
((q)
|
||||||
(end (get-frontend state))
|
(end (get-frontend state))
|
||||||
(quit))))
|
(quit))))
|
||||||
|
|
||||||
(define* (get-lines p #:optional (acc '()))
|
(define* (get-lines p #:optional (acc '()))
|
||||||
(let ((l (get-line p)))
|
(let ((l (get-line p)))
|
||||||
|
@ -156,7 +156,7 @@
|
||||||
(let ((point (ts-node-start-point target)))
|
(let ((point (ts-node-start-point target)))
|
||||||
(set! (point-node state) target)
|
(set! (point-node state) target)
|
||||||
(move-cursor state
|
(move-cursor state
|
||||||
#:y (car point) #:x (cdr point)))))
|
#:y (car point) #:x (cdr point)))))
|
||||||
|
|
||||||
(define (prev-node state)
|
(define (prev-node state)
|
||||||
(define target (or (ts-node-prev-sibling
|
(define target (or (ts-node-prev-sibling
|
||||||
|
@ -168,7 +168,7 @@
|
||||||
(let ((point (ts-node-start-point target)))
|
(let ((point (ts-node-start-point target)))
|
||||||
(set! (point-node state) target)
|
(set! (point-node state) target)
|
||||||
(move-cursor state
|
(move-cursor state
|
||||||
#:y (car point) #:x (cdr point)))))
|
#:y (car point) #:x (cdr point)))))
|
||||||
|
|
||||||
(define (down-node state)
|
(define (down-node state)
|
||||||
(define target (false-if-exception
|
(define target (false-if-exception
|
||||||
|
@ -188,4 +188,4 @@
|
||||||
(let ((point (ts-node-start-point target)))
|
(let ((point (ts-node-start-point target)))
|
||||||
(set! (point-node state) target)
|
(set! (point-node state) target)
|
||||||
(move-cursor state
|
(move-cursor state
|
||||||
#:y (car point) #:x (cdr point)))))
|
#:y (car point) #:x (cdr point)))))
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
init-frontend))
|
init-frontend))
|
||||||
|
|
||||||
(define sloth-input-keys
|
(define sloth-input-keys
|
||||||
(make-enumeration
|
(make-enumeration
|
||||||
'(a b c d e f g h i j k l m n o
|
'(a b c d e f g h i j k l m n o
|
||||||
p q r s t u v w x y z
|
p q r s t u v w x y z
|
||||||
s-a s-b s-c s-d s-e s-f s-g
|
s-a s-b s-c s-d s-e s-f s-g
|
||||||
|
@ -28,12 +28,12 @@
|
||||||
c-i c-j c-k c-l c-m c-n c-o c-p
|
c-i c-j c-k c-l c-m c-n c-o c-p
|
||||||
c-q c-r c-s c-t c-u c-v c-w c-x
|
c-q c-r c-s c-t c-u c-v c-w c-x
|
||||||
c-y c-z
|
c-y c-z
|
||||||
|
|
||||||
c-one c-two c-three c-four c-five c-six
|
c-one c-two c-three c-four c-five c-six
|
||||||
c-seven c-eight c-nine c-zero
|
c-seven c-eight c-nine c-zero
|
||||||
c-~ c-backtick c-! @ c-hash c-$ c-%
|
c-~ c-backtick c-! @ c-hash c-$ c-%
|
||||||
c-^ c-& c-* c-lparen c-rparen c-dash
|
c-^ c-& c-* c-lparen c-rparen c-dash
|
||||||
v c-_ c-lbrace c-rbrace c-lbracket c-rbracket
|
c-_ c-lbrace c-rbrace c-lbracket c-rbracket
|
||||||
c-pipe c-backslash c-/ c-? c-< c->
|
c-pipe c-backslash c-/ c-? c-< c->
|
||||||
c-comma c-dot c-: c-semicolon c-+ c-=
|
c-comma c-dot c-: c-semicolon c-+ c-=
|
||||||
c-apostrophe c-quote
|
c-apostrophe c-quote
|
||||||
|
|
Loading…
Reference in New Issue