Giter VIP home page Giter VIP logo

Comments (3)

olimorris avatar olimorris commented on July 21, 2024

Hey @shaun-mathew. Have you looked at implementing your own custom callbacks? I use them to stop minimap being recorded into my session.

from persisted.nvim.

shaun-mathew avatar shaun-mathew commented on July 21, 2024

Yep, I added something like this to my config that gets the job done:

config = function()
  require("persisted").setup {
    autosave = true,
    before_save = function()
      vim.cmd "NvimTreeClose"
    end,
  }
end

I was just wondering if what I suggested would be possible as a sort of convenience method where the user could specify a list of filetypes and before saving the session, the plugin could go around closing all windows with that filetype. Although, I assume it would get a bit messy.

from persisted.nvim.

olimorris avatar olimorris commented on July 21, 2024

The reason for adding the callbacks was mainly because I was seeing a lot of singular edge cases crop up that if addressed directly in the plugin, would move it further away from being a "simple session management" plugin.

I ultimately see the callbacks as the plugin's admission that it will never be able to cater for everyone's use cases and therefore it should give the user the ability to dictate how it functions for their given workflow.

from persisted.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.