馃 my neovim config:)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 18 lines 610 B view raw
1-- options ==================================================================== 2 3vim.bo.textwidth = 80 4vim.bo.iskeyword = vim.bo.iskeyword .. ",_,*" 5 6-- commands =================================================================== 7 8vim.api.nvim_create_user_command("OpenPdf", function(opts) 9 local filepath = opts.nargs > 0 and opts.fargs[1] or vim.fn.bufname() 10 filepath = vim.fs.abspath(filepath) 11 if not filepath:match("%.typ$") then 12 vim.notify(("Not a typst file: %s"):format(filepath), vim.log.levels.ERROR) 13 return 14 end 15 vim.ui.open(filepath:gsub("%.typ$", ".pdf"), {}) 16end, { 17 nargs = 1, 18})