This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use plugin/zellij.lua to define commands (#2)
this removes the need to call `require('zellij').setup({})` to use the default config
- Loading branch information
Showing
3 changed files
with
38 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,27 @@ | ||
vim.api.nvim_create_user_command('ZellijNavigateLeft', function() | ||
require("zellij").zjNavigate('h') | ||
end, { desc = "Navigate left vim window or zellij pane", nargs = 0 }) | ||
vim.api.nvim_create_user_command('ZellijNavigateRight', function() | ||
require("zellij").zjNavigate('l') | ||
end, { desc = "Navigate right vim window or zellij pane", nargs = 0 }) | ||
vim.api.nvim_create_user_command('ZellijNavigateUp', function() | ||
require("zellij").zjNavigate('k') | ||
end, { desc = "Navigate up vim window or zellij pane", nargs = 0 }) | ||
vim.api.nvim_create_user_command('ZellijNavigateDown', function() | ||
require("zellij").zjNavigate('j') | ||
end, { desc = "Navigate down vim window or zellij pane", nargs = 0 }) | ||
vim.api.nvim_create_user_command('ZellijNewPane', function() | ||
require("zellij").newPane() | ||
end, { desc = "New Zellij pane", nargs = 0 }) | ||
vim.api.nvim_create_user_command('ZellijNewTab', function() | ||
require("zellij").newTab() | ||
end, { desc = "New Zellij tab", nargs = 0 }) | ||
vim.api.nvim_create_user_command('ZellijRenamePane', function(opts) | ||
require("zellij").renamePane(opts.args) | ||
end, { desc = "Rename the current Zellij pane", nargs = 1 }) | ||
vim.api.nvim_create_user_command('ZellijRenameTab', function(opts) | ||
require("zellij").renameTab(opts.args) | ||
end, { desc = "Rename the current Zellij tab", nargs = 1 }) | ||
vim.api.nvim_create_user_command('ZellijOpenDebugLog', function() | ||
require("zellij").openDebugLog() | ||
end, { desc = "Rename the current Zellij pane", nargs = 0 }) |