Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP incorrectly formatted JSDoc in code completions #23820

Open
2 tasks
Hajime-san opened this issue May 15, 2024 · 0 comments
Open
2 tasks

LSP incorrectly formatted JSDoc in code completions #23820

Hajime-san opened this issue May 15, 2024 · 0 comments
Labels
bug Something isn't working lsp related to the language server

Comments

@Hajime-san
Copy link
Contributor

Hajime-san commented May 15, 2024

Version: Deno 1.43.3

reproduce

To type add on any other add.ts typescript files.

  • add.ts
/**
 *
 * @example
 * ```ts
 * const result = add(1, 2);
 * console.log(result); // 3
 * ```
 *
 * @param {number} a - The first number
 * @param {number} b - The second number
 */
export function add(a: number, b: number) {
  return a + b;
}

actual behaviour

2024-05-15-actual

Note

But it seems to be ok the MarkupContent when I hover over it.

expected behaviour

% node --version
v20.12.0

% cat package.json    
{
  "name": "test",
  "type": "module",
  "devDependencies": {
    "@types/node": "20.11.17",
    "typescript": "5.3.3"
  }
}
2024-05-15-02-expected

Tracking issue

@Hajime-san Hajime-san changed the title LSP JSDoc on completion response seems to be broken LSP improve JSDoc May 15, 2024
@dsherret dsherret added bug Something isn't working lsp related to the language server labels May 15, 2024
@dsherret dsherret changed the title LSP improve JSDoc LSP incorrectly formatted JSDoc in code completions May 15, 2024
nathanwhit pushed a commit that referenced this issue May 22, 2024
#23822)

partially fixing #23820


https://github.com/denoland/deno/assets/41257923/0adb5d4e-cfd5-4195-9045-19d1c0a07a43

BTW, it is out of scope on this PR that to process type of `@param` to
be an code block due to it's a bit complicated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp related to the language server
Projects
None yet
Development

No branches or pull requests

2 participants