Skip to content

Commit

Permalink
chore(build): auto-generate vimdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 21, 2023
1 parent 2331c9b commit 93698f5
Showing 1 changed file with 30 additions and 17 deletions.
47 changes: 30 additions & 17 deletions doc/kustomize.nvim.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*kustomize.nvim.txt* For Neovim >= 0.9.0 Last change: 2023 October 15
*kustomize.nvim.txt* For Neovim >= 0.9.0 Last change: 2023 October 21

==============================================================================
Table of Contents *kustomize.nvim-table-of-contents*
Expand Down Expand Up @@ -27,7 +27,7 @@ REQUIREMENTS *kustomize.nvim-requirements*

QUICKSTART *kustomize.nvim-quickstart*

With Packer:
With Packer

>lua
use({
Expand All @@ -49,10 +49,10 @@ With Lazy
ft = "yaml",
config = true,
}

Run `:checkhealth kustomize` for a health check.
<

Run `:checkhealth kustomize` for a health check.


DEFAULT MAPPINGS *kustomize.nvim-default-mappings*

Expand All @@ -75,7 +75,8 @@ DEFAULT MAPPINGS *kustomize.nvim-default-mappings*
n <leader>kd Check API lua require("kustomize").deprecations() :KustomizeDeprecations
deprecations
----------------------------------------------------------------------------------------------------------
You can define your own keybindings/override the default mappings:
You can define your own keybindings/override the default mappings, for
instance:

>lua
use({
Expand Down Expand Up @@ -122,22 +123,34 @@ USE CASES *kustomize.nvim-use-cases*
BUILD MANIFESTS ~

ShowcaseThis command will run `kustomize build .` in the current buffer’s directory.
The generated YAML will printed to a new buffer. The new buffer can be closed
by just typing `q`. This allows me to quickly inspect the YAML that Kustomize
generates (and ultimately is applied to the cluster). In addition, I get fast
feedback on any errors in my YAML sources.
The generated YAML will be printed to a new buffer. The new buffer can be
closed by just typing `q`. This allows me to quickly inspect the YAML that
Kustomize generates (and ultimately is applied to the cluster). In addition, I
get fast feedback on any errors in my YAML sources.


LIST “KINDS” ~

ShowcaseSometimes, I just want to roughly check the YAMLs generated by Kustomize. A
good hint is to check the `kind:` key of the generated YAML manifests. This
command will parse all `kind:` keys with the help of tree-sitter in the current
buffer and prints their values to a new buffer. The new buffer can be closed by
just typing `q`. You could use it on any YAML file with multiple resources, for
instance generated by |kustomize.nvim-build-manifests|. Only Resources with
`metadata.name` are recognized, e.g. `Kustomization` resources are not
detected.
command will parse all `kind:` keys in the current buffer with the help of
tree-sitter and prints their values to a loclist allowing you to easily jump
around all resources. You could use it on any YAML file with multiple
resources, for instance generated by |kustomize.nvim-build-manifests|. Only
Resources with `metadata.name` are recognized, e.g. `Kustomization` resources
are not detected.

The output consists of `<the buffer name> |<the line nr>| <which kind> <name>
<namespace>`. Cluster-wide resources omit the namespace value. You can hide the
buffer name and line number by adding the following snippet to the opts table:

>lua
kinds = {
-- setting those to false removes "clutter" but you cannot "jump" to a resource anymore
show_filepath = false,
show_line = false,
},
<


OPEN FILE/DIRECTORY ~
Expand All @@ -156,7 +169,7 @@ final manifests like so:
<

In order to quickly check/edit those included YAMLs this command will go
through all items in `resources:` and populate a quickfix list with them.
through all items in `resources:` and populate a loclist with them.


PRINT RESOURCE FILES ~
Expand All @@ -179,7 +192,7 @@ not (yet) saved, e.g. the output of |kustomize.nvim-build-manifests|.
CHECK FOR DEPRECATIONS ~

Showcasekubent <https://github.com/doitintl/kube-no-trouble> is a tool to search for
deprecated Kubernetes APIs. This plugins utilizes the plugin to check the
deprecated Kubernetes APIs. This plugin utilizes the plugin to check the
manifests in the current buffer for deprecated Kubernetes APIs. The buffer’s
content may be a file on disk or content not (yet) saved, e.g. the output of
|kustomize.nvim-build-manifests|. The Kubernetes target version can be set with
Expand Down

0 comments on commit 93698f5

Please sign in to comment.