Conversation
Code ReviewOverviewThis PR makes two independent improvements:
Positive observations
Issues & suggestions1. Inconsistent doc coverage (text.rs) Stack-effect notation was added to 4 string builtins but not the remaining two in the same block: docs.insert("string.empty?", "Check if string is empty.");
docs.insert("string.equal?", "Check if two strings are equal.");Expected additions:
If you're establishing a notation convention, it should be applied uniformly in the same commit — partial adoption makes the docs look inconsistent to users. 2. Punctuation inconsistency in doc strings The updated entries use a semicolon to join two clauses ( 3. PR title
4. No tests for the OPERATOR kind change There are no new or updated tests verifying that completion items carry assert_eq!(item.kind, Some(CompletionItemKind::OPERATOR));5. Minor: OPERATOR vs. alternative kinds
Summary
The core logic is correct. Addressing the doc inconsistency and adding at least a minimal test for the completion kind would make this mergeable with confidence. |
- crates/compiler/src/builtins/text.rs — string.empty? and string.equal? got their stack-effect notation; string.find and string.split lost the semicolon in favor of two periods, matching the existing house style. - crates/lsp/src/completion.rs — new test_word_completion_kind_is_operator walks every builtin completion, skips KEYWORD items (the if/else/then/etc. group), and asserts the rest are OPERATOR. Locks in the fix against future regressions.
Code Review (updated)OverviewThis PR makes two well-scoped improvements:
What's improved since the last review
Remaining issues1. Test coverage gap — third completion path untested The test calls Suggestion: extract a small helper that asserts every non-KEYWORD 2. Type-name capitalisation inconsistency in doc strings The stack-effect signatures use mixed capitalisation:
Pick one convention. Since 3. PR title
Minor / optional observations
Summary
The core fix is correct and the comment quality is good. Addressing the capitalisation inconsistency and third-path test gap would make this solid. |
No description provided.