Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/serverprotocol/PasLS.ClientProfile.pas
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ interface
cfExcludeInterfaceMethodDecls, // Don't include method/function/procedure declarations from interface section
cfExcludeImplClassDefs, // Don't include class definitions from implementation section
cfNullDocumentVersion, // Use nil instead of 0 for document version
cfFilterTextOnly // Only set filterText in completion, not label
cfFilterTextOnly, // Only set filterText in completion, not label
cfUseSecondaryText // Use secondaryText field in completion items
);
TClientFeatures = set of TClientFeature;

Expand Down Expand Up @@ -78,7 +79,8 @@ implementation
'excludeInterfaceMethodDecls',
'excludeImplClassDefs',
'nullDocumentVersion',
'filterTextOnly'
'filterTextOnly',
'useSecondaryText'
);

function TryStrToFeature(const S: string; out F: TClientFeature): Boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/serverprotocol/PasLS.Completion.pas
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ procedure TCompletionItemHelper.SetPrimaryText(text: string);

procedure TCompletionItemHelper.SetSecondaryText(text: string);
begin
if not TClientProfile.Current.HasFeature(cfFilterTextOnly) then
&label := text;
if (not TClientProfile.Current.HasFeature(cfFilterTextOnly)) and TClientProfile.Current.HasFeature(cfUseSecondaryText) then
&label := &label + ' ' + text;
end;


Expand Down