The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Send A Neovim Buffer Filepath To An External Process

TODO: Pull subtitle into page object code_start_default_section code_end_default_section

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Send A Neovim Buffer Filepath To An External Process

Example from a neovim plugin

-- code/

local function export_to_file()
  local Job = require 'plenary.job'
  print("Exporting from: " .. vim.uri_from_bufnr(0))
  Job:new({
    command = 'grimoire_caster',
    args = { '--action', 'export_file', '--path', vim.uri_from_bufnr(0) },
    on_exit = function(job, return_val)
      print(vim.inspect(job:result()))
    end,
  }):sync()
  print("Exported from: " .. vim.uri_from_bufnr(0))
end

return {
  export_to_file = export_to_file
}


-- /code


In rust, that path has to be decoded with:

https://docs.rs/urlencoding/latest/urlencoding/index.html


-- ref
-- url: https://docs.rs/urlencoding/latest/urlencoding/index.html



-- categories
-- Neovim
-- Lua 

-- metadata
-- date: 2023-08-05 23:10:27
-- id: 2taqezb1
-- site: aws
-- type: post
-- status: scratch