hledger-lsp 0.1.5 → 0.1.6
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/README.md +82 -167
- package/out/features/codeActions.d.ts +0 -4
- package/out/features/codeActions.d.ts.map +1 -1
- package/out/features/codeActions.js +7 -23
- package/out/features/codeActions.js.map +1 -1
- package/out/features/codeLens.d.ts +29 -0
- package/out/features/codeLens.d.ts.map +1 -0
- package/out/features/codeLens.js +102 -0
- package/out/features/codeLens.js.map +1 -0
- package/out/features/completion.d.ts.map +1 -1
- package/out/features/completion.js +19 -6
- package/out/features/completion.js.map +1 -1
- package/out/features/definition.d.ts.map +1 -1
- package/out/features/definition.js.map +1 -1
- package/out/features/foldingRanges.d.ts.map +1 -1
- package/out/features/foldingRanges.js +6 -2
- package/out/features/foldingRanges.js.map +1 -1
- package/out/features/formatter.d.ts.map +1 -1
- package/out/features/formatter.js.map +1 -1
- package/out/features/formattingUtils.d.ts +38 -0
- package/out/features/formattingUtils.d.ts.map +1 -0
- package/out/features/formattingUtils.js +107 -0
- package/out/features/formattingUtils.js.map +1 -0
- package/out/features/hover.d.ts +0 -4
- package/out/features/hover.d.ts.map +1 -1
- package/out/features/hover.js +7 -16
- package/out/features/hover.js.map +1 -1
- package/out/features/inlayHints.d.ts +5 -4
- package/out/features/inlayHints.d.ts.map +1 -1
- package/out/features/inlayHints.js +154 -84
- package/out/features/inlayHints.js.map +1 -1
- package/out/features/symbols.d.ts.map +1 -1
- package/out/features/symbols.js +4 -1
- package/out/features/symbols.js.map +1 -1
- package/out/features/validator.d.ts +0 -4
- package/out/features/validator.d.ts.map +1 -1
- package/out/features/validator.js +101 -93
- package/out/features/validator.js.map +1 -1
- package/out/parser/ast.d.ts +2 -2
- package/out/parser/ast.d.ts.map +1 -1
- package/out/parser/ast.js +8 -3
- package/out/parser/ast.js.map +1 -1
- package/out/parser/index.d.ts +8 -5
- package/out/parser/index.d.ts.map +1 -1
- package/out/parser/index.js +0 -7
- package/out/parser/index.js.map +1 -1
- package/out/server/configFile.d.ts +104 -0
- package/out/server/configFile.d.ts.map +1 -0
- package/out/server/configFile.js +231 -0
- package/out/server/configFile.js.map +1 -0
- package/out/server/settings.d.ts +8 -0
- package/out/server/settings.d.ts.map +1 -1
- package/out/server/settings.js +8 -0
- package/out/server/settings.js.map +1 -1
- package/out/server/workspace.d.ts +126 -0
- package/out/server/workspace.d.ts.map +1 -0
- package/out/server/workspace.js +599 -0
- package/out/server/workspace.js.map +1 -0
- package/out/server.js +431 -23
- package/out/server.js.map +1 -1
- package/out/types.d.ts +15 -4
- package/out/types.d.ts.map +1 -1
- package/out/types.js +11 -0
- package/out/types.js.map +1 -1
- package/out/utils/amountFormatter.d.ts +14 -0
- package/out/utils/amountFormatter.d.ts.map +1 -0
- package/out/utils/amountFormatter.js +55 -0
- package/out/utils/amountFormatter.js.map +1 -0
- package/out/utils/balanceCalculator.d.ts +32 -0
- package/out/utils/balanceCalculator.d.ts.map +1 -0
- package/out/utils/balanceCalculator.js +93 -0
- package/out/utils/balanceCalculator.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAA2E,MAAM,UAAU,CAAC;AACnH,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAMlE;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,YAAY,GAAG,IAAI,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;OAGG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAEtB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;CACtC;AAED,qBAAa,aAAa;IAExB;;;OAGG;IACH,UAAU,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;IAK9B;;OAEG;IACH,KAAK,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc;CAuHtE;AAED,eAAO,MAAM,MAAM,eAAsB,CAAC"}
|
package/out/parser/index.js
CHANGED
|
@@ -165,13 +165,6 @@ class HledgerParser {
|
|
|
165
165
|
}
|
|
166
166
|
return result;
|
|
167
167
|
}
|
|
168
|
-
/**
|
|
169
|
-
* Validate transaction balance
|
|
170
|
-
*/
|
|
171
|
-
validateBalance(transaction) {
|
|
172
|
-
// TODO: Implement balance validation
|
|
173
|
-
return true;
|
|
174
|
-
}
|
|
175
168
|
}
|
|
176
169
|
exports.HledgerParser = HledgerParser;
|
|
177
170
|
exports.parser = new HledgerParser();
|
package/out/parser/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,0CAAgI;AAEhI,2CAA6B;AAC7B,yCAA4C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH,0CAAgI;AAEhI,2CAA6B;AAC7B,yCAA4C;AAuC5C,MAAa,aAAa;IAExB;;;OAGG;IACH,UAAU,CAAC,GAAY;QACrB,4CAA4C;QAC5C,yBAAc,CAAC,UAAU,CAA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;YACxB,iFAAiF;YACjF,gFAAgF;YAChF,iFAAiF;YACjF,6CAA6C;YAC7C,IAAI,CAAC,OAAO,CAAC,OAAO;gBAAE,yBAAc,CAAC,UAAU,EAAE,CAAC;YAElD,MAAM,GAAG,yBAAc,CAAC,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;gBAC7I,4FAA4F;gBAC5F,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;YACvD,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AArID,sCAqIC;AAEY,QAAA,MAAM,GAAG,IAAI,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration file support for hledger LSP
|
|
3
|
+
*
|
|
4
|
+
* Allows users to specify workspace configuration via .hledger-lsp.json files.
|
|
5
|
+
* Config files can be placed at any level in the directory hierarchy and are
|
|
6
|
+
* discovered by walking up from the document location.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Schema for .hledger-lsp.json configuration file
|
|
10
|
+
*/
|
|
11
|
+
export interface HledgerLspConfig {
|
|
12
|
+
/**
|
|
13
|
+
* Root journal file that serves as the entry point to the workspace.
|
|
14
|
+
* This file is parsed to build the complete include graph.
|
|
15
|
+
* Path is relative to the config file location.
|
|
16
|
+
*
|
|
17
|
+
* Example: "main.journal"
|
|
18
|
+
*/
|
|
19
|
+
rootFile?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Glob patterns for files to include in workspace discovery.
|
|
22
|
+
* Default: ["**\/*.journal", "**\/*.hledger"]
|
|
23
|
+
*
|
|
24
|
+
* Example: ["**\/*.journal", "ledger/**\/*.hledger"]
|
|
25
|
+
*/
|
|
26
|
+
include?: string[];
|
|
27
|
+
/**
|
|
28
|
+
* Glob patterns for files to exclude from workspace discovery.
|
|
29
|
+
* Default: ["**\/node_modules/**", "**\/.git/**"]
|
|
30
|
+
*
|
|
31
|
+
* Example: ["**\/archive/**", "**\/temp/**", "**\/backup/**"]
|
|
32
|
+
*/
|
|
33
|
+
exclude?: string[];
|
|
34
|
+
/**
|
|
35
|
+
* Workspace-specific settings
|
|
36
|
+
*/
|
|
37
|
+
workspace?: {
|
|
38
|
+
/**
|
|
39
|
+
* Enable workspace-aware parsing (default: true)
|
|
40
|
+
*/
|
|
41
|
+
enabled?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Parse all discovered files eagerly on startup (default: true)
|
|
44
|
+
* If false, files are parsed on-demand
|
|
45
|
+
*/
|
|
46
|
+
eagerParsing?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Automatically detect the root file using heuristics (default: true)
|
|
49
|
+
* If false, only uses explicitly configured rootFile
|
|
50
|
+
*/
|
|
51
|
+
autoDetectRoot?: boolean;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Result of loading a config file
|
|
56
|
+
*/
|
|
57
|
+
export interface ConfigLoadResult {
|
|
58
|
+
/** The loaded and validated configuration */
|
|
59
|
+
config: HledgerLspConfig;
|
|
60
|
+
/** Absolute path to the config file */
|
|
61
|
+
configPath: string;
|
|
62
|
+
/** Directory containing the config file (used as base for relative paths) */
|
|
63
|
+
configDir: string;
|
|
64
|
+
/** Any validation warnings */
|
|
65
|
+
warnings: string[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Discover .hledger-lsp.json by walking up the directory tree
|
|
69
|
+
*
|
|
70
|
+
* @param startUri - URI of the document to start searching from
|
|
71
|
+
* @param workspaceRoot - URI of the workspace root (optional, stops search here)
|
|
72
|
+
* @returns Path to the config file, or null if not found
|
|
73
|
+
*/
|
|
74
|
+
export declare function discoverConfigFile(startUri: string, workspaceRoot?: string): string | null;
|
|
75
|
+
/**
|
|
76
|
+
* Load and validate a config file
|
|
77
|
+
*
|
|
78
|
+
* @param configPath - Absolute path to the config file
|
|
79
|
+
* @returns Loaded configuration with validation warnings
|
|
80
|
+
* @throws Error if the config file is invalid JSON or cannot be read
|
|
81
|
+
*/
|
|
82
|
+
export declare function loadConfigFile(configPath: string): ConfigLoadResult;
|
|
83
|
+
/**
|
|
84
|
+
* Resolve root file path relative to config directory
|
|
85
|
+
*
|
|
86
|
+
* @param config - The loaded configuration
|
|
87
|
+
* @param configDir - Directory containing the config file
|
|
88
|
+
* @returns Absolute file URI, or null if not configured
|
|
89
|
+
*/
|
|
90
|
+
export declare function resolveRootFile(config: HledgerLspConfig, configDir: string): string | null;
|
|
91
|
+
/**
|
|
92
|
+
* Merge configuration from file with runtime settings
|
|
93
|
+
*
|
|
94
|
+
* Priority (highest to lowest):
|
|
95
|
+
* 1. Runtime settings (from VS Code configuration)
|
|
96
|
+
* 2. Config file settings
|
|
97
|
+
* 3. Default settings
|
|
98
|
+
*
|
|
99
|
+
* @param fileConfig - Configuration from .hledger-lsp.json
|
|
100
|
+
* @param runtimeSettings - Settings from VS Code
|
|
101
|
+
* @returns Merged configuration
|
|
102
|
+
*/
|
|
103
|
+
export declare function mergeConfig(fileConfig: HledgerLspConfig, runtimeSettings?: Partial<HledgerLspConfig>): Required<HledgerLspConfig>;
|
|
104
|
+
//# sourceMappingURL=configFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configFile.d.ts","sourceRoot":"","sources":["../../src/server/configFile.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE;QACV;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB;;;WAGG;QACH,YAAY,CAAC,EAAE,OAAO,CAAC;QAEvB;;;WAGG;QACH,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;CACH;AAgBD;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,MAAM,EAAE,gBAAgB,CAAC;IACzB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA2B1F;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CA8FnE;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS1F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,gBAAgB,EAC5B,eAAe,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAC1C,QAAQ,CAAC,gBAAgB,CAAC,CAW5B"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration file support for hledger LSP
|
|
4
|
+
*
|
|
5
|
+
* Allows users to specify workspace configuration via .hledger-lsp.json files.
|
|
6
|
+
* Config files can be placed at any level in the directory hierarchy and are
|
|
7
|
+
* discovered by walking up from the document location.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.discoverConfigFile = discoverConfigFile;
|
|
44
|
+
exports.loadConfigFile = loadConfigFile;
|
|
45
|
+
exports.resolveRootFile = resolveRootFile;
|
|
46
|
+
exports.mergeConfig = mergeConfig;
|
|
47
|
+
const fs = __importStar(require("fs"));
|
|
48
|
+
const path = __importStar(require("path"));
|
|
49
|
+
const uri_1 = require("../utils/uri");
|
|
50
|
+
/**
|
|
51
|
+
* Default configuration values
|
|
52
|
+
*/
|
|
53
|
+
const DEFAULT_CONFIG = {
|
|
54
|
+
rootFile: undefined, // No default root file
|
|
55
|
+
include: ['**/*.journal', '**/*.hledger'],
|
|
56
|
+
exclude: ['**/node_modules/**', '**/.git/**', '**/.*'],
|
|
57
|
+
workspace: {
|
|
58
|
+
enabled: true,
|
|
59
|
+
eagerParsing: true,
|
|
60
|
+
autoDetectRoot: true
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Discover .hledger-lsp.json by walking up the directory tree
|
|
65
|
+
*
|
|
66
|
+
* @param startUri - URI of the document to start searching from
|
|
67
|
+
* @param workspaceRoot - URI of the workspace root (optional, stops search here)
|
|
68
|
+
* @returns Path to the config file, or null if not found
|
|
69
|
+
*/
|
|
70
|
+
function discoverConfigFile(startUri, workspaceRoot) {
|
|
71
|
+
let currentDir = path.dirname((0, uri_1.toFilePath)(startUri));
|
|
72
|
+
const workspaceRootPath = workspaceRoot ? (0, uri_1.toFilePath)(workspaceRoot) : null;
|
|
73
|
+
// Walk up the directory tree
|
|
74
|
+
while (true) {
|
|
75
|
+
const configPath = path.join(currentDir, '.hledger-lsp.json');
|
|
76
|
+
if (fs.existsSync(configPath)) {
|
|
77
|
+
return configPath;
|
|
78
|
+
}
|
|
79
|
+
// Stop at workspace root if provided
|
|
80
|
+
if (workspaceRootPath && currentDir === workspaceRootPath) {
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
// Stop at filesystem root
|
|
84
|
+
const parentDir = path.dirname(currentDir);
|
|
85
|
+
if (parentDir === currentDir) {
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
currentDir = parentDir;
|
|
89
|
+
}
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Load and validate a config file
|
|
94
|
+
*
|
|
95
|
+
* @param configPath - Absolute path to the config file
|
|
96
|
+
* @returns Loaded configuration with validation warnings
|
|
97
|
+
* @throws Error if the config file is invalid JSON or cannot be read
|
|
98
|
+
*/
|
|
99
|
+
function loadConfigFile(configPath) {
|
|
100
|
+
const warnings = [];
|
|
101
|
+
// Read and parse JSON
|
|
102
|
+
let rawConfig;
|
|
103
|
+
try {
|
|
104
|
+
const content = fs.readFileSync(configPath, 'utf-8');
|
|
105
|
+
rawConfig = JSON.parse(content);
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
if (error instanceof SyntaxError) {
|
|
109
|
+
throw new Error(`Invalid JSON in ${configPath}: ${error.message}`);
|
|
110
|
+
}
|
|
111
|
+
throw new Error(`Failed to read ${configPath}: ${error}`);
|
|
112
|
+
}
|
|
113
|
+
// Validate and normalize config
|
|
114
|
+
const config = {};
|
|
115
|
+
// Validate rootFile
|
|
116
|
+
if (rawConfig.rootFile !== undefined) {
|
|
117
|
+
if (typeof rawConfig.rootFile !== 'string') {
|
|
118
|
+
warnings.push('rootFile should be a string, ignoring');
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
config.rootFile = rawConfig.rootFile;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// Validate include
|
|
125
|
+
if (rawConfig.include !== undefined) {
|
|
126
|
+
if (!Array.isArray(rawConfig.include)) {
|
|
127
|
+
warnings.push('include should be an array, using defaults');
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
const validPatterns = rawConfig.include.filter((p) => typeof p === 'string');
|
|
131
|
+
if (validPatterns.length !== rawConfig.include.length) {
|
|
132
|
+
warnings.push('Some include patterns are not strings, ignoring them');
|
|
133
|
+
}
|
|
134
|
+
config.include = validPatterns.length > 0 ? validPatterns : DEFAULT_CONFIG.include;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
// Validate exclude
|
|
138
|
+
if (rawConfig.exclude !== undefined) {
|
|
139
|
+
if (!Array.isArray(rawConfig.exclude)) {
|
|
140
|
+
warnings.push('exclude should be an array, using defaults');
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
const validPatterns = rawConfig.exclude.filter((p) => typeof p === 'string');
|
|
144
|
+
if (validPatterns.length !== rawConfig.exclude.length) {
|
|
145
|
+
warnings.push('Some exclude patterns are not strings, ignoring them');
|
|
146
|
+
}
|
|
147
|
+
config.exclude = validPatterns.length > 0 ? validPatterns : DEFAULT_CONFIG.exclude;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// Validate workspace settings
|
|
151
|
+
if (rawConfig.workspace !== undefined) {
|
|
152
|
+
if (typeof rawConfig.workspace !== 'object' || rawConfig.workspace === null) {
|
|
153
|
+
warnings.push('workspace should be an object, using defaults');
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
config.workspace = {};
|
|
157
|
+
if (rawConfig.workspace.enabled !== undefined) {
|
|
158
|
+
if (typeof rawConfig.workspace.enabled !== 'boolean') {
|
|
159
|
+
warnings.push('workspace.enabled should be a boolean, using default');
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
config.workspace.enabled = rawConfig.workspace.enabled;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (rawConfig.workspace.eagerParsing !== undefined) {
|
|
166
|
+
if (typeof rawConfig.workspace.eagerParsing !== 'boolean') {
|
|
167
|
+
warnings.push('workspace.eagerParsing should be a boolean, using default');
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
config.workspace.eagerParsing = rawConfig.workspace.eagerParsing;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (rawConfig.workspace.autoDetectRoot !== undefined) {
|
|
174
|
+
if (typeof rawConfig.workspace.autoDetectRoot !== 'boolean') {
|
|
175
|
+
warnings.push('workspace.autoDetectRoot should be a boolean, using default');
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
config.workspace.autoDetectRoot = rawConfig.workspace.autoDetectRoot;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
const configDir = path.dirname(configPath);
|
|
184
|
+
return {
|
|
185
|
+
config,
|
|
186
|
+
configPath,
|
|
187
|
+
configDir,
|
|
188
|
+
warnings
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Resolve root file path relative to config directory
|
|
193
|
+
*
|
|
194
|
+
* @param config - The loaded configuration
|
|
195
|
+
* @param configDir - Directory containing the config file
|
|
196
|
+
* @returns Absolute file URI, or null if not configured
|
|
197
|
+
*/
|
|
198
|
+
function resolveRootFile(config, configDir) {
|
|
199
|
+
if (!config.rootFile) {
|
|
200
|
+
return null;
|
|
201
|
+
}
|
|
202
|
+
const absPath = path.isAbsolute(config.rootFile)
|
|
203
|
+
? config.rootFile
|
|
204
|
+
: path.resolve(configDir, config.rootFile);
|
|
205
|
+
return (0, uri_1.toFileUri)(absPath);
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Merge configuration from file with runtime settings
|
|
209
|
+
*
|
|
210
|
+
* Priority (highest to lowest):
|
|
211
|
+
* 1. Runtime settings (from VS Code configuration)
|
|
212
|
+
* 2. Config file settings
|
|
213
|
+
* 3. Default settings
|
|
214
|
+
*
|
|
215
|
+
* @param fileConfig - Configuration from .hledger-lsp.json
|
|
216
|
+
* @param runtimeSettings - Settings from VS Code
|
|
217
|
+
* @returns Merged configuration
|
|
218
|
+
*/
|
|
219
|
+
function mergeConfig(fileConfig, runtimeSettings) {
|
|
220
|
+
return {
|
|
221
|
+
rootFile: runtimeSettings?.rootFile ?? fileConfig.rootFile ?? DEFAULT_CONFIG.rootFile,
|
|
222
|
+
include: runtimeSettings?.include ?? fileConfig.include ?? DEFAULT_CONFIG.include,
|
|
223
|
+
exclude: runtimeSettings?.exclude ?? fileConfig.exclude ?? DEFAULT_CONFIG.exclude,
|
|
224
|
+
workspace: {
|
|
225
|
+
enabled: runtimeSettings?.workspace?.enabled ?? fileConfig.workspace?.enabled ?? DEFAULT_CONFIG.workspace.enabled,
|
|
226
|
+
eagerParsing: runtimeSettings?.workspace?.eagerParsing ?? fileConfig.workspace?.eagerParsing ?? DEFAULT_CONFIG.workspace.eagerParsing,
|
|
227
|
+
autoDetectRoot: runtimeSettings?.workspace?.autoDetectRoot ?? fileConfig.workspace?.autoDetectRoot ?? DEFAULT_CONFIG.workspace.autoDetectRoot
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=configFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configFile.js","sourceRoot":"","sources":["../../src/server/configFile.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6FH,gDA2BC;AASD,wCA8FC;AASD,0CASC;AAcD,kCAcC;AA3QD,uCAAyB;AACzB,2CAA6B;AAC7B,sCAAqD;AAsDrD;;GAEG;AACH,MAAM,cAAc,GAA+B;IACjD,QAAQ,EAAE,SAAgB,EAAE,uBAAuB;IACnD,OAAO,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC;IACzC,OAAO,EAAE,CAAC,oBAAoB,EAAE,YAAY,EAAE,OAAO,CAAC;IACtD,SAAS,EAAE;QACT,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,IAAI;QAClB,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAgBF;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAAC,QAAgB,EAAE,aAAsB;IACzE,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,IAAA,gBAAU,EAAC,QAAQ,CAAC,CAAC,CAAC;IACpD,MAAM,iBAAiB,GAAG,aAAa,CAAC,CAAC,CAAC,IAAA,gBAAU,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAE3E,6BAA6B;IAC7B,OAAO,I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,SAAS,EAAE,OAAO,IAAI,cAAc,CAAC,SAAS,CAAC,OAAO;YACjH,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,IAAI,UAAU,CAAC,SAAS,EAAE,YAAY,IAAI,cAAc,CAAC,SAAS,CAAC,YAAY;YACrI,cAAc,EAAE,eAAe,EAAE,SAAS,EAAE,cAAc,IAAI,UAAU,CAAC,SAAS,EAAE,cAAc,IAAI,cAAc,CAAC,SAAS,CAAC,cAAc;SAC9I;KACF,CAAC;AACJ,CAAC"}
|
package/out/server/settings.d.ts
CHANGED
|
@@ -49,6 +49,14 @@ export interface HledgerSettings {
|
|
|
49
49
|
showRunningBalances?: boolean;
|
|
50
50
|
showCostConversions?: boolean;
|
|
51
51
|
};
|
|
52
|
+
codeLens?: {
|
|
53
|
+
showTransactionCounts?: boolean;
|
|
54
|
+
};
|
|
55
|
+
workspace?: {
|
|
56
|
+
enabled?: boolean;
|
|
57
|
+
eagerParsing?: boolean;
|
|
58
|
+
autoDetectRoot?: boolean;
|
|
59
|
+
};
|
|
52
60
|
}
|
|
53
61
|
export declare const defaultSettings: HledgerSettings;
|
|
54
62
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/server/settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,WAAW,eAAe;IAC9B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,YAAY,CAAC,EAAE,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AAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAmBzF;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,0BAA0B,EAAE,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC,CAqB5I;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE5D;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C"}
|
package/out/server/settings.js
CHANGED
|
@@ -54,6 +54,14 @@ exports.defaultSettings = {
|
|
|
54
54
|
showInferredAmounts: false,
|
|
55
55
|
showRunningBalances: false,
|
|
56
56
|
showCostConversions: false,
|
|
57
|
+
},
|
|
58
|
+
codeLens: {
|
|
59
|
+
showTransactionCounts: false,
|
|
60
|
+
},
|
|
61
|
+
workspace: {
|
|
62
|
+
enabled: true,
|
|
63
|
+
eagerParsing: true,
|
|
64
|
+
autoDetectRoot: true,
|
|
57
65
|
}
|
|
58
66
|
};
|
|
59
67
|
// Cache the settings of all open documents
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/server/settings.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/server/settings.ts"],"names":[],"mappings":";;;AAgIA,8BAmBC;AAMD,kDAqBC;AAED,sDAEC;AAED,4DAEC;AAxHY,QAAA,eAAe,GAAoB;IAC9C,mBAAmB,EAAE,IAAI;IACzB,WAAW,EAAE,SAAS;IACtB,UAAU,EAAE;QACV,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,IAAI;QACpB,kBAAkB,EAAE,IAAI;QACxB,gBAAgB,EAAE,KAAK;QACvB,qBAAqB,EAAE,IAAI;QAC3B,cAAc,EAAE,IAAI;QACpB,YAAY,EAAE,IAAI;QAClB,iBAAiB,EAAE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,6CAA6C,QAAQ,KAAK,IAAI,CAAC,SAAS,CAAC,YAAY,IAAI,EAAE,CAAC,EAAE,CAC/F,CAAC;YACF,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;QACH,gBAAgB,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAgB,qBAAqB,CAAC,QAAgB;IACpD,gBAAgB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC;AAED,SAAgB,wBAAwB;IACtC,gBAAgB,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Connection } from 'vscode-languageserver/node';
|
|
2
|
+
import { HledgerParser, FileReader } from '../parser/index';
|
|
3
|
+
import { ParsedDocument } from '../types';
|
|
4
|
+
import { HledgerLspConfig } from './configFile';
|
|
5
|
+
export declare class WorkspaceManager {
|
|
6
|
+
private workspaceFolders;
|
|
7
|
+
private journalFiles;
|
|
8
|
+
private includeGraph;
|
|
9
|
+
private reverseGraph;
|
|
10
|
+
private rootFile;
|
|
11
|
+
private workspaceCache;
|
|
12
|
+
private config;
|
|
13
|
+
private configPath;
|
|
14
|
+
private metrics;
|
|
15
|
+
private parser;
|
|
16
|
+
private fileReader;
|
|
17
|
+
private connection;
|
|
18
|
+
/**
|
|
19
|
+
* Initialize the WorkspaceManager with workspace folders and dependencies.
|
|
20
|
+
* This discovers all journal files, builds the include graph, and identifies root files.
|
|
21
|
+
* Optionally loads configuration from .hledger-lsp.json if present.
|
|
22
|
+
*/
|
|
23
|
+
initialize(workspaceFolders: string[], parser: HledgerParser, fileReader: FileReader, connection: Connection, runtimeConfig?: Partial<HledgerLspConfig>): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Discover and load configuration from .hledger-lsp.json
|
|
26
|
+
*/
|
|
27
|
+
private loadConfig;
|
|
28
|
+
/**
|
|
29
|
+
* Discover all .journal and .hledger files in a workspace folder.
|
|
30
|
+
* Uses fast-glob to find files, using patterns from config.
|
|
31
|
+
*/
|
|
32
|
+
private discoverJournalFiles;
|
|
33
|
+
/**
|
|
34
|
+
* Build the include graph by parsing each discovered file for include directives.
|
|
35
|
+
* This creates both forward (file → includes) and reverse (file → included by) mappings.
|
|
36
|
+
*
|
|
37
|
+
* IMPORTANT: We parse WITHOUT following includes to get only DIRECT includes,
|
|
38
|
+
* not transitive ones. This ensures the graph accurately represents the include structure.
|
|
39
|
+
*/
|
|
40
|
+
private buildIncludeGraph;
|
|
41
|
+
/**
|
|
42
|
+
* Identify the single root file using the following algorithm:
|
|
43
|
+
* 1. If explicitly configured in config, use that
|
|
44
|
+
* 2. If autoDetectRoot is enabled, use heuristics to find the best root:
|
|
45
|
+
* a. Prefer files with NO parents (not included by anyone)
|
|
46
|
+
* b. Among those, prefer the one that includes the most files
|
|
47
|
+
* c. If multiple candidates, prefer one with "main" or "all" in the name
|
|
48
|
+
* d. If still tied, use alphabetically first
|
|
49
|
+
* 3. If no suitable root found, return null (workspace features disabled)
|
|
50
|
+
*/
|
|
51
|
+
private identifyRootFile;
|
|
52
|
+
/**
|
|
53
|
+
* Get the root file for a given file URI.
|
|
54
|
+
* Returns the single root file if it transitively includes this file, or null otherwise.
|
|
55
|
+
*
|
|
56
|
+
* Algorithm:
|
|
57
|
+
* 1. If no root file identified, return null
|
|
58
|
+
* 2. If the root file transitively includes this file (or is the file itself), return the root
|
|
59
|
+
* 3. Otherwise return null (file is not part of the workspace's include graph)
|
|
60
|
+
*/
|
|
61
|
+
getRootForFile(uri: string): string | null;
|
|
62
|
+
/**
|
|
63
|
+
* Check if a root file transitively includes a target file.
|
|
64
|
+
* Uses BFS to traverse the include graph.
|
|
65
|
+
*/
|
|
66
|
+
private rootIncludesFile;
|
|
67
|
+
/**
|
|
68
|
+
* Get the workspace folder that contains the given URI.
|
|
69
|
+
* Returns null if the file is outside all workspace folders.
|
|
70
|
+
*
|
|
71
|
+
* Edge case handling: Files outside workspace folders will return null,
|
|
72
|
+
* which triggers a fallback to document-mode parsing. This is intentional
|
|
73
|
+
* and allows the LSP to work with files opened outside the workspace.
|
|
74
|
+
*/
|
|
75
|
+
private getWorkspaceFolder;
|
|
76
|
+
/**
|
|
77
|
+
* Parse the workspace from the root file.
|
|
78
|
+
* Returns a cached ParsedDocument if available, otherwise parses and caches.
|
|
79
|
+
*/
|
|
80
|
+
parseWorkspace(force?: boolean): ParsedDocument | null;
|
|
81
|
+
/**
|
|
82
|
+
* Invalidate the cache for a file.
|
|
83
|
+
* Clears the workspace cache if the root file transitively includes this file.
|
|
84
|
+
*/
|
|
85
|
+
invalidateFile(uri: string): void;
|
|
86
|
+
/**
|
|
87
|
+
* Get diagnostic information about the workspace.
|
|
88
|
+
* Useful for troubleshooting and performance monitoring.
|
|
89
|
+
*/
|
|
90
|
+
getDiagnosticInfo(): {
|
|
91
|
+
totalFiles: number;
|
|
92
|
+
rootFile: string | null;
|
|
93
|
+
cached: boolean;
|
|
94
|
+
configFile: string | null;
|
|
95
|
+
performance: {
|
|
96
|
+
initializationTime: number;
|
|
97
|
+
cacheHits: number;
|
|
98
|
+
cacheMisses: number;
|
|
99
|
+
cacheHitRate: string;
|
|
100
|
+
averageParseTime: number;
|
|
101
|
+
totalParseTime: number;
|
|
102
|
+
parseCount: number;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Log diagnostic information to the console.
|
|
107
|
+
* Useful for debugging and performance analysis.
|
|
108
|
+
*/
|
|
109
|
+
logDiagnostics(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Generate a text-based tree representation of the workspace.
|
|
112
|
+
*/
|
|
113
|
+
getWorkspaceTree(): string;
|
|
114
|
+
/**
|
|
115
|
+
* Generate a structured representation of the workspace for better tooling integration.
|
|
116
|
+
* Returns an array of entries with display text and absolute file paths.
|
|
117
|
+
*/
|
|
118
|
+
getWorkspaceTreeStructured(): Array<{
|
|
119
|
+
display: string;
|
|
120
|
+
path: string;
|
|
121
|
+
uri: string;
|
|
122
|
+
}>;
|
|
123
|
+
private collectTreeEntries;
|
|
124
|
+
private printTree;
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../src/server/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAIxD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAa,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAoE,MAAM,cAAc,CAAC;AAElH,qBAAa,gBAAgB;IAE3B,OAAO,CAAC,gBAAgB,CAAgB;IACxC,OAAO,CAAC,YAAY,CAA0B;IAC9C,OAAO,CAAC,YAAY,CAAuC;IAC3D,OAAO,CAAC,YAAY,CAAuC;IAC3D,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,cAAc,CAA+B;IAGrD,OAAO,CAAC,MAAM,CAA2C;IACzD,OAAO,CAAC,UAAU,CAAuB;IAGzC,OAAO,CAAC,OAAO,CAMb;IAGF,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,UAAU,CAAc;IAEhC;;;;OAIG;IACG,UAAU,CACd,gBAAgB,EAAE,MAAM,EAAE,EAC1B,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,EACtB,aAAa,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GACxC,OAAO,CAAC,IAAI,CAAC;IAmDhB;;OAEG;YACW,UAAU;IAwCxB;;;OAGG;YACW,oBAAoB;IA2BlC;;;;;;OAMG;YACW,iBAAiB;IAiG/B;;;;;;;;;OASG;IACH,OAAO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