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