chipsenkbeil / vimwiki.nvim

Neovim plugin that offers enhanced and alternative functionality for the vimwiki language.
BSD 2-Clause "Simplified" License
50 stars 0 forks source link

Support writing unsaved buffers to temporary files for use with vimwiki-server #15

Closed chipsenkbeil closed 4 years ago

chipsenkbeil commented 4 years ago

In order to support leveraging vimwiki-server on buffers with unsaved changes, we need to create temporary files where the buffers are written. This enables the server to monitor and provide accurate inspection information and appears to be how vim-ale does things as well.

  1. Provide a global or buffer option to enable/disable this feature
  2. Provide a global or buffer option to specify a delay between buffer changes and writing to the file
  3. Update element commands to use buffer and not real file
  4. Leverage the libuv timer to write the buffer to file as well as cancellation for when typing begins again
  5. Buffer should be flushed to temporary file whenever leaving insert mode