feat: add inline icons for edit
This commit is contained in:
+8
-3
@@ -1,10 +1,13 @@
|
||||
import * as path from "path";
|
||||
import * as vscode from "vscode";
|
||||
import { resolveTaskLocations } from "@/commands/resolveTaskLocations";
|
||||
import { TASK_FILE_EXTENSION } from "@/model/taskFile";
|
||||
import { FsTaskRepository } from "@/storage/FsTaskRepository";
|
||||
import { NodeFileSystem } from "@/storage/NodeFileSystem";
|
||||
import { VscodeConfigProvider } from "@/storage/VscodeConfigProvider";
|
||||
import { registerTaskCommands } from "@/ui/taskCommands";
|
||||
import { registerTaskDecorations } from "@/ui/taskDecorations";
|
||||
import { registerTaskDiagnostics } from "@/ui/taskDiagnostics";
|
||||
import { TaskDashboardPanel } from "@/views/taskDashboardPanel";
|
||||
import { TaskKanbanPanel } from "@/views/taskKanbanPanel";
|
||||
import { TaskTreeProvider } from "@/views/taskTreeProvider";
|
||||
@@ -12,7 +15,7 @@ import { TaskTreeProvider } from "@/views/taskTreeProvider";
|
||||
export function activate(context: vscode.ExtensionContext) {
|
||||
const fileSystem = new NodeFileSystem();
|
||||
const config = new VscodeConfigProvider();
|
||||
const repo = new FsTaskRepository(fileSystem, config.getFileExtension());
|
||||
const repo = new FsTaskRepository(fileSystem, TASK_FILE_EXTENSION);
|
||||
const tree = new TaskTreeProvider(repo, config);
|
||||
|
||||
const onTasksMutated = (): void => {
|
||||
@@ -25,10 +28,9 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
vscode.window.registerTreeDataProvider("xboctukFlow.tasks", tree),
|
||||
);
|
||||
|
||||
const ext = config.getFileExtension();
|
||||
for (const location of resolveTaskLocations(config)) {
|
||||
const taskPattern = path
|
||||
.join(location.folderPath, `*${ext}`)
|
||||
.join(location.folderPath, `*${TASK_FILE_EXTENSION}`)
|
||||
.replace(/\\/g, "/");
|
||||
const watcher = vscode.workspace.createFileSystemWatcher(taskPattern);
|
||||
watcher.onDidCreate(onTasksMutated);
|
||||
@@ -46,6 +48,9 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
statusBarItem.show();
|
||||
context.subscriptions.push(statusBarItem);
|
||||
|
||||
registerTaskDiagnostics(context);
|
||||
registerTaskDecorations(context);
|
||||
|
||||
registerTaskCommands(context, {
|
||||
repo,
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user