Skip to content

Manually overriding sioyek configuration #2475

@elu00

Description

@elu00

Description

Hi,

Thanks as always for the great plugin!

I'm currently trying to modify the default sioyek configuration to run a slightly different command when called by vimtex; in particular, I'd like to replace the provided argument of /usr/bin/nvim to the inverse-search argument with wsl nvim.

Towards that end, I've modified the last couple lines in ~/.config/nvim/plugged/vimtex/autoload/vimtex/view/sioyek.vim to the following:

"let s:inverse_search_cmd = get(g:, 'vimtex_callback_progpath',
"      \                        get(v:, 'progpath', get(v:, 'progname', '')))
"      \ . (has('nvim')
"      \   ? ' --headless'
"      \   : ' -T dumb --not-a-term -n')
let s:inverse_search_cmd = 'wsl nvim --headless'

However, after closing and reopening nvim, opening a tex file and running \ll and \li, the default arguments to sioyek remain the same, as seen below. Is there somewhere else where I should be modifying these arguments, or am I failing to reload the changes to vimtex properly?

Thanks!

Steps to reproduce

" Plugin manager setup
set mouse=a
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
  silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs  https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif

" Plugins
call plug#begin()
Plug 'lervag/vimtex'
call plug#end()

" Vim-tex
" turn spellcheck on for tex documents
autocmd BufRead,BufNewFile *.tex setlocal spell
let g:vimtex_quickfix_autoclose_after_keystrokes = 2
let g:vimtex_quickfix_open_on_warning = 0
let g:vimtex_view_enabled = 1
let g:vimtex_view_sioyek_exe='sioyek.exe'
let g:vimtex_view_method = 'sioyek'

Expected behavior

No response

Actual behavior

No response

Do you use a latexmkrc file?

No

VimtexInfo

System info:
  OS: Ubuntu 18.04.6 LTS
  Vim version: NVIM v0.6.1
  Has clientserver: true
  Servername: /tmp/nvimabsoYw/0

VimTeX project: paper
  base: paper.tex
  root: /home/elu/repos/mixing
  tex: /home/elu/repos/mixing/paper.tex
  main parser: current file verified
  document class: amsart
  packages: amsbsy amsfonts amsgen amsmath amsopn amssymb amstext amsthm atbegshi atbegshi-ltx atveryend atveryend-ltx auxhook bigintcalc bitset bm calc centernot cite color doi environ epstopdf-base etexcmds etoolbox fontenc geometry gettitlestring gimac graphics graphicx grfext hycolor hyperref iftex ifvtex indentfirst infwarerr intcalc keyval kvdefinekeys kvoptions kvsetkeys letltxmacro lmodern ltxcmds marktext mathrsfs mathtools mhsetup microtype nameref paralist pdfcol pdfescape pdftexcmds pgf pgfcomp-version-0-65 pgfcomp-version-1-18 pgfcore pgffor pgfkeys pgfmath pgfrcs pgfsys refcount rerunfilecheck showkeys stringenc suffix tcolorbox tikz trig trimspaces ulem uniquecounter url verbatim xcolor xspace
  compiler: latexmk
    engine: -pdf
    options:
      -verbose
      -file-line-error
      -synctex=1
      -interaction=nonstopmode
    callback: 1
    continuous: 1
    executable: latexmk
    job: 
      jobid: 5
      output: /tmp/nvimabsoYw/1
      cmd: max_print_line=2000 latexmk -verbose -file-line-error -synctex=1 -interaction=nonstopmode -pdf -pvc -view=none -e '$compiling_cmd = ($compiling_cmd ? $compiling_cmd . " ; " : "") . "echo vimtex_compiler_callback_compiling"' -e '$success_cmd = ($success_cmd ? $success_cmd . " ; " : "") . "echo vimtex_compiler_callback_success"' -e '$failure_cmd = ($failure_cmd ? $failure_cmd . " ; " : "") . "echo vimtex_compiler_callback_failure"' 'paper.tex'
      pid: 15763
  viewer: sioyek
    job: 
      pid: -
      cmd: sioyek.exe --inverse-search "/usr/bin/nvim --headless -c \"VimtexInverseSearch %2 '%1'\"" --forward-search-file '/home/elu/repos/mixing/paper.tex' --forward-search-line 1 '/home/elu/repos/mixing/paper.pdf'
    cmd_start: sioyek.exe --inverse-search "/usr/bin/nvim --headless -c \"VimtexInverseSearch %2 '%1'\"" --forward-search-file '/home/elu/repos/mixing/paper.tex' --forward-search-line 1 '/home/elu/repos/mixing/paper.pdf'
  qf method: LaTeX logfile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions