Closed stefanocoretta closed 2 months ago
I don't have access to any macOS to fix the bug, but, as far as I know, the path ending in .app
is a directory, not the complete path of an executable. If PDF Expert is your default PDF viewer, you could try to set open
as the pdfviewer
value in R.nvim
config.
I don't have PDF Expert, but a Mac. For my browser, which qutebrowser
yields qutebrowser: aliased to /Applications/qutebrowser.app/Contents/MacOS/qutebrowser
. So I'd check the contents of /Applications/PDF Expert.app
, starting with /Applications/PDF Expert.app/Contents/MacOS
, if it exisist, looking for an executable. Once you confirm that you can launch the App through that binary, try adjusting your config lua file accordingly.
As previously mentioned, for MacOS users, all installed binaries for the app can be found in the /Applications/PDF Expert.app/Contents/MacOS/
directory. However, it's important to note that running the binary directly may not always produce the same results as "double-clicking" the app icon.
If your goal is to replicate the action of "clicking" on the app icon or launching the app bundle via a Spotlight search, the most straightforward method is to use the open
command. You can do this in one of two ways:
open -a 'PDF Expert'
open -a '/Applications/PDF Expert.app'
Additionally, if you need to pass arguments to the app, you can create a shell script. This script can accept arguments and then use them when launching the app. For example, you might have a script like the following, which you could call from your code by specifying pdfviewer = 'script_path.sh'
:
#!/usr/bin/env bash
open -a '/Applications/PDF Expert.app' --args "${@}";
I hope this helps you understand the source of any issues you're experiencing.
Thank you for the help, @mschilli87 and @luciorq! I believe that @stefanocoretta will be able to solve his problem with your explanations.
@stefanocoretta, please, reopen the issue if you still have problems configuring PDF Expert as your PDF viewer.
Hi! I set the
pdfviewer
to/Applications/PDF Expert.app
, but I get a warning that the app was not found.This is my
R.lua
config.