Skip to content

Commit f7a5885

Browse files
committed
🔥 Drop texluap
1 parent 3d7107f commit f7a5885

File tree

9 files changed

+14
-91
lines changed

9 files changed

+14
-91
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ repos:
7878
additional_dependencies:
7979
- markdown-it-texmath
8080
- repo: https://github.com/scop/pre-commit-shfmt
81-
rev: v3.11.0-1
81+
rev: v3.12.0-2
8282
hooks:
8383
- id: shfmt
8484
exclude: bin/neomuttp

README.md

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -89,31 +89,11 @@ if vim.g.script_name == "nvimp" then
8989
end
9090
```
9191

92-
#### luajittex
93-
94-
Refer [luatex](#luatex).
95-
9692
### Lua 5.3
9793

98-
#### luatex
99-
100-
![texluap](https://github.com/wakatime/prompt-style.lua/assets/32936898/96d9f4c1-55fc-4ae3-87b8-7afd29f4ba0e)
101-
102-
If you want to use lua REPL in `\directlua{}`, you can insert:
103-
104-
```tex
105-
\directlua{require'prompt.tex'}
106-
```
107-
108-
As [example](examples/):
109-
110-
```sh
111-
luajittex --shell-escape main.tex
112-
```
113-
114-
Then you will get:
94+
#### [luatex](https://www.luatex.org/)
11595

116-
![directlua](https://github.com/user-attachments/assets/6a9943c9-a273-4ca9-b603-8cee17a2218f)
96+
See [tlua](https://luarocks.org/modules/freed-wu/tlua).
11797

11898
#### [neomutt](https://neomutt.org)
11999

bin/lualatex.tlu

Lines changed: 0 additions & 17 deletions
This file was deleted.

bin/luatex.tlu

Lines changed: 0 additions & 13 deletions
This file was deleted.

bin/texluap

Lines changed: 0 additions & 9 deletions
This file was deleted.

lua/prompt/style.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
---prompt style.
22
local os = require "os"
33
local table = require "table"
4-
local lfs = require "lfs"
4+
-- texlua has a builtin lfs, use it
5+
if lfs then
6+
lfs_ = lfs
7+
else
8+
_, lfs_ = pcall(require, "lfs")
9+
end
10+
local lfs = lfs_
511
local ansicolors = require "ansicolors"
612
local prompt = require "prompt"
713
---@diagnostic disable: deprecated
@@ -122,7 +128,7 @@ local function get_os()
122128
if os.getenv("PREFIX") == "/data/data/com.termux/files/usr" then
123129
return "android"
124130
end
125-
local binary_format = package.cpath:match('([^.]+)$')
131+
local binary_format = package.cpath:match('([^.]+)$'):gsub(";$", "")
126132
if binary_format == "so" then
127133
return get_distribution()
128134
elseif binary_format == "dll" then

lua/prompt/tex.lua

Lines changed: 0 additions & 10 deletions
This file was deleted.

shell.nix

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,13 @@ let
1616
]
1717
);
1818
in
19-
mkShell rec {
19+
mkShell {
2020
name = "prompt-style.lua";
2121
buildInputs = [
22-
(lua5_3.withPackages packages)
2322
(luajit.withPackages packages)
2423
neovim
24+
25+
(lua5_4.withPackages packages)
2526
pandoc
26-
(builtins.elemAt texlive.luatex.pkgs 2)
27-
(builtins.elemAt texlive.luahbtex.pkgs 2)
28-
(builtins.elemAt texlive.luajittex.pkgs 2)
2927
];
30-
shellHook = ''
31-
export LUAINPUTS_luatex="${./.}/lua;${builtins.elemAt buildInputs 0}/share/lua/5.3"
32-
export CLUAINPUTS_luatex="${builtins.elemAt buildInputs 0}/lib/lua/5.3"
33-
export LUAINPUTS_luajittex="${./.}/lua;${builtins.elemAt buildInputs 1}/share/lua/5.1"
34-
export CLUAINPUTS_luajittex="${builtins.elemAt buildInputs 1}/lib/lua/5.1"
35-
36-
export LUAINPUTS_luahbtex="$LUAINPUTS_luatex"
37-
export CLUAINPUTS_luahbtex="$CLUAINPUTS_luatex"
38-
export LUAINPUTS_luajithbtex="$LUAINPUTS_luajittex"
39-
export CLUAINPUTS_luajithbtex="$CLUAINPUTS_luajittex"
40-
'';
4128
}

template.rockspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ build = {
4343
-- cannot use _VERSION
4444
bin = {
4545
"bin/nvimp",
46-
"bin/texluap",
4746
"bin/pandocp",
4847
"bin/neomuttp"
4948
},

0 commit comments

Comments
 (0)