FibLintLint your code to Fibonacci sequence line lengths. FibLint is a VS Code extension that checks whether each line of your code has a character count that is a Fibonacci number (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233...). Is it useful? Debatable. Is it mathematically beautiful? Absolutely. FeaturesDiagnosticsEvery line with a non-Fibonacci character count gets flagged with a hint showing the nearest Fibonacci number. Hover over any line to see detailed Fibonacci info including previous, next, and nearest Fibonacci numbers. Workspace ScoringA lightbulb icon in the status bar shows your workspace's Fibonacci compliance percentage. The lightbulb glows brighter as your score increases -- from dim at low percentages to bright gold at 80%+. It flashes when the score changes. Click the lightbulb to open the score menu with options for:
Leaderboard SidebarA dedicated sidebar panel ranks all workspace files by their Fibonacci score with color-coded tiers:
Click any file to open it. Quick FixesHover over a flagged line and click "Pad to [next Fibonacci]" to add trailing spaces that bring the line to the next Fibonacci length. Run "FibLint: Format Document to Fibonacci" from the command palette to pad all lines at once. Hard ModeEnable Fibonacci Mode to block saving files that fall below a configurable score threshold. A modal warning appears when you try to save a non-compliant file, giving you the option to save anyway or go back and improve your score. Golden Ratio ModeTrack pairs of consecutive lines whose lengths approximate the golden ratio (1.618...). Shown as a separate percentage in the status bar tooltip and score menu. AchievementsToast notifications celebrate milestones when a file reaches 25% (Bronze), 50% (Silver), 75% (Gold), or 100% (Perfect) Fibonacci compliance. Streak CounterTracks consecutive saves that improve a file's Fibonacci score. Your current streak is shown in the status bar tooltip. Ignore PatternsConfigure which lines are excluded from scoring:
Visual DecorationsOrange dots appear at the end of each non-Fibonacci line showing exactly how many characters are needed to reach the next Fibonacci number. Commands
Settings
Why?Because almost no real code naturally lands on a Fibonacci number, and that's the point. FibLint is for developers who appreciate mathematical beauty in their code -- or at least enjoy a good novelty linter. The Fibonacci sequence gets sparse at higher values (the gap between 89 and 144 is 55 characters), which means most lines will be flagged. Your workspace score will start low. Embrace the challenge. LicenseMIT |