chore(sshd_config): Add some documentation

This commit is contained in:
Myzel394 2024-09-17 23:50:50 +02:00
parent 9ed983bf81
commit 99339f3edd
No known key found for this signature in database
GPG Key ID: DEC4AAB876F73185
7 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,6 @@
# /sshd_config
This is the root directory for each of the handlers.
This folder should only contain the antlr grammar file,
shared libraries, variables, etc. and folders for each
logic part.

View File

@ -0,0 +1,3 @@
# /sshd_config/analyzer
This folder analyzes the config file and returns errors, warnings, and suggestions.

View File

@ -0,0 +1,16 @@
# /sshd_config/ast
This folder contains the AST (Abstract Syntax Tree) for the handlers.
The AST is defined in a filename that's the same as the handler's name.
Each AST node must extend the following fields:
```go
type ASTNode struct {
common.LocationRange
Value commonparser.ParsedString
}
```
Each node should use a shared prefix for the node name,
e.g. `SSHDConfig`, `SSDKey` for the `sshd_config` handler.

View File

@ -0,0 +1,7 @@
# /sshd_config/fields
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.

View File

@ -0,0 +1,5 @@
# /sshd_config/handlers
This folder contains the actual logic for the LSP commands.
Stuff like fetching completions, executing commands, getting hover
definitions, etc. should be done here.

View File

@ -0,0 +1,9 @@
# /sshd_config/indexers
This folder contains logic for indexing the AST.
Creating the indexer fulfills two purposes:
* Creating actual indexes
* Validating some logic
The indexer also validates stuff like checking for duplicate values, etc.

View File

@ -0,0 +1,7 @@
# /sshd_config/lsp
This folder is the glue between our language server and the LSP
clients.
This folder only contains LSP commands.
It only handles very little actual logic, and instead calls
the handlers from `../handlers`.