This telescope.nvim
extension providers two pickers for the following kubeclt
commands:
kubectl get crossplane
kubectl get managed
- Neovim (=>v0.9.0)
- telescope.nvim
kubectl
You can install the extension by using your plugin manager of choice or by
cloning this repository somewhere on your filepath, and then adding the
following somewhere after telescope in your configuration file (init.vim
or
init.lua
).
Using packer.nvim
use "Piotr1215/telescope-crossplane.nvim"
require("telescope").load_extension("telescope-crossplane")
There are two commands available:
: Telescope telescope-crossplane crossplane_managed
: Telescope telescope-crossplane crossplane_resources
It might take a while to load the resources, so be patient. Once the resources are loaded, you can use the picker to edit the resource YAML in a new terminal buffer.
The new buffer will auto close once you save and exit the buffer without errors.
In case of errors, the buffer will stay open, and the error message from
kubectl
will be shown.
The plugin doesn't define any keymaps to avoid conflicts. To add keymaps, you can
add the following to your init.vim
or init.lua
. The following example uses
<Leader>tcm
and <Leader>tcr
, but you can use any keymaps you want.
vim.keymap.set("n", "<Leader>tcm", ":Telescope telescope-crossplane crossplane_managed<CR>")
vim.keymap.set("n", "<Leader>tcr", ":Telescope telescope-crossplane crossplane_resources<CR>")
Add this do your init.vim
or init.lua
to load the plugin from the local environment:
vim.opt.runtimepath:prepend("~/.../crossplane-telescope.nvim")
- Add
KUBECONFIG
support - Add
kubectl
pass through support so the picker can select any resource