Skip to content

Commit

Permalink
Merge pull request #475 from nobkd/fix/hotreload-vim
Browse files Browse the repository at this point in the history
fix: hotreload with vim and helix
  • Loading branch information
tipiirai authored Feb 12, 2025
2 parents ba8ab11 + f5efaf3 commit 18ee0bf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/nuekit/src/nuefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ 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)
file.path = path
Expand Down

0 comments on commit 18ee0bf

Please sign in to comment.