Skip to content

Commit

Permalink
Merge branch 'main' into process-information-buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasanidas committed Nov 3, 2023
2 parents 5aebffa + 2aa1353 commit fb825c2
Show file tree
Hide file tree
Showing 159 changed files with 7,818 additions and 3,915 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/generate-document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Roswell
env:
LISP: ${{ matrix.lisp }}
Expand All @@ -25,23 +23,14 @@ jobs:
run: |
set -ex
# workaround for sbcl and log4cl combination problems
mkdir ~/common-lisp
cd ~/common-lisp
git clone https://github.com/sharplispers/log4cl.git
cd -
ros config set dynamic-space-size 2048
ros install lem-project/async-process lem
export PATH=$HOME/.roswell/bin:$PATH
cd $(ros -e '(princ (ql:where-is-system :lem))')
curl -L https://qlot.tech/installer | bash
export PATH="/home/runner/.qlot/bin:$PATH"
qlot install
document_file=docs/default-keybindings.md
ros -s lem -s lem/extensions -e "(lem-documentation-mode:generate-markdown-file \"${document_file}\" :command)"
qlot exec ros -s lem -s lem/extensions -e "(lem-documentation-mode:generate-markdown-file \"${document_file}\" :command)"
if [ -z "$(git diff ${document_file})" ]; then
exit 0
Expand Down
24 changes: 6 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install Roswell
env:
LISP: ${{ matrix.lisp }}
Expand All @@ -23,30 +21,20 @@ jobs:
- name: Run test
run: |
set -ex
# workaround for sbcl and log4cl combination problems
mkdir ~/common-lisp
cd ~/common-lisp
git clone https://github.com/sharplispers/log4cl.git
cd -
ros config set dynamic-space-size 2048
curl -L https://qlot.tech/installer | bash
export PATH="/home/runner/.qlot/bin:$PATH"
ros install lem-project/async-process lem
ros install cxxxr/sblint fukamachi/rove
qlot install
export PATH=$HOME/.roswell/bin:$PATH

