Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.
This repository was archived by the owner on May 6, 2024. It is now read-only.

[Question] Cant figure out the example, opening PDFs #74

Description

@LamprosPitsillos

Tried following the example given to have nvim open pdfs in zathura instead of binary form but nothing happens,expect from nvim opening the pdf in binary.
Am I doing something incorrectly or am I completely misunderstanding how this feature of the plugin works?

require("filetype").setup({
	function_extensions = {
		["pdf"] = function()
			vim.bo.filetype = "pdf"
			-- Open in PDF viewer automatically
			vim.fn.jobstart("zathura " .. '"' .. vim.fn.expand("%") .. '"')
		end,
	},
})

Running the command from the opened buffer works fine.
:lua vim.fn.jobstart("zathura " .. '"' .. vim.fn.expand("%") .. '"')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions