lean.nvim
623
Stars
63
Forks
5
Watchers
43
Open Issues
MIT
许可证
Lua
语言
2020-12-30
创建时间
2026-11-11
最近更新
项目能做什么
为 Lean 定理证明器提供支持的 Neovim 插件。
来源:AI 基于仓库事实生成
· 内容以仓库实际 README 为准
使用说明 查看原始 README 原仓库文档
中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<div align="center">
<div>
<div><img alt="lean.nvim" src="https://github.com/user-attachments/assets/727b689d-56f6-48e8-8fe5-a7a5d82b91c5" width="400px"/></div>
<div><h1>lean.nvim</h1></div>
</div>
<table>
<tr>
<td>
<strong><a href="https://neovim.io">Neovim</a> support for the <a href="https://lean-lang.org/">Lean Theorem Prover</a></strong>
</td>
</tr>
</table>
[](http://www.lua.org)
[](https://neovim.io)
[](https://opensource.org/licenses/MIT)
<a href="https://dotfyle.com/plugins/Julian/lean.nvim">
<img alt="dotfiles using lean.nvim" src="https://dotfyle.com/plugins/Julian/lean.nvim/shield?style=for-the-badge" />
</a>
</div>
https://github.com/user-attachments/assets/d17554ae-bcce-4f73-ac34-38ae556caf45
## Installation
If you are using neovim 0.12 or later, you can install and configure `lean.nvim` using
```lua
vim.pack.add { "https://github.com/Julian/lean.nvim" }
vim.g.lean_config = { mappings = true }
```
(see [the manual](https://github.com/Julian/lean.nvim/wiki/The-lean.nvim-Manual#key-mappings) for information about the `{ mappings = true }` part).
If you are using an older neovim, or do not wish to use `vim.pack`, `lean.nvim` can be installed via your favorite plugin manager.
Here's an example doing so with [lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
{
'Julian/lean.nvim',
event = { 'BufReadPre *.lean', 'BufNewFile *.lean' },
dependencies = {
-- optional dependencies:
-- 'nvim-telescope/telescope.nvim', -- for Lean-specific pickers
-- 'andymass/vim-matchup', -- for enhanced % motion behavior
-- 'andrewradev/switch.vim', -- for switch support
-- 'tomtom/tcomment_vim', -- for commenting
},
---@type lean.Config
opts = { -- see the manual for full configuration options
mappings = true,
}
}
```
`lean.nvim` supports the latest stable neovim release (currently `0.12.x`) as well as the latest nightly.
If you are on an earlier version of neovim, e.g. `0.10.x`, you can have your plugin manager install the [`nvim-0.10` tag](https://github.com/Julian/lean.nvim/releases/tag/nvim-0.10) until you upgrade.
### Optional: Terminal Graphics
In terminals that support the [Kitty graphics protocol](https://sw.kovidgoyal.net/kitty/graphics-protocol/) (Kitty, WezTerm, Ghostty, etc.), `lean.nvim` can render images and SVGs from ProofWidgets inline in the infoview.
SVG rendering requires [resvg](https://github.com/RazrFalcon/resvg) (`brew install resvg` or `cargo install resvg`).
Raster images (`<img>` tags with data URIs) work without any extra dependencies.
To disable all terminal graphics, set `graphics = { enabled = false }` in your configuration.
## Sponsors
A portion of `lean.nvi
阅读完整原文
商业机会分析 AI 生成
Lean 4 生态基金与组织定制开发赞助
| 产品构想 | 基于项目已获得 Lean FRO(Focused Research Organization)赞助的事实,向高校实验室、数学组织或基金会申请专项 Grants,针对特定功能(如更强的 LSP 特性、终端交互组件、CI 集成)进行有偿定制开发与维护。 |
| 核心功能 | 深度维护 Infoview 交互部件;支持复杂的 ProofWidgets 协议;跟进 Lean 4 新版本 LSP 特性 |
| 目标用户 | Lean 语言生态基金会(如 Lean FRO)、学术研究机构、前沿数学与代码验证实验室 |
| 难度/周期 | 中等 · 3-6个月 · 成本:极低(主要为个人研究与开发工时) |
| 收费模式 | 定向研发赞助金、学术 Grants、开源维护津贴 |
| 竞争风险 | 资助具有周期性与不确定性,依赖单一资助方预算策略 |
| 依据 | 已验证事实 |
形式化验证工程师企业培训与集成咨询
| 产品构想 | 为尝试使用 Lean 4 进行智能合约验证、操作系统微内核验证或关键算法证明的科技企业,提供团队工程环境搭建培训、Neovim 深度定制工作流与形式化证明实战工作坊。 |
| 核心功能 | 企业定制化 Neovim+Lean 工作环境配置;团队协作与 CI 证明流水线集成;Lean 4 证明技巧培训 |
| 目标用户 | Web3/区块链安全审计机构、高可靠性软件研发团队(航天/安全/硬件验证) |
| 难度/周期 | 高 · 1-3个月(按服务周期交付) · 成本:低(课件与咨询方案准备成本) |
| 收费模式 | 企业内训服务费、技术咨询顾问费 |
| 竞争风险 | Lean 4 在商业工业界的落地规模依然较小,潜在付费企业客户基数有限(推测) |
| 依据 | AI推测 |
AI 辅助证明与自动化策略探索插件/SaaS 服务
| 产品构想 | 结合大语言模型或自动定理证明器(ATP),开发针对 Lean 4 的 Neovim 侧边栏/后端 AI 助手,在 Infoview 中实时推荐可用的证明策略(Tactics)和引理补全。 |
| 核心功能 | 上下文感知引理推荐;自动证明策略生成与验证;与 Mathlib/Loogle 无缝检索协同 |
| 目标用户 | Lean 学习者、从事形式化数学的科研人员、尝试自动化证明的 AI 开发者 |
| 难度/周期 | 极高 · 6-12个月 · 成本:较高(大模型推理算力、API 调用费用及服务器托管) |
| 收费模式 | SaaS 订阅制(按月/年订阅高级 AI 证明配额) |
| 竞争风险 | 技术门槛极高,LLM 幻觉在严谨的形式化证明中容错率为零,且主流用户群体对付费工具敏感 |
| 依据 | 尚需验证的假设 |
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心
竞品与相似项目 GitHub Search 真实检索
| 项目 | 中文简介 | Stars | 语言 |
|---|---|---|---|
| netdata/netdata | 中文介绍暂未生成 The fastest path to AI-powered full stack observability, eve |
81,371 | Go |
| gorhill/uBlock | 中文介绍暂未生成 uBlock Origin - An efficient blocker for Chromium and Firefo |
69,262 | JavaScript |
| Textualize/textual | 中文介绍暂未生成 The lean application framework for Python. Build sophistica |
37,635 | Python |
| coolsnowwolf/lede | 中文介绍暂未生成 Lean's LEDE source |
31,617 | C |
| QuantConnect/Lean | 中文介绍暂未生成 Lean Algorithmic Trading Engine by QuantConnect (Python, C#) |
22,488 | C# |
| micropython/micropython | 中文介绍暂未生成 MicroPython - a lean and efficient Python implementation for |
22,189 | C |
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。
项目优势与风险
| 技术成熟度 | 创建于 2020-12-30,近 30 天仍在推送,发布过 6 个 Release |
| 社区活跃 | Star 623 / Fork 63 / Issue 43(数据支持,可自行核实) |
| 许可证 | MIT |
| 主要风险 | 上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价 |
安装与使用
快速开始(以仓库 README 为准)
git clone https://github.com/Julian/lean.nvim.git cd lean.nvim # 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。