From 3e1bd63330e145e1ab2dfd124809782896334084 Mon Sep 17 00:00:00 2001 From: Dave Holoway Date: Tue, 30 Jun 2020 00:44:23 +0100 Subject: [PATCH] hide some method modifiers which aren't useful to show --- langserver/completions.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/langserver/completions.js b/langserver/completions.js index 3f9ebe3..14e1277 100644 --- a/langserver/completions.js +++ b/langserver/completions.js @@ -58,7 +58,6 @@ function getTypedNameCompletion(typemap, type_signature, opts, typelist) { */ function shouldInclude(modifiers, t) { if (opts.statics !== modifiers.includes('static')) return; - if (modifiers.includes('abstract')) return; if (modifiers.includes('public')) return true; if (modifiers.includes('protected')) return true; if (modifiers.includes('private') && t === type) return true; @@ -387,7 +386,7 @@ function resolveCompletionItem(item) { documentation = field.docs; header = `${field.type.simpleTypeName} **${field.name}**`; } else if (method) { - detail = `${method.modifiers.join(' ')} ${t.simpleTypeName}.${method.name}`; + detail = `${method.modifiers.filter(m => !/abstract|transient|native/.test(m)).join(' ')} ${t.simpleTypeName}.${method.name}`; documentation = method.docs; header = method.shortlabel.replace(/^\w+/, x => `**${x}**`).replace(/^(.+?)\s*:\s*(.+)/, (_,a,b) => `${b} ${a}`); } else {