|
1 | 1 | import { Connection } from 'vscode-languageserver'; |
2 | | -import { getDocumentSettings } from './setings'; |
| 2 | +import { getDocumentSettings } from './setings.js'; |
3 | 3 | import { TextDocument } from 'vscode-languageserver-textdocument'; |
4 | | -import { IAnalyzer, RegexAnalyzer } from './analyzer'; |
5 | | -import { AntlrAnalyzer } from './parser/index'; |
| 4 | +import { IAnalyzer, RegexAnalyzer } from './analyzer.js'; |
| 5 | +import { AntlrAnalyzer } from './parser/index.js'; |
6 | 6 |
|
7 | | -const analyzer: IAnalyzer = new RegexAnalyzer(); |
| 7 | +const analyzer: IAnalyzer = new AntlrAnalyzer(); |
8 | 8 | let problems = 0; |
9 | 9 | export async function lint( |
10 | 10 | textDocument: TextDocument, |
11 | 11 | hasConfigurationCapability: boolean, |
12 | 12 | hasDiagnosticRelatedInformationCapability: boolean, |
13 | | - connection: Connection |
| 13 | + connection: Connection, |
14 | 14 | ): Promise<void> { |
15 | 15 | // In this simple example we get the settings for every validate run. |
16 | | - const settings = await getDocumentSettings(textDocument.uri, hasConfigurationCapability, connection); |
| 16 | + const settings = await getDocumentSettings( |
| 17 | + textDocument.uri, |
| 18 | + hasConfigurationCapability, |
| 19 | + connection, |
| 20 | + ); |
17 | 21 |
|
18 | | - const analyzerAntlr: IAnalyzer = new AntlrAnalyzer(); |
19 | 22 | console.debug('visited analyzer'); |
20 | 23 | // const pattern = /\b[A-Z]{2,}\b/g; |
21 | 24 | let diagnostics = analyzer.analyze(textDocument); |
|
0 commit comments