Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Source A File Every Time It's Saved In Neovim

This is what I'm using when I'm working on Lua script for Neovim. It sources/reloads the file every time I save it.

NOTE : THIS ISN"T CURRNET WORKING

lua
function start_source_buffer_on_save()
  print("Activated start_source_buffer_on_save")
  vim.api.nvim_create_autocmd("BufWritePost", {
    group = vim.api.nvim_create_augroup("AutoRunCurrentFile", { clear = true }),
    pattern = vim.api.nvim_buf_get_name(0),
    callback = function()
      vim.cmd("so %")
      -- print("got save")
    end,
  })
end

start_source_buffer_on_save()