From 5c5f3d440f860144ba68cee9e14f24ce6c3df983 Mon Sep 17 00:00:00 2001 From: nobkd <44443899+nobkd@users.noreply.github.com> Date: Tue, 4 Feb 2025 02:32:55 +0100 Subject: [PATCH 1/2] fix: hotreload on vim --- packages/nuekit/src/nuefs.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nuekit/src/nuefs.js b/packages/nuekit/src/nuefs.js index b75da8c3..5f3eb371 100644 --- a/packages/nuekit/src/nuefs.js +++ b/packages/nuekit/src/nuefs.js @@ -44,6 +44,8 @@ export async function fswatch(root, callback, onremove) { } return watch(root, { recursive: true }, async function(e, path) { + if (path.endsWith('~')) path = path.slice(0, -1) + try { const file = parse(path) file.path = path From f5efaf38b47e1fe8d19981416aa78b1ff7065bca Mon Sep 17 00:00:00 2001 From: nobkd <44443899+nobkd@users.noreply.github.com> Date: Tue, 4 Feb 2025 03:01:27 +0100 Subject: [PATCH 2/2] fix: hotreload on helix --- packages/nuekit/src/nuefs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/nuekit/src/nuefs.js b/packages/nuekit/src/nuefs.js index 5f3eb371..2dbce1ad 100644 --- a/packages/nuekit/src/nuefs.js +++ b/packages/nuekit/src/nuefs.js @@ -44,7 +44,10 @@ export async function fswatch(root, callback, onremove) { } return watch(root, { recursive: true }, async function(e, path) { + // handle (neo)vim file saves if (path.endsWith('~')) path = path.slice(0, -1) + // handle helix file saves + else if (path.endsWith('.bck')) path = path.slice(0, -10) // 6 char hash + 4 char ext try { const file = parse(path)