sblint src/base/lem-base.asd
sblint lem.asd
sblint lib/lisp-syntax/lem-lisp-syntax.asd
sblint extensions/lisp-mode/lem-lisp-mode.asd
make lint
if [ $(grep -r --include="*.lisp" 'lem::' | wc -l) -ne 0 ]; then
echo 'using `lem::` internal symbols'
echo 'https://google.github.io/styleguide/lispguide.xml?showone=Packages#Packages'
exit 1
fi
rove lem-tests.asd
rove extensions/vi-mode/lem-vi-mode.asd
qlot exec .qlot/bin/rove lem-tests.asd
qlot exec .qlot/bin/rove extensions/vi-mode/lem-vi-mode.asd
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ lem-ncurses
build/*

*.lx64fsl
.qlot
15 changes: 0 additions & 15 deletions .gitmodules

This file was deleted.

11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM docker.io/fukamachi/qlot

COPY . .

RUN apt-get update && apt-get install gcc libncurses-dev -y

RUN qlot install

RUN qlot exec sbcl --noinform --no-sysinit --no-userinit --load .qlot/setup.lisp --load scripts/build-ncurses.lisp

ENTRYPOINT qlot exec sbcl --eval "(ql:quickload :lem-ncurses)" --eval "(lem:lem)" --quit
29 changes: 18 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
LISP ?= ${shell which sbcl}

build-ncurses:
$(LISP) --load scripts/patch-build-ncurses.lisp
ncurses:
qlot install
$(LISP) --noinform --no-sysinit --no-userinit --load .qlot/setup.lisp --load scripts/build-ncurses.lisp

build-sdl2:
$(LISP) --load scripts/patch-build-sdl2.lisp
sdl2:
qlot install
$(LISP) --noinform --no-sysinit --no-userinit --load .qlot/setup.lisp --load scripts/build-sdl2.lisp

test:
$(LISP) --load scripts/launch-tests.lisp
qlot install
.qlot/bin/rove lem-tests.asd

generate-doc:
$(LISP) --load scripts/generate-documentation-tests.lisp --eval '(progn (lem-documentation-mode/tests::generate-markdown-file "test.md" :test) (quit))'

update-submodules:
git submodule update --remote
doc:
qlot install
$(LISP) --noinform --no-sysinit --no-userinit --load .qlot/setup.lisp --load scripts/generate-documentation-tests.lisp --eval '(progn (lem-documentation-mode/tests::generate-markdown-file "test.md" :test) (quit))'

update:
git pull
git submodule update --init --recursive
qlot install

lint:
.qlot/bin/sblint src/base/lem-base.asd
.qlot/bin/sblint lem.asd
.qlot/bin/sblint lib/lisp-syntax/lem-lisp-syntax.asd
.qlot/bin/sblint extensions/lisp-mode/lem-lisp-mode.asd
55 changes: 22 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,44 +42,47 @@ https://github.com/lem-project/lem/issues/628

## Requirement
- ncurses
- [roswell](https://github.com/roswell/roswell) (optional)
- sbcl
- qlot
- SDL2 (optional)

## Platform
- Linux
- MacOS
- [Windows](https://github.com/lem-project/lem/wiki/Windows-Platform)

## Installation with roswell
## Install

Please install roswell at first.
### Requirement

[Roswell Installation Guide](https://github.com/roswell/roswell/wiki/Installation)
#### sbcl
#### qlot

After that, please follow the steps bellow.
See https://github.com/fukamachi/qlot#installation

```
1. install lem by roswell
$ ros follow-dependency=t install lem-project/lem
2. add the PATH in the initialization file(such as ~/.bashrc)
export PATH=$PATH:~/.roswell/bin
curl -L https://qlot.tech/installer | bash
```

### Updating
## build

```
make
```
### SDL2
Dependent packages must be installed.
See https://github.com/lem-project/lem/blob/main/frontends/sdl2/README.md

```
$ ros update lem
make sdl2
```
note: Perhaps this is not enough.
If you get an error, try updating the submodule.

## update
```
$ cd $(ros -e '(princ (ql:where-is-system :lem))')
$ git submodule update --init --recursive
$ ros follow-dependency=t install lem-project/lem
make update
```

### Usage
## Usage

```
$ lem <filename.lisp>
Expand All @@ -89,28 +92,14 @@ You can watch the screencast on Youtube.

[Screencast](https://youtu.be/YkSJ3p7Z9H0)

## Installation with sbcl

Please clone lem to a location where the path to asdf is accessible.

```
$ mkdir $HOME/common-lisp
$ cd $HOME/common-lisp
$ git clone --recursive https://github.com/lem-project/lem.git
```

You can start "lem" using the following command.
```
$ sbcl
$ qlot exec sbcl
* (ql:quickload :lem-ncurses)
* (lem:lem)
```

You can create the executable file of lem using the following command.
```
$ sbcl --eval '(ql:quickload :lem-ncurses)' --load build.lisp
```

## Configuration

Lem loads `~/.lem/init.lisp` when starting up.
Expand Down
4 changes: 2 additions & 2 deletions contrib/migemo/lem-migemo.asd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
:components((:file "main"))
:depends-on("lem"
:cl-migemo))
(UNLESS (ASDF/SYSTEM:FIND-SYSTEM "cl-migemo" NIL)
#+roswell(UNLESS (ASDF/SYSTEM:FIND-SYSTEM "cl-migemo" NIL)
(UIOP/PACKAGE:SYMBOL-CALL "ROSWELL" "ROSWELL"
'("install" "snmsts/cl-migemo")))
'("install" "snmsts/cl-migemo")))
53 changes: 27 additions & 26 deletions docs/default-keybindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,32 +121,33 @@
## Window
| Command | Key bindings | Documentation |
|----------------------------------------------------------------------------------------------------------------|----------------|-----------------------------------------------------------------------|
| [select-buffer](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L64) | C-x b | Switches to the selected buffer. |
| [kill-buffer](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L103) | C-x k | Delete buffer. |
| [previous-buffer](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L112) | C-x Left | Switches to the previous buffer. |
| [next-buffer](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L122) | C-x Right | Switches to the next buffer. |
| [recenter](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L128) | C-l | Scroll so that the cursor is in the middle. |
| [split-active-window-vertically](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L135) | C-x 2 | Split the current window vertically. |
| [split-active-window-horizontally](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L141) | C-x 3 | Split the current window horizontally. |
| [other-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L147) | C-x o, M-o | Go to the next window. |
| [switch-to-last-focused-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L159) | | Go to the window that was last in focus. |
| [window-move-down](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L167) | | Go to the window on the down. |
| [window-move-up](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L172) | | Go to the window on the up. |
| [window-move-right](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L177) | | Go to the window on the right. |
| [window-move-left](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L182) | | Go to the window on the left. |
| [delete-other-windows](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L187) | C-x 1 | Delete all other windows. |
| [delete-active-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L200) | C-x 0, M-q | Delete the active window. |
| [quit-active-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L205) | | Quit the active window. This is a command for a popped-up window. |
| [grow-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L210) | C-x ^ | Grow the window's height. |
| [shrink-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L218) | C-x C-z | Shrink the window's height. |
| [grow-window-horizontally](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L226) | C-x } | Grow the window's width. |
| [shrink-window-horizontally](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L234) | C-x { | Shrink the window's width. |
| [scroll-down](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L245) | C-Down, M-Down | Scroll down. |
| [scroll-up](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L259) | C-Up, M-Up | Scroll up. |
| [find-file-other-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L271) | C-x 4 f | Open a file in another window. Split the screen vertically if needed. |
| [read-file-other-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L272) | C-x 4 r | Read a file in another window. |
| [select-buffer-other-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L273) | C-x 4 b | Select a buffer in another window. |
| [compare-windows](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L277) | | |
| [select-buffer](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L66) | C-x b | Switches to the selected buffer. |
| [kill-buffer](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L105) | C-x k | Delete buffer. |
| [previous-buffer](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L114) | C-x Left | Switches to the previous buffer. |
| [next-buffer](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L124) | C-x Right | Switches to the next buffer. |
| [recenter](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L130) | C-l | Scroll so that the cursor is in the middle. |
| [split-active-window-vertically](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L137) | C-x 2 | Split the current window vertically. |
| [split-active-window-horizontally](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L143) | C-x 3 | Split the current window horizontally. |
| [next-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L149) | C-x o, M-o | Go to the next window. |
| [previous-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L161) | M-O | |
| [switch-to-last-focused-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L164) | | Go to the window that was last in focus. |
| [window-move-down](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L172) | | Go to the window on the down. |
| [window-move-up](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L177) | | Go to the window on the up. |
| [window-move-right](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L182) | | Go to the window on the right. |
| [window-move-left](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L187) | | Go to the window on the left. |
| [delete-other-windows](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L192) | C-x 1 | Delete all other windows. |
| [delete-active-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L205) | C-x 0, M-q | Delete the active window. |
| [quit-active-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L210) | | Quit the active window. This is a command for a popped-up window. |
| [grow-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L215) | C-x ^ | Grow the window's height. |
| [shrink-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L223) | C-x C-z | Shrink the window's height. |
| [grow-window-horizontally](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L231) | C-x } | Grow the window's width. |
| [shrink-window-horizontally](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L239) | C-x { | Shrink the window's width. |
| [scroll-down](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L250) | C-Down, M-Down | Scroll down. |
| [scroll-up](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L264) | C-Up, M-Up | Scroll up. |
| [find-file-next-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L276) | C-x 4 f | Open a file in another window. Split the screen vertically if needed. |
| [read-file-next-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L277) | C-x 4 r | Read a file in another window. |
| [select-buffer-next-window](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L278) | C-x 4 b | Select a buffer in another window. |
| [compare-windows](https://github.com/lem-project/lem/blob/main/src/commands/window.lisp#L282) | | |

## Multiple-Cursors
| Command | Key bindings | Documentation |
Expand Down
2 changes: 1 addition & 1 deletion extensions/c-mode/c-mode.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
:expr-suffix-chars '(#\, #\; #| #\= #\& #\| |#)
:line-comment-string "//"
:block-comment-pairs '(("/*" . "*/"))))
(tmlanguage (lem-c-mode.grammer:make-tmlanguage-c)))
(tmlanguage (lem-c-mode.grammar:make-tmlanguage-c)))
(set-syntax-parser table tmlanguage)
table))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
(defpackage :lem-c-mode.grammer
(defpackage :lem-c-mode.grammar
(:use :cl :lem)
(:export :make-tmlanguage-c)
#+sbcl
(:lock t))
(in-package :lem-c-mode.grammer)
(in-package :lem-c-mode.grammar)

(defun tokens (boundary strings)
(let ((alternation
Expand Down
2 changes: 1 addition & 1 deletion extensions/c-mode/lem-c-mode.asd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(defsystem "lem-c-mode"
:depends-on ("lem" "lem-lisp-mode")
:serial t
:components ((:file "grammer")
:components ((:file "grammar")
(:file "c-mode")))
Loading

0 comments on commit fb825c2

Please sign in to comment.