ace-linters 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ace-language-client.d.ts +108 -65
- package/build/ace-language-client.js +1177 -1107
- package/build/ace-linters.d.ts +108 -65
- package/build/ace-linters.js +1173 -1104
- package/build/base-service.js +32 -7
- package/build/css-service.js +41 -16
- package/build/html-service.js +33 -8
- package/build/javascript-service.js +32 -7
- package/build/json-service.js +34 -9
- package/build/language-client.d.ts +1 -1
- package/build/language-client.js +47 -25
- package/build/lua-service.js +32 -7
- package/build/php-service.js +32 -7
- package/build/service-manager.js +25 -6
- package/build/typescript-service.js +32 -7
- package/build/xml-service.js +32 -7
- package/build/yaml-service.js +33 -8
- package/package.json +1 -1
|
@@ -590,7 +590,6 @@ export interface ProviderOptions {
|
|
|
590
590
|
codeActions?: boolean;
|
|
591
591
|
};
|
|
592
592
|
markdownConverter?: MarkDownConverter;
|
|
593
|
-
requireFilePath?: boolean;
|
|
594
593
|
workspacePath?: string;
|
|
595
594
|
aceComponents?: {
|
|
596
595
|
"InlineAutocomplete"?: typeof InlineAutocomplete;
|
|
@@ -598,6 +597,17 @@ export interface ProviderOptions {
|
|
|
598
597
|
"CompletionProvider"?: typeof CompletionProvider;
|
|
599
598
|
};
|
|
600
599
|
}
|
|
600
|
+
export interface SessionInitialConfig {
|
|
601
|
+
/**
|
|
602
|
+
* The associated file path for the session
|
|
603
|
+
*/
|
|
604
|
+
filePath: string;
|
|
605
|
+
/**
|
|
606
|
+
* Determines if the editor should join the workspace URI
|
|
607
|
+
* @default `false`
|
|
608
|
+
*/
|
|
609
|
+
joinWorkspaceURI?: boolean;
|
|
610
|
+
}
|
|
601
611
|
export type ServiceFeatures = {
|
|
602
612
|
[feature in SupportedFeatures]?: boolean;
|
|
603
613
|
};
|
|
@@ -721,6 +731,66 @@ declare class MarkerGroup {
|
|
|
721
731
|
setMarkers(markers: any): void;
|
|
722
732
|
update(html: any, markerLayer: any, session: any, config: any): void;
|
|
723
733
|
}
|
|
734
|
+
declare class SessionLanguageProvider {
|
|
735
|
+
session: Ace.EditSession;
|
|
736
|
+
documentUri: string;
|
|
737
|
+
private $messageController;
|
|
738
|
+
private $deltaQueue;
|
|
739
|
+
private $isConnected;
|
|
740
|
+
private $options?;
|
|
741
|
+
private $filePath;
|
|
742
|
+
private $servicesCapabilities?;
|
|
743
|
+
private $requestsQueue;
|
|
744
|
+
state: {
|
|
745
|
+
occurrenceMarkers: MarkerGroup | null;
|
|
746
|
+
diagnosticMarkers: MarkerGroup | null;
|
|
747
|
+
};
|
|
748
|
+
private extensions;
|
|
749
|
+
editor: Ace.Editor;
|
|
750
|
+
private semanticTokensLegend?;
|
|
751
|
+
private $provider;
|
|
752
|
+
/**
|
|
753
|
+
* Constructs a new instance of the `SessionLanguageProvider` class.
|
|
754
|
+
*
|
|
755
|
+
* @param provider - The `LanguageProvider` instance.
|
|
756
|
+
* @param session - The Ace editor session.
|
|
757
|
+
* @param editor - The Ace editor instance.
|
|
758
|
+
* @param messageController - The `IMessageController` instance for handling messages.
|
|
759
|
+
* @param config
|
|
760
|
+
*/
|
|
761
|
+
constructor(provider: LanguageProvider, session: Ace.EditSession, editor: Ace.Editor, messageController: IMessageController, config?: SessionInitialConfig);
|
|
762
|
+
enqueueIfNotConnected(callback: () => void): void;
|
|
763
|
+
get comboDocumentIdentifier(): ComboDocumentIdentifier;
|
|
764
|
+
/**
|
|
765
|
+
* Sets the file path for the current document and optionally joins it with the workspace URI.
|
|
766
|
+
* Increments the document version and updates the internal document URI and identifier.
|
|
767
|
+
*
|
|
768
|
+
* @param {string} filePath - The new file path for the document.
|
|
769
|
+
* @param {boolean} [joinWorkspaceURI] - Optional flag to indicate whether to join the file path with the workspace URI.
|
|
770
|
+
*/
|
|
771
|
+
setFilePath(filePath: string, joinWorkspaceURI?: boolean): void;
|
|
772
|
+
private $init;
|
|
773
|
+
addSemanticTokenSupport(session: Ace.EditSession): void;
|
|
774
|
+
private $connected;
|
|
775
|
+
private $changeMode;
|
|
776
|
+
setServerCapabilities: (capabilities: {
|
|
777
|
+
[serviceName: string]: lsp.ServerCapabilities;
|
|
778
|
+
}) => void;
|
|
779
|
+
private initDocumentUri;
|
|
780
|
+
private get $extension();
|
|
781
|
+
private get $mode();
|
|
782
|
+
private get $format();
|
|
783
|
+
private $changeListener;
|
|
784
|
+
$sendDeltaQueue: (callback?: any) => any;
|
|
785
|
+
$showAnnotations: (diagnostics: lsp.Diagnostic[]) => void;
|
|
786
|
+
setOptions<OptionsType extends ServiceOptions>(options: OptionsType): void;
|
|
787
|
+
validate: () => void;
|
|
788
|
+
format: () => void;
|
|
789
|
+
applyEdits: (edits: lsp.TextEdit[]) => void;
|
|
790
|
+
getSemanticTokens(): void;
|
|
791
|
+
$applyDocumentHighlight: (documentHighlights: lsp.DocumentHighlight[]) => void;
|
|
792
|
+
closeDocument(callback?: any): void;
|
|
793
|
+
}
|
|
724
794
|
declare class LanguageProvider {
|
|
725
795
|
activeEditor: Ace.Editor;
|
|
726
796
|
private readonly $messageController;
|
|
@@ -735,7 +805,6 @@ declare class LanguageProvider {
|
|
|
735
805
|
[uri: string]: string;
|
|
736
806
|
};
|
|
737
807
|
workspaceUri: string;
|
|
738
|
-
requireFilePath: boolean;
|
|
739
808
|
private $lightBulbWidgets;
|
|
740
809
|
private stylesEmbedded;
|
|
741
810
|
private inlineCompleter?;
|
|
@@ -743,7 +812,7 @@ declare class LanguageProvider {
|
|
|
743
812
|
private completerAdapter?;
|
|
744
813
|
private constructor();
|
|
745
814
|
/**
|
|
746
|
-
* Creates LanguageProvider using our transport protocol with ability to register different services on same
|
|
815
|
+
* Creates LanguageProvider using our transport protocol with the ability to register different services on the same
|
|
747
816
|
* webworker
|
|
748
817
|
* @param {Worker} worker
|
|
749
818
|
* @param {ProviderOptions} options
|
|
@@ -770,19 +839,29 @@ declare class LanguageProvider {
|
|
|
770
839
|
setProviderOptions(options?: ProviderOptions): void;
|
|
771
840
|
private checkInlineCompletionAdapter;
|
|
772
841
|
/**
|
|
773
|
-
*
|
|
774
|
-
*
|
|
842
|
+
* Sets the file path for the given Ace edit session. Optionally allows the file path to
|
|
843
|
+
* be joined with the workspace URI.
|
|
844
|
+
*
|
|
845
|
+
* @param session The Ace edit session to update with the file path.
|
|
846
|
+
* @param config config to set
|
|
775
847
|
*/
|
|
776
|
-
setSessionFilePath(session: Ace.EditSession,
|
|
848
|
+
setSessionFilePath(session: Ace.EditSession, config: SessionInitialConfig): void;
|
|
777
849
|
private $registerSession;
|
|
778
850
|
private $getSessionLanguageProvider;
|
|
779
851
|
private $getFileName;
|
|
780
852
|
/**
|
|
781
|
-
* Registers an Ace editor instance with the
|
|
782
|
-
*
|
|
853
|
+
* Registers an Ace editor instance along with the session's configuration settings.
|
|
854
|
+
*
|
|
855
|
+
* @param editor - The Ace editor instance to be registered.
|
|
856
|
+
* @param [config] - Configuration options for the session.
|
|
783
857
|
*/
|
|
784
|
-
registerEditor(editor: Ace.Editor): void;
|
|
858
|
+
registerEditor(editor: Ace.Editor, config?: SessionInitialConfig): void;
|
|
785
859
|
codeActionCallback: (codeActions: CodeActionsByService[]) => void;
|
|
860
|
+
/**
|
|
861
|
+
* Sets a callback function that will be triggered with an array of code actions grouped by service.
|
|
862
|
+
*
|
|
863
|
+
* @param {function} callback - A function that receives an array of code actions, categorized by service, as its argument.
|
|
864
|
+
*/
|
|
786
865
|
setCodeActionCallback(callback: (codeActions: CodeActionsByService[]) => void): void;
|
|
787
866
|
executeCommand(command: string, serviceName: string, args?: any[], callback?: (something: any) => void): void;
|
|
788
867
|
applyEdit(workspaceEdit: lsp.WorkspaceEdit, serviceName: string, callback?: (result: lsp.ApplyWorkspaceEditResult, serviceName: string) => void): void;
|
|
@@ -792,6 +871,13 @@ declare class LanguageProvider {
|
|
|
792
871
|
private createHoverNode;
|
|
793
872
|
private createErrorNode;
|
|
794
873
|
private setStyles;
|
|
874
|
+
/**
|
|
875
|
+
* Sets global options for the specified service.
|
|
876
|
+
*
|
|
877
|
+
* @param serviceName - The name of the service for which to set global options.
|
|
878
|
+
* @param options - The options to set for the specified service.
|
|
879
|
+
* @param {boolean} [merge=false] - Indicates whether to merge the provided options with the existing options. Defaults to false.
|
|
880
|
+
*/
|
|
795
881
|
setGlobalOptions<T extends keyof ServiceOptionsMap>(serviceName: T & string, options: ServiceOptionsMap[T], merge?: boolean): void;
|
|
796
882
|
/**
|
|
797
883
|
* Sets the workspace URI for the language provider.
|
|
@@ -804,7 +890,20 @@ declare class LanguageProvider {
|
|
|
804
890
|
* @param workspaceUri - The new workspace URI. Could be simple path, not URI itself.
|
|
805
891
|
*/
|
|
806
892
|
changeWorkspaceFolder(workspaceUri: string): void;
|
|
893
|
+
/**
|
|
894
|
+
* Sets the options for a specified editor session.
|
|
895
|
+
*
|
|
896
|
+
* @param session - The Ace editor session to configure.
|
|
897
|
+
* @param options - The configuration options to be applied to the session.
|
|
898
|
+
*/
|
|
807
899
|
setSessionOptions<OptionsType extends ServiceOptions>(session: Ace.EditSession, options: OptionsType): void;
|
|
900
|
+
/**
|
|
901
|
+
* Configures the specified features for a given service.
|
|
902
|
+
*
|
|
903
|
+
* @param {SupportedServices} serviceName - The name of the service for which features are being configured.
|
|
904
|
+
* @param {ServiceFeatures} features - The features to be configured for the given service.
|
|
905
|
+
* @return {void} Does not return a value.
|
|
906
|
+
*/
|
|
808
907
|
configureServiceFeatures(serviceName: SupportedServices, features: ServiceFeatures): void;
|
|
809
908
|
doHover(session: Ace.EditSession, position: Ace.Point, callback?: (hover: Tooltip | undefined) => void): void;
|
|
810
909
|
provideSignatureHelp(session: Ace.EditSession, position: Ace.Point, callback?: (signatureHelp: Tooltip | undefined) => void): void;
|
|
@@ -832,62 +931,6 @@ declare class LanguageProvider {
|
|
|
832
931
|
sendRequest(serviceName: string, method: string, params: any, callback?: (result: any) => void): void;
|
|
833
932
|
showDocument(params: lsp.ShowDocumentParams, serviceName: string, callback?: (result: lsp.LSPAny, serviceName: string) => void): void;
|
|
834
933
|
}
|
|
835
|
-
declare class SessionLanguageProvider {
|
|
836
|
-
session: Ace.EditSession;
|
|
837
|
-
documentUri: string;
|
|
838
|
-
private $messageController;
|
|
839
|
-
private $deltaQueue;
|
|
840
|
-
private $isConnected;
|
|
841
|
-
private $options?;
|
|
842
|
-
private $filePath;
|
|
843
|
-
private $isFilePathRequired;
|
|
844
|
-
private $servicesCapabilities?;
|
|
845
|
-
private $requestsQueue;
|
|
846
|
-
state: {
|
|
847
|
-
occurrenceMarkers: MarkerGroup | null;
|
|
848
|
-
diagnosticMarkers: MarkerGroup | null;
|
|
849
|
-
};
|
|
850
|
-
private extensions;
|
|
851
|
-
editor: Ace.Editor;
|
|
852
|
-
private semanticTokensLegend?;
|
|
853
|
-
private $provider;
|
|
854
|
-
/**
|
|
855
|
-
* Constructs a new instance of the `SessionLanguageProvider` class.
|
|
856
|
-
*
|
|
857
|
-
* @param provider - The `LanguageProvider` instance.
|
|
858
|
-
* @param session - The Ace editor session.
|
|
859
|
-
* @param editor - The Ace editor instance.
|
|
860
|
-
* @param messageController - The `IMessageController` instance for handling messages.
|
|
861
|
-
*/
|
|
862
|
-
constructor(provider: LanguageProvider, session: Ace.EditSession, editor: Ace.Editor, messageController: IMessageController);
|
|
863
|
-
enqueueIfNotConnected(callback: () => void): void;
|
|
864
|
-
get comboDocumentIdentifier(): ComboDocumentIdentifier;
|
|
865
|
-
/**
|
|
866
|
-
* @param filePath
|
|
867
|
-
*/
|
|
868
|
-
setFilePath(filePath: string): void;
|
|
869
|
-
private $init;
|
|
870
|
-
addSemanticTokenSupport(session: Ace.EditSession): void;
|
|
871
|
-
private $connected;
|
|
872
|
-
private $changeMode;
|
|
873
|
-
setServerCapabilities: (capabilities: {
|
|
874
|
-
[serviceName: string]: lsp.ServerCapabilities;
|
|
875
|
-
}) => void;
|
|
876
|
-
private initDocumentUri;
|
|
877
|
-
private get $extension();
|
|
878
|
-
private get $mode();
|
|
879
|
-
private get $format();
|
|
880
|
-
private $changeListener;
|
|
881
|
-
$sendDeltaQueue: (callback?: any) => any;
|
|
882
|
-
$showAnnotations: (diagnostics: lsp.Diagnostic[]) => void;
|
|
883
|
-
setOptions<OptionsType extends ServiceOptions>(options: OptionsType): void;
|
|
884
|
-
validate: () => void;
|
|
885
|
-
format: () => void;
|
|
886
|
-
applyEdits: (edits: lsp.TextEdit[]) => void;
|
|
887
|
-
getSemanticTokens(): void;
|
|
888
|
-
$applyDocumentHighlight: (documentHighlights: lsp.DocumentHighlight[]) => void;
|
|
889
|
-
closeDocument(callback?: any): void;
|
|
890
|
-
}
|
|
891
934
|
export declare class AceLanguageClient {
|
|
892
935
|
/**
|
|
893
936
|
* Creates LanguageProvider for any Language Server to connect with JSON-RPC (webworker, websocket)
|