IdeaCredIdeaCred

dtormoen/neural-open.nvim

87

A smart picker for Snacks.nvim that trains a neural network with your file picking preferences.

What's novel

A smart picker for Snacks.nvim that trains a neural network with your file picking preferences.

Code Analysis

10 files read · 3 rounds

A Neovim file picker plugin that implements a full neural network (MLP with batch normalization, dropout, AdamW optimizer) from scratch in pure Lua to learn and rank file selections based on 11 contextual features, with online training via pairwise hinge loss.

Strengths

Genuinely deep implementation of a neural network in pure Lua with proper batch norm backward pass, gradient clipping, AdamW with warmup, and zero-allocation performance optimizations throughout the hot path. The architecture cleanly separates core math, training, inference, feature engineering, and Snacks.nvim integration, with per-picker state isolation and feature migration support.

Weaknesses

The pure-Lua matrix operations (triple-nested loops for matmul) will be significantly slower than a C-based approach, though the small network size (11→16→16→8→1) mitigates this. The 60KB nn.lua file, while well-organized internally, is large and could benefit from further decomposition of the state management and weight persistence logic.

Score Breakdown

Innovation
6 (25%)
Craft
80 (35%)
Traction
36 (15%)
Scope
92 (25%)

Signal breakdown

Innovation

Not Fork+1
Code Novelty+2
Concept Novelty+2

Craft

Ci+5
Tests+8
Polish+2
Releases+5
Has License+5
Code Quality+27
Readme Quality+15
Recent Activity+7
Structure Quality+4
Commit Consistency+2
Has Dependency Mgmt+0

Traction

Forks+6
Stars+20
Hn Points+0
Watchers+3
Early Traction+5
Devto Reactions+0
Community Contribs+2

Scope

Commits+8
Languages+8
Subsystems+13
Bloat Penalty+0
Completeness+6
Contributors+7
Authored Files+15
Readme Code Match+3
Architecture Depth+7
Implementation Depth+8

Evidence

Commits

56

Contributors

3

Files

81

Active weeks

3

TestsCI/CDREADMELicenseContributing

Repository

Language

Lua

Stars

51

Forks

1

License

MIT