feat: support doc comments for functions args and validator params

- Add support to the formatter for these doc comments
- Add a new field to `Arg` `doc: Option<String>`
- Don't attach docs immediately after typechecking a module
  - instead we should do it on demand in docs, build, and lsp
  - the check command doesn't need to have any docs attached
  - doing it more lazily defers the computation until later making
    typechecking feedback a bit faster
- Add support for function arg and validator param docs in
  `attach_module_docs` methods
- Update some snapshots
- Add put_doc to Arg

closes #685
This commit is contained in:
rvcas
2023-10-16 13:33:14 -04:00
parent 10b9dc2042
commit e5801f9c19
16 changed files with 205 additions and 34 deletions

View File

@@ -42,7 +42,7 @@ impl LspProject {
let modules = self.project.modules();
for module in modules.into_iter() {
for mut module in modules.into_iter() {
let path = module
.input_path
.canonicalize()
@@ -55,6 +55,8 @@ impl LspProject {
let source = SourceInfo { path, line_numbers };
module.attach_doc_and_module_comments();
self.sources.insert(module.name.to_string(), source);
self.modules.insert(module.name.to_string(), module);
}