Skip to content

Commit

Permalink
do not use jsdoc detail when it has no argument, and function does, ref
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed May 23, 2024
1 parent cccc8f6 commit 6f26b2e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions server/src/fallout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const sslExt = ".ssl";
export async function loadHeaders(
headersDirectory: string,
external = false,
staticHover: hover.HoverMap = new Map()
staticHover: hover.HoverMap = new Map(),
) {
const completions: completion.CompletionListEx = [];
const hovers: hover.HoverMapEx = new Map();
Expand All @@ -71,7 +71,7 @@ export async function loadHeaders(
headerFiles,
headersDirectory,
loadFileData,
external
external,
);

if (errors.length > 0) {
Expand Down Expand Up @@ -353,7 +353,9 @@ function findSymbols(text: string) {
// if jsdoc found
if (m[2]) {
const jsd = jsdoc.parse(m[2]);
procDetail = jsdocToDetail(procName, jsd);
if (!(m[6] && jsd.args.length == 0)) {
procDetail = jsdocToDetail(procName, jsd);
}
const item = { label: procName, detail: procDetail, jsdoc: jsd };
procList.push(item);
} else {
Expand Down Expand Up @@ -638,7 +640,7 @@ export function compile(uri: string, sslSettings: SSLsettings, interactive = fal
if (fs.existsSync(tmpPath)) {
fs.unlinkSync(tmpPath);
}
}
},
);
}

Expand Down

0 comments on commit 6f26b2e

Please sign in to comment.