77} from "vscode" ;
88import { RequestType } from "vscode-languageclient" ;
99import { LanguageClient } from "vscode-languageclient/node" ;
10- import Settings = require ( "../settings" ) ;
10+ import { ISettings , CommentType , getSettings } from "../settings" ;
1111import { LanguageClientConsumer } from "../languageClientConsumer" ;
1212
1313// eslint-disable-next-line @typescript-eslint/no-empty-interface
@@ -27,13 +27,13 @@ enum SearchState { Searching, Locked, Found }
2727export class HelpCompletionFeature extends LanguageClientConsumer {
2828 private helpCompletionProvider : HelpCompletionProvider | undefined ;
2929 private disposable : Disposable | undefined ;
30- private settings : Settings . ISettings ;
30+ private settings : ISettings ;
3131
3232 constructor ( ) {
3333 super ( ) ;
34- this . settings = Settings . load ( ) ;
34+ this . settings = getSettings ( ) ;
3535
36- if ( this . settings . helpCompletion !== Settings . CommentType . Disabled ) {
36+ if ( this . settings . helpCompletion !== CommentType . Disabled ) {
3737 this . helpCompletionProvider = new HelpCompletionProvider ( ) ;
3838 this . disposable = workspace . onDidChangeTextDocument ( async ( e ) => { await this . onEvent ( e ) ; } ) ;
3939 }
@@ -125,11 +125,11 @@ class HelpCompletionProvider {
125125 private lastChangeRange : Range | undefined ;
126126 private lastDocument : TextDocument | undefined ;
127127 private langClient : LanguageClient | undefined ;
128- private settings : Settings . ISettings ;
128+ private settings : ISettings ;
129129
130130 constructor ( ) {
131131 this . triggerFinderHelpComment = new TriggerFinder ( "##" ) ;
132- this . settings = Settings . load ( ) ;
132+ this . settings = getSettings ( ) ;
133133 }
134134
135135 public get triggerFound ( ) : boolean {
@@ -161,7 +161,7 @@ class HelpCompletionProvider {
161161 const result = await this . langClient . sendRequest ( CommentHelpRequestType , {
162162 documentUri : doc . uri . toString ( ) ,
163163 triggerPosition : triggerStartPos ,
164- blockComment : this . settings . helpCompletion === Settings . CommentType . BlockComment ,
164+ blockComment : this . settings . helpCompletion === CommentType . BlockComment ,
165165 } ) ;
166166
167167 if ( result . content . length === 0 ) {
0 commit comments