File tree Expand file tree Collapse file tree 9 files changed +14
-91
lines changed Expand file tree Collapse file tree 9 files changed +14
-91
lines changed Original file line number Diff line number Diff line change 78
78
additional_dependencies :
79
79
- markdown-it-texmath
80
80
- repo : https://github.com/scop/pre-commit-shfmt
81
- rev : v3.11 .0-1
81
+ rev : v3.12 .0-2
82
82
hooks :
83
83
- id : shfmt
84
84
exclude : bin/neomuttp
Original file line number Diff line number Diff line change @@ -89,31 +89,11 @@ if vim.g.script_name == "nvimp" then
89
89
end
90
90
```
91
91
92
- #### luajittex
93
-
94
- Refer [ luatex] ( #luatex ) .
95
-
96
92
### Lua 5.3
97
93
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/ )
115
95
116
- ![ directlua ] ( https://github.com/user-attachments/assets/6a9943c9-a273-4ca9-b603-8cee17a2218f )
96
+ See [ tlua ] ( https://luarocks.org/modules/freed-wu/tlua ) .
117
97
118
98
#### [ neomutt] ( https://neomutt.org )
119
99
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
--- prompt style.
2
2
local os = require " os"
3
3
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_
5
11
local ansicolors = require " ansicolors"
6
12
local prompt = require " prompt"
7
13
--- @diagnostic disable : deprecated
@@ -122,7 +128,7 @@ local function get_os()
122
128
if os.getenv (" PREFIX" ) == " /data/data/com.termux/files/usr" then
123
129
return " android"
124
130
end
125
- local binary_format = package.cpath :match (' ([^.]+)$' )
131
+ local binary_format = package.cpath :match (' ([^.]+)$' ): gsub ( " ;$ " , " " )
126
132
if binary_format == " so" then
127
133
return get_distribution ()
128
134
elseif binary_format == " dll" then
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 16
16
]
17
17
) ;
18
18
in
19
- mkShell rec {
19
+ mkShell {
20
20
name = "prompt-style.lua" ;
21
21
buildInputs = [
22
- ( lua5_3 . withPackages packages )
23
22
( luajit . withPackages packages )
24
23
neovim
24
+
25
+ ( lua5_4 . withPackages packages )
25
26
pandoc
26
- ( builtins . elemAt texlive . luatex . pkgs 2 )
27
- ( builtins . elemAt texlive . luahbtex . pkgs 2 )
28
- ( builtins . elemAt texlive . luajittex . pkgs 2 )
29
27
] ;
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
- '' ;
41
28
}
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ build = {
43
43
-- cannot use _VERSION
44
44
bin = {
45
45
" bin/nvimp" ,
46
- " bin/texluap" ,
47
46
" bin/pandocp" ,
48
47
" bin/neomuttp"
49
48
},
You can’t perform that action at this time.
0 commit comments