Open Tuxedo in a floating window.
Supports Neovim 0.11+
Install through your favourite package manager.
vim.pack.add({
-- Using `main` branch
"https://github.com/RVxLab/tuxedo.nvim",
-- If you wish to pin the version
{
src = "https://github.com/RVxLab/tuxedo.nvim",
version = vim.version.range("^1.0.0"),
},
...
})
require("tuxedo").setup()
-- Optional: set up a keymap
vim.keymap.set("n", "<leader>T", function ()
require("tuxedo").tuxedo()
end, {
desc = "Open Tuxedo",
}){
"RVxLab/tuxedo.nvim",
-- Optional: If you wish to pin the version
sem_version = "^1.0.0",
-- Set up lazy loading with the user command
cmd = "Tuxedo",
-- Set up lazy loading with a keymap
keys = {
{
"<leader>T",
function () require("tuxedo").tuxedo() end,
mode = "n",
desc = "Open Tuxedo",
},
},
---@module "tuxedo"
---@type Tuxedo.Config
opts = {},
}{
"RVxLab/tuxedo.nvim",
-- Optional: If you wish to pin the version
version = "^1.0.0",
-- Set up lazy loading with the user command
cmd = "Tuxedo",
-- Set up lazy loading with a keymap
keys = {
{
"<leader>T",
function () require("tuxedo").tuxedo() end,
mode = "n",
desc = "Open Tuxedo",
},
},
---@module "tuxedo"
---@type Tuxedo.Config
opts = {},
}If you wish to use my mirrored git repo you need to make a couple of small changes:
vim.pack.add({
-- Using `main` branch
- "https://github.com/RVxLab/tuxedo.nvim",
+ "https://code.rvx.works/RVxLab/tuxedo.nvim",
-- If you wish to pin the version
{
- src = "https://github.com/RVxLab/tuxedo.nvim",
+ src = "https://code.rvx.works/RVxLab/tuxedo.nvim",
version = vim.version.range("^1.0.0"),
},
...
}){
- "RVxLab/tuxedo.nvim",
+ src = "https://code.rvx.works/RVxLab/tuxedo.nvim",
-- Optional: If you wish to pin the version
sem_version = "^1.0.0",
-- Set up lazy loading with the user command
cmd = "Tuxedo",
-- Set up lazy loading with a keymap
keys = {
{
"<leader>T",
function () require("tuxedo").tuxedo() end,
mode = "n",
desc = "Open Tuxedo",
},
},
---@module "tuxedo"
---@type Tuxedo.Config
opts = {},
}{
- "RVxLab/tuxedo.nvim",
+ url = "https://code.rvx.works/RVxLab/tuxedo.nvim",
-- Optional: If you wish to pin the version
version = "^1.0.0",
-- Set up lazy loading with the user command
cmd = "Tuxedo",
-- Set up lazy loading with a keymap
keys = {
{
"<leader>T",
function () require("tuxedo").tuxedo() end,
mode = "n",
desc = "Open Tuxedo",
},
},
---@module "tuxedo"
---@type Tuxedo.Config
opts = {},
}This is the default configuration:
---@module "tuxedo"
---@type Tuxedo.Config
{
-- The command to run Tuxedo, passed to `vim.jobstart`. May be a string, string[], a function returning one of either, or `nil`
tuxedo_cmd = "tuxedo",
-- The size ratios for the terminal between 0 and 1
terminal = {
width = 0.85,
height = 0.7,
},
-- The user command by which to invoke Tuxedo. Set to `nil` to disable
command = "Tuxedo",
-- Configuration for the todo file itself
todo_file = {
-- Whether to create the todo file if it doesn't exist
create_if_not_exists = true,
-- The file to open. If it doesn't exist and `create_if_not_exists` is set to `true`, it will be created
file_name = "todo.txt",
},
}If you have more complex checks into determining which tuxedo binary to use, such as when you use Nix or Mise, you can pass a function to the tuxedo_cmd option.
This function must return a string, string[] or nil.
In the case of nil, no floating window will be created and an error will be shown.
For an example how this is used in a config, see tuxedo.lua in my config.
You can change the user command by overriding the command option:
---@module "tuxedo"
---@type Tuxedo.Config
{
command = "MyTuxedo",
}Note: If you do this when using Zpack or Lazy, make sure you also set this command in cmd
Check the examples/ folder for some examples on how you can use this plugin.
- Iogamaster for their tuxedo.nvim which served as a learning reference making this plugin
This plugin is licensed under MIT.