Skip to content

Commit c3fb886

Browse files
committed
refactor: changed project layout to be more intuitive
1 parent 39f79ac commit c3fb886

25 files changed

+34
-37
lines changed
File renamed without changes.

src/extension.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import * as pkg from '../package.json';
55
import * as path from 'path';
66
import * as fs from 'fs';
77

8-
import { FortranCompletionProvider } from './features/completion-provider';
9-
import { FortranDocumentSymbolProvider } from './features/document-symbol-provider';
10-
import { FortranFormattingProvider } from './features/formatting-provider';
8+
import { FortranCompletionProvider } from './fallback-features/completion-provider';
9+
import { FortranDocumentSymbolProvider } from './fallback-features/document-symbol-provider';
10+
import { FortranFormattingProvider } from './format/formatting-provider';
1111
import { FortlsClient } from './lsp/client';
12-
import { FortranHoverProvider } from './features/hover-provider';
13-
import { FortranLintingProvider } from './features/linter-provider';
14-
import { EXTENSION_ID, FortranDocumentSelector } from './lib/tools';
12+
import { FortranHoverProvider } from './fallback-features/hover-provider';
13+
import { FortranLintingProvider } from './lint/linter-provider';
14+
import { EXTENSION_ID, FortranDocumentSelector } from './util/tools';
1515
import { getConfigLogLevel, Logger } from './services/logging';
16-
import { WhatsNew } from './features/commands';
16+
import { WhatsNew } from './commands/commands';
1717

1818
// Make it global to catch errors when activation fails
1919
const logger = new Logger(

src/features/completion-provider.ts renamed to src/fallback-features/completion-provider.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { CancellationToken, TextDocument, Position, Hover } from 'vscode';
22
import * as fs from 'fs';
33
import * as vscode from 'vscode';
4-
import { isPositionInString, FORTRAN_KEYWORDS } from '../lib/helper';
5-
import { getDeclaredFunctions } from '../lib/functions';
6-
import { EXTENSION_ID } from '../lib/tools';
4+
import { isPositionInString, FORTRAN_KEYWORDS } from '../util/helper';
5+
import { getDeclaredFunctions } from './functions';
6+
import { EXTENSION_ID } from '../util/tools';
77
import { Logger } from '../services/logging';
88
import intrinsics from './intrinsics.json';
99

src/features/document-symbol-provider.ts renamed to src/fallback-features/document-symbol-provider.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import * as vscode from 'vscode';
44
import {
55
parseFunction as getDeclaredFunction,
66
parseSubroutine as getDeclaredSubroutine,
7-
} from '../lib/functions';
8-
import { parseVars as getDeclaredVar } from '../lib/variables';
9-
import { EXTENSION_ID } from '../lib/tools';
7+
} from './functions';
8+
import { parseVars as getDeclaredVar } from './variables';
109

1110
type SymbolType = 'subroutine' | 'function' | 'variable';
1211
type ParserFunc = (document: TextDocument, line: TextLine) => SymbolInformation | undefined;
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/features/formatting-provider.ts renamed to src/format/formatting-provider.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
'use strict';
22

3-
import * as fs from 'fs';
43
import * as path from 'path';
5-
import * as which from 'which';
4+
import which from 'which';
65
import * as vscode from 'vscode';
7-
import * as cp from 'child_process';
86

97
import { Logger } from '../services/logging';
108
import {
@@ -14,7 +12,7 @@ import {
1412
getWholeFileRange,
1513
spawnAsPromise,
1614
pathRelToAbs,
17-
} from '../lib/tools';
15+
} from '../util/tools';
1816

1917
export class FortranFormattingProvider implements vscode.DocumentFormattingEditProvider {
2018
private readonly workspace = vscode.workspace.getConfiguration(EXTENSION_ID);

src/features/linter-provider.ts renamed to src/lint/linter-provider.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { glob } from 'glob';
1010

1111
import * as pkg from '../../package.json';
1212
import { Logger } from '../services/logging';
13-
import { GNULinter, GNUModernLinter, IntelLinter, LFortranLinter, NAGLinter } from '../lib/linters';
13+
import { GNULinter, GNUModernLinter, IntelLinter, LFortranLinter, NAGLinter } from './linters';
1414
import {
1515
EXTENSION_ID,
1616
resolveVariables,
@@ -19,17 +19,17 @@ import {
1919
spawnAsPromise,
2020
isFortran,
2121
shellTask,
22-
} from '../lib/tools';
23-
import { arraysEqual } from '../lib/helper';
22+
} from '../util/tools';
23+
import { arraysEqual } from '../util/helper';
24+
import { GlobPaths } from '../util/glob-paths';
2425
import {
2526
BuildDebug,
2627
BuildRun,
2728
InitLint,
2829
CleanLintFiles,
2930
RescanLint,
3031
CleanLintDiagnostics,
31-
} from './commands';
32-
import { GlobPaths } from '../lib/glob-paths';
32+
} from '../commands/commands';
3333

3434
const GNU = new GNULinter();
3535
const GNU_NEW = new GNUModernLinter();

0 commit comments

Comments
 (0)