Skip to content

Neovim plugin designed to synchronize Kubernetes Custom Resource Definitions (CRDs) with your Neovim setup

License

Notifications You must be signed in to change notification settings

anasinnyk/nvim-k8s-crd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

nvim-k8s-crd

nvim-k8s-crd is a Neovim plugin designed to synchronize Kubernetes Custom Resource Definitions (CRDs) with your Neovim setup, providing autosuggestions and schema validation for Kubernetes manifests based on the current context.

Features

  • Sync Kubernetes CRDs based on the current Kubernetes context.
  • Store CRD schemas locally.
  • Provide autosuggestions and schema validation for Kubernetes manifests.
  • Commands to sync schemas.

Installation

use {
  'anasinnyk/nvim-k8s-crd',
  requires = { 'neovim/nvim-lspconfig' },
  config = function()
    require('k8s-crd').setup({
      cache_dir = "~/.cache/k8s-schemas/",  -- Local directory relative to the current working directory
      k8s = {
        file_mask = "*.yaml",
      },
    })
  end
}

Using lazy.nvim

use {
  'anasinnyk/nvim-k8s-crd',
  event = { 'BufEnter *.yaml' },
  dependencies = { 'neovim/nvim-lspconfig' },
  config = function()
    require('k8s-crd').setup({
      cache_dir = vim.fn.expand("~/.cache/k8s-schemas/"),
      k8s = {
        file_mask = "*.yaml",
      },
    })
  end
}

Configuration

require('k8s_crd').setup({
  cache_dir = "./.k8s-schemas/",  -- Local directory relative to the current working directory
  k8s = {
    file_mask = "*.yaml",  -- File mask to match Kubernetes manifests
  },
})

Setting k8s.file_mask to nil will disable the automatic matcher (you can use yaml-companion for setting a smarter matcher).

Commands

  • :K8SSchemasGenerate - Sync CRDs based on the current Kubernetes context.

License

MIT License

About

Neovim plugin designed to synchronize Kubernetes Custom Resource Definitions (CRDs) with your Neovim setup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages