Skip to content

Commit a531f6b

Browse files
committed
feat: add more info to VimtexInfo
refer: lervag#3142
1 parent 40e4fa6 commit a531f6b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

autoload/vimtex/info.vim

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function! s:info.gather_system_info() abort dict " {{{1
3939
let l:lines = [
4040
\ 'System info:',
4141
\ ' OS: ' . s:get_os_info(),
42+
\ ' LaTeX version: ' . s:get_latex_info(),
4243
\ ' Vim version: ' . s:get_vim_info(),
4344
\]
4445

@@ -50,6 +51,11 @@ function! s:info.gather_system_info() abort dict " {{{1
5051
call add(l:lines, ' Has clientserver: false')
5152
endif
5253

54+
call add(l:lines, ' $PATH:')
55+
for l:path in uniq(sort(split($PATH, '[:;]')))
56+
call add(l:lines, ' - ' .. l:path)
57+
endfor
58+
5359
return l:lines
5460
endfunction
5561

@@ -207,6 +213,15 @@ function! s:get_os_info() abort " {{{1
207213
endif
208214
endfunction
209215

216+
" }}}1
217+
function! s:get_latex_info() abort " {{{1
218+
let l:result = executable('latex')
219+
\ ? vimtex#jobs#capture('latex --version')[0]
220+
\ : 'LATEX WAS NOT FOUND!'
221+
222+
return l:result
223+
endfunction
224+
210225
" }}}1
211226
function! s:get_vim_info() abort " {{{1
212227
let l:info = vimtex#util#command('version')

0 commit comments

Comments
 (0)