robin/ivy

my custom neovim config

git clone https://git.robinwobin.dev/robin/ivy

robinftplugin: configure typst options265ce29

main
610 B18 linesraw
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})