fix(sioyek): pass abspath in synctex script

This commit is contained in:
Barrett Ruth 2026-03-12 15:52:01 -04:00
parent f1cc5ca1ba
commit 66c1be4b45
No known key found for this signature in database
GPG key ID: A6C96C9349D2FC81
3 changed files with 10 additions and 3 deletions

View file

@ -4,6 +4,7 @@ local Methods = vim.lsp.protocol.Methods
local function fzf_or(fzf_cmd, fallback)
return function()
pcall(require('lz.n').trigger_load, 'ibhagwan/fzf-lua')
if pcall(require, 'fzf-lua') then
vim.cmd('FzfLua ' .. fzf_cmd)
else

View file

@ -161,7 +161,7 @@ in
font_size 18
status_bar_font_size 18
inverse_search_command nvim-inverse-search %1 %2
inverse_search_command ${repoDir}/scripts/nvim-inverse-search %1 %2
'';
};

View file

@ -2,11 +2,17 @@
file="$1"
line="$2"
echo "$(date) file='$file' line='$line'" >> ~/.debug
for sock in /run/user/$(id -u)/nvim.*.0; do
[ -S "$sock" ] || continue
result=$(nvim --server "$sock" --remote-expr "bufnr('$file')" 2>/dev/null)
result=$(nvim --server "$sock" --remote-expr "bufnr('$file')" 2>&1)
echo " sock='$sock' bufnr='$result'" >> ~/.debug
if [ "$result" != "-1" ] && [ -n "$result" ]; then
nvim --server "$sock" --remote-expr "execute('b +$line $file | normal! zz')"
out=$(nvim --server "$sock" --remote-expr "execute('b +$line $file | normal! zz')" 2>&1)
echo " -> sent, result='$out'" >> ~/.debug
exit 0
fi
done
echo " -> no match found" >> ~/.debug