nushell/crates/nu-lsp/src
zc he 41f4d0dcbc
refactor(lsp): align markdown doc string with output of --help (#15508)
#15499 reminds me of the discrepancies between lsp hover docs and
`--help` outputs.

# Description

# User-Facing Changes

Before:

<img width="610" alt="image"
src="https://github.com/user-attachments/assets/f73f7ace-5c1b-4380-9921-fb4783bdb187"
/>

After:

<img width="610" alt="image"
src="https://github.com/user-attachments/assets/96de3ffe-e37b-41b1-88bb-123eeb72ced2"
/>

Output of `if -h` as a reference:

```
Usage:
  > if <cond> <then_block> (else <else_expression>)

Flags:
  -h, --help: Display the help message for this command

Parameters:
  cond <variable>: Condition to check.
  then_block <block>: Block to run if check succeeds.
  "else" + <one_of(block, expression)>: Expression or block to run when the condition is false. (optional)

```

# Tests + Formatting

Refined

# After Submitting
2025-04-06 08:37:59 -05:00
..
ast.rs refactor: command identified by name instead of span content (#15471) 2025-04-02 13:12:38 +02:00
completion.rs fix(lsp): keywords in completion snippets (#15499) 2025-04-06 08:36:59 -05:00
diagnostics.rs fix(lsp): more accurate PWD: from env -> parent dir of current file (#15470) 2025-04-05 08:41:34 -05:00
goto.rs fix(lsp): more accurate PWD: from env -> parent dir of current file (#15470) 2025-04-05 08:41:34 -05:00
hints.rs fix(lsp): completion of commands defined after the cursor (#15188) 2025-03-01 06:21:53 -06:00
hover.rs refactor(lsp): align markdown doc string with output of --help (#15508) 2025-04-06 08:37:59 -05:00
lib.rs fix(lsp): more accurate PWD: from env -> parent dir of current file (#15470) 2025-04-05 08:41:34 -05:00
notification.rs refactor(lsp): align markdown doc string with output of --help (#15508) 2025-04-06 08:37:59 -05:00
semantic_tokens.rs refactor(lsp): span fix made easy by bumping lsp-textdocument to 0.4.2 (#15287) 2025-03-11 06:13:58 -05:00
signature.rs refactor(lsp): align markdown doc string with output of --help (#15508) 2025-04-06 08:37:59 -05:00
symbols.rs fix(lsp): more accurate PWD: from env -> parent dir of current file (#15470) 2025-04-05 08:41:34 -05:00
workspace.rs fix(lsp): more accurate PWD: from env -> parent dir of current file (#15470) 2025-04-05 08:41:34 -05:00