Skip to content

Neovim project manager, manage project within workspaces using Tmux sessions

Notifications You must be signed in to change notification settings

sanathks/workspace.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

workspace.nvim

License

workspace.nvim is a Neovim plugin that allows you to manage Tmux sessions for your projects and workspaces in a simple and efficient way.

workspace.nvim

Introduction

Inspired by ThePrimeagen's tmux-sessionizer

Features

  • Create and manage Tmux sessions for different projects and workspaces.
  • Easily switch between Tmux sessions associated with your projects.

Installation

lazy.nvim

{
  "sanathks/workspace.nvim",
  dependencies = {"nvim-telescope/telescope.nvim"},
  config = function()
    require("workspace").setup({
      workspaces = {
        { name = "Work",  path = "~/projects/work",  keymap = { "<leader>w" } },
        { name = "Hobby", path = "~/projects/hobby", keymap = { "<leader>p" } },
      }
    })
  end,
}

Switch between tmux sessions

tmux sessions

 local workspace = require("workspace")
 vim.keymap.set('n', '<leader>ps', workspace.tmux_sessions)

Customize the session name generation

with the tmux_session_name_generator option you can provide a custom session name generator, which allows you to make the session name unique across multiple workspaces.

function(project_name, workspace_name)
  local suffix = string.sub(workspace_name, 1, 2)
  local session_name = string.upper(project_name) .. "_" .. suffix
   return session_name
end

Contributing

Contributions are welcome! If you find any issues or have ideas for improvements, please open an issue or submit a pull request.

About

Neovim project manager, manage project within workspaces using Tmux sessions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages