From ddbed43a7dc9e928351e8e687d8ac309da2a58b1 Mon Sep 17 00:00:00 2001 From: XeroOl Date: Mon, 12 Feb 2024 21:41:32 -0600 Subject: [PATCH] changing some comments and doc comments --- src/fennel-ls/compiler.fnl | 1 + src/fennel-ls/formatter.fnl | 2 +- src/fennel-ls/language.fnl | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/fennel-ls/compiler.fnl b/src/fennel-ls/compiler.fnl index 4b13a76..5e40e41 100644 --- a/src/fennel-ls/compiler.fnl +++ b/src/fennel-ls/compiler.fnl @@ -283,6 +283,7 @@ identifiers are declared / referenced in which places." : symbol-to-expression : call : destructure + ;; : macroexpand ;; :fn fn-hook ;; :do there's a do hook ;; :chunk I don't know what this one is diff --git a/src/fennel-ls/formatter.fnl b/src/fennel-ls/formatter.fnl index 9302332..5c38c05 100644 --- a/src/fennel-ls/formatter.fnl +++ b/src/fennel-ls/formatter.fnl @@ -95,7 +95,7 @@ fntype is one of fn or λ or lambda" :Constant 21 :Struct 22 :Event 23 :Operator 24 :TypeParameter 25}) (λ completion-item-format [label def] - "make a completion item" + "Makes a completion item" (doto (case (analyze-fn def.definition) {:fntype _} {: label diff --git a/src/fennel-ls/language.fnl b/src/fennel-ls/language.fnl index d9c8462..06cd8de 100644 --- a/src/fennel-ls/language.fnl +++ b/src/fennel-ls/language.fnl @@ -31,10 +31,10 @@ In the code example above, a search on the final symbol `z` would normally find the definition `10`, but if `opts.stop-early?` is set, it would find {:binding z :definition y}, referring to the `(local z y)` binding. -# A document: `{? ?*}` +# A document: `{:metadata {:fnl/docstring _ :fnl/arglist ?_ :fnl-ls/fields ?_}}` A document is a definition that doesn't come from user code. For example, -searching `table.insert` will find a document, because we have info about it, -but that info does +searching `table.insert` will find a document, but that info does not come from +a user-written file. " (local {: sym? : list? : sequence? : varg? : sym} (require :fennel)) @@ -59,6 +59,7 @@ but that info does stack) (λ stack-add-multisym! [stack symbol] + "add the multisy values to the end of the stack in reverse order" (stack-add-split! stack (utils.multi-sym-split symbol))) (λ search-val [self file ast stack opts] @@ -208,6 +209,7 @@ but that info does (+ 1 (get-ast-info ?ast :byteend)))))) (λ find-symbol [ast byte] + "tries to find a sym, and a list of all of its parents/grandparents" (local parents [ast]) (λ recurse [ast] (if