Skip to content

v1.0.0

Latest
Compare
Choose a tag to compare
@tmillr tmillr released this 16 Oct 22:24
· 2 commits to master since this release
v1.0.0
a182041

What's Changed

Config (new!)

  • New options, including hooks and filters for acwrite buffers! (see README)
  • create_parent_dirs may be set to false to disable the automatic creation of missing parent directories
    • Note: such buffers/files will not be written then

  • Fully customizable, on-the-fly buffer filtering/exclusion by returning false in buf_autosave_pre() hook
  • Strict runtime config checking/validation (in setup())
  • LSP types (enabling type-checking and autocompletion for setup({...})) for all options
    • Note: completion + Lua LSP must be setup & properly configured locally

  • setup() behavior has changed
    • All-or-nothing: no longer incrementally applies config; each time setup() is called, what you pass is what you get
    • Now behaves similar to the setup() function of most other neovim plugins

Breaking Changes

  • should_observe_buf is now deprecated and will be removed in the future
  • on_timer is now internal and no longer public

API

  • :[N]SosBufToggle [bufname] command for toggling autosaving on individual buffers (default: current buffer)
  • Minimal Lua API accessible via require('sos') with functions such as:
    • require('sos').enable(verbose?)
    • require('sos').disable(verbose?)
    • require('sos').enable_buf(buf, verbose?)
    • require('sos').disable_buf(buf, verbose?)
    • require('sos').toggle_buf(buf, verbose?)
    • require('sos').buf_enabled(buf)

Features

  • 9faed51 feat(config)!: new opts, validation, modify setup()
  • 03dbf36 feat: restart timer on config change
  • bc505d1 feat(config): lower default timeout to 10 seconds
  • 2943f26 feat: add command :SosBufToggle to toggle buffers
  • afa9b4d feat!: create missing intermediate dirs on write
  • 3e84652 feat: save all buffers upon suspending neovim

Bug Fixes

  • 60b6f88 fix: parent dirs are created for acwrite bufs
  • 6012dd5 fix: check perms before write, only write if allowed (#20)

Other

  • a182041 chore(pkg): upload to LuaRocks
  • e1e26b7 test: add startup/init smoke tests
  • e5d26c4 perf: use getbufinfo() over nvim_list_bufs()

Full Changelog: v0.1.2...v1.0.0