-
Notifications
You must be signed in to change notification settings - Fork 16
Configuration Recipes
Nathan Craddock edited this page Feb 8, 2022
·
6 revisions
This page is a place to share various configurations for workspaces.nvim. If you make something useful please share it here!
Editing Instructions:
Please follow the following format:
Dependencies: list required plugins if applicable
require("workspaces.nvim").setup({
-- setup code here
})
Further details, notes, instructions, etc. here.
If you feel the need to deviate from this format that is fine, but try to keep things organized!
Dependencies: nvim-telescope/telescope.nvim
require("workspaces").setup({
hooks = {
open = "Telescope find_files",
}
})
Dependencies: kyazdani42/nvim-tree.lua
require("workspaces").setup({
hooks = {
open = "NvimTreeOpen",
}
})
Dependencies: natecraddock/sessions.nvim
require("workspaces").setup({
hooks = {
-- hooks run before change directory
open_pre = {
-- If recording, save current session state and stop recording
"SessionsStop",
-- delete all buffers (does not save changes)
"silent %bdelete!",
},
-- hooks run after change directory
open = {
-- load saved session from current directory if it exists
function()
require("sessions").load(nil, { silent = true })
end
}
},
})
Note that the sessions.load()
function assumes a default sessions path has been configured