Eandrju/cellular-automaton.nvim
Eandrju/cellular-automaton.nvim has 2,105 GitHub stars and 46 forks. GitHot measured 0 stars in 24 hours, -1 in 7 days, and -3 in 15 days. Last checked 2026-11-23 15:59 UTC. Last push 2025-01-31.
측정된 스타 증가
- in 24h
- 0
- in 7 days
- -1
- in 15 days
- -3
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
소개
끈질기게 고쳐지지 않는 테스트나 삶 전반의 무의미함을 견디는 데 도움이 될지도 모르는 쓸모없는 플러그인입니다. Neovim 버퍼의 내용을 바탕으로 보기 좋은 셀룰러 오토마톤 애니메이션을 실행할 수 있습니다.
창작 및 미디어README.md
Originalcellular-automaton.nvim
A useless plugin that might help you cope with stubbornly broken tests or overall lack of sense in life. It lets you execute aesthetically pleasing, cellular automaton animations based on the content of neovim buffer.
What is cellular automata
From the Wiki:
A cellular automaton is a model used in computer science and mathematics. The idea is to model a dynamic system by using a number of cells. Each cell has one of several possible states. With each "turn" or iteration the state of the current cell is determined by two things: its current state, and the states of the neighbouring cells.
But.. why?
There is no pragmatic use case whatsoever. However, there are some pseudo-scientifically proven "use-cases":
- Urgent deadline approaches? Don't worry. With this plugin you can procrastinate even more!
- Are you stuck and don't know how to proceed? You can use this plugin as a visual stimulant for epic ideas!
- Those nasty colleagues keep peeking over your shoulder and stealing your code? Now you can obfuscate your editor! Good luck stealing that.
- Working with legacy code? Just create a
<leader>fmlmapping and see it melt.
Requirements
- neovim >= 0.9
- treesitter parser for current buffer
Installation
use 'eandrju/cellular-automaton.nvim'
Usage
You can trigger it using simple command:
:CellularAutomaton make_it_rain
or
:CellularAutomaton game_of_life
Or just create a mapping:
vim.keymap.set("n", "<leader>fml", "<cmd>CellularAutomaton make_it_rain<CR>")
You can close animation window with one of: q/<Esc>/<CR>
Known issues
- folding and wrapping is not supported ATM
Supported animations
Make it Rain
Game of Life
Implementing your own cellular automaton logic
Using a simple interface you can implement your own cellular automaton animation. You need to provide a configuration table with an update function, which takes a 2D grid of cells and modifies it in place. Each cell by default consist of two fields:
char- single string characterhl_group- treesitter's highlight group
Example sliding animation:
local config = {
fps = 50,
name = 'slide',
}
-- init function is invoked only once at the start
-- config.init = function (grid)
--
-- end
-- update function
config.update = function (grid)
for i = 1, #grid do
local prev = grid[i][#(grid[i])]
for j = 1, #(grid[i]) do
grid[i][j], prev = prev, grid[i][j]
end
end
return true
end
require("cellular-automaton").register_animation(config)
Result:
Inspiration and references
관련 프로젝트 살펴보기
불러오는 중…