kube-utils-nvim
kube-utils-nvim copied to clipboard
Commands Not Found Despite Proper Configuration
Issue Description
I'm experiencing an issue where the plugin commands are not being recognized by Neovim, despite following the installation instructions from the README. All keymaps are configured correctly, but when triggered, I get the error:
E492: Not an editor command: HelmDependencyUpdateFromBuffer
Environment
- Neovim Version: 0.9.0+ (Lazy.nvim)
- Plugin Manager: lazy.nvim (lua)
- OS: macOS
- Plugin Version: v0.0.4
Dependencies Installed
- ✅ helm (confirmed installed)
- ✅ kubectl (confirmed installed)
- ✅ k9s (confirmed installed)
- ✅ nvim-telescope/telescope.nvim
- ✅ folke/which-key.nvim
Current Configuration
Plugin Configuration (lua/plugins/kube-utils.lua)
return {
{
"h4ckm1n-dev/kube-utils-nvim",
dependencies = { "nvim-telescope/telescope.nvim", "folke/which-key.nvim" },
lazy = true,
event = "VeryLazy",
config = function()
local kube_utils_mappings = {
{ "<leader>k", group = "Kubernetes" },
-- Helm Commands
{ "<leader>kh", group = "Helm" },
{ "<leader>khT", "<cmd>HelmDryRun<CR>", desc = "Helm DryRun Buffer" },
{ "<leader>khb", "<cmd>HelmDependencyBuildFromBuffer<CR>", desc = "Helm Dependency Build" },
{ "<leader>khd", "<cmd>HelmDeployFromBuffer<CR>", desc = "Helm Deploy Buffer to Context" },
{ "<leader>khr", "<cmd>RemoveDeployment<CR>", desc = "Helm Remove Deployment From Buffer" },
{ "<leader>kht", "<cmd>HelmTemplateFromBuffer<CR>", desc = "Helm Template From Buffer" },
{ "<leader>khu", "<cmd>HelmDependencyUpdateFromBuffer<CR>", desc = "Helm Dependency Update" },
-- Kubectl Commands
{ "<leader>kk", group = "Kubectl" },
{ "<leader>kkC", "<cmd>SelectSplitCRD<CR>", desc = "Download CRD Split" },
{ "<leader>kkD", "<cmd>DeleteNamespace<CR>", desc = "Kubectl Delete Namespace" },
{ "<leader>kkK", "<cmd>OpenK9s<CR>", desc = "Open K9s" },
{ "<leader>kka", "<cmd>KubectlApplyFromBuffer<CR>", desc = "Kubectl Apply From Buffer" },
{ "<leader>kkc", "<cmd>SelectCRD<CR>", desc = "Download CRD" },
{ "<leader>kkk", "<cmd>OpenK9sSplit<CR>", desc = "Split View K9s" },
{ "<leader>kkl", "<cmd>ToggleYamlHelm<CR>", desc = "Toggle YAML/Helm" },
-- Logs Commands
{ "<leader>kl", group = "Logs" },
{ "<leader>klf", "<cmd>JsonFormatLogs<CR>", desc = "Format JSON" },
{ "<leader>klv", "<cmd>ViewPodLogs<CR>", desc = "View Pod Logs" },
}
require("which-key").add(kube_utils_mappings)
end,
},
}
Steps Taken
- Initial Configuration: Configured plugin with
lazy = false(didn't work) - Updated Configuration: Changed to
lazy = true, event = "VeryLazy"as per README - Keymap Management: Moved keymaps from global
keymaps.luato plugin config - Dependencies: Verified all required dependencies are installed and available
- Restart: Restarted Neovim multiple times
- Plugin Update: Ensured plugin is on latest version
Expected Behavior
Commands like HelmDependencyUpdateFromBuffer, HelmDryRun, KubectlApplyFromBuffer, etc. should be available and functional when triggered via keymaps.
Actual Behavior
All commands result in:
E492: Not an editor command: [CommandName]
Debug Information
- Which-key shows the keymaps correctly
- No error messages during plugin loading
:Lazyshows plugin is loaded successfully- Commands are not available via
:commandcompletion
Questions
- Setup Function: Does the plugin require an explicit setup call that's not mentioned in the README?
- Load Order: Could this be a plugin loading order issue with Lazy.nvim?
- Command Registration: Are the commands supposed to be registered automatically on plugin load?
- Debugging: What's the best way to debug whether the plugin's commands are being registered?
Additional Context
Using Lazy.nvim as the base configuration. The plugin loads without errors, but none of its commands are available. This suggests the plugin might not be registering its commands properly or there's a configuration step missing from the documentation.
Any help or guidance would be greatly appreciated!