From a4a8e8888f12680a4e0108aae0c83c9481adb26d Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Sat, 28 Sep 2024 12:33:23 +0200 Subject: [PATCH] doc(sshd_config): Add more documentation --- handlers/sshd_config/fields/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/handlers/sshd_config/fields/README.md b/handlers/sshd_config/fields/README.md index 00637d9..45a9ac8 100644 --- a/handlers/sshd_config/fields/README.md +++ b/handlers/sshd_config/fields/README.md @@ -4,4 +4,18 @@ This folder contains the glue between the config documentation and our language server. `fields.go` usually contains a list of all the available options / fields -the config file offers. \ No newline at end of file +the config file offers. + +It's usually a map of: + +``` +OptionName: docValue +``` + +A docvalue is a simple parser that can validate the value and fetch completions for it. +You should use a docvalue for most types. See `doc-values` for all available docvalues. + +However, some types are so complex or require more context to validate or fetch completions, +that we need to write a custom function for it. In that case we do it dirty and simply check +in the completions if the key is the one we are looking for, and then execute the custom function. +```