File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/jupyterlab-lsp/src Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ export class LanguageServerManager implements ILanguageServerManager {
23
23
private _retries : number ;
24
24
private _retriesInterval : number ;
25
25
private _configuration : TLanguageServerConfigurations ;
26
+ private _warningsEmitted = new Set < string > ( ) ;
26
27
private console : ILSPLogConsole ;
27
28
28
29
constructor ( options : ILanguageServerManager . IOptions ) {
@@ -52,12 +53,19 @@ export class LanguageServerManager implements ILanguageServerManager {
52
53
this . _configuration = configuration ;
53
54
}
54
55
56
+ protected warnOnce ( arg : string ) {
57
+ if ( ! this . _warningsEmitted . has ( arg ) ) {
58
+ this . _warningsEmitted . add ( arg ) ;
59
+ this . console . warn ( arg ) ;
60
+ }
61
+ }
62
+
55
63
protected _comparePriorities ( a : TLanguageServerId , b : TLanguageServerId ) {
56
64
const DEFAULT_PRIORITY = 50 ;
57
65
const a_priority = this . _configuration [ a ] ?. priority ?? DEFAULT_PRIORITY ;
58
66
const b_priority = this . _configuration [ b ] ?. priority ?? DEFAULT_PRIORITY ;
59
67
if ( a_priority == b_priority ) {
60
- this . console . warn (
68
+ this . warnOnce (
61
69
`Two matching servers: ${ a } and ${ b } have the same priority; choose which one to use by changing the priority in Advanced Settings Editor`
62
70
) ;
63
71
return a . localeCompare ( b ) ;
You can’t perform that action at this time.
0 commit comments