登录 注册

lean.nvim

去点 Star
其他
623
Stars
—
Forks
0
Watchers
—
Open Issues
待补全
许可证
Lua
语言
—
创建时间
最近更新

项目能做什么

为 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>

[![Lua](https://img.shields.io/badge/Lua-blue.svg?style=for-the-badge&logo=lua)](http://www.lua.org)
[![Neovim](https://img.shields.io/badge/Neovim%200.11+-green.svg?style=for-the-badge&logo=neovim)](https://neovim.io)
[![MIT](https://img.shields.io/badge/MIT-yellow.svg?style=for-the-badge)](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 真实检索

相似项目数据正在完善中,暂不展示(避免误导)

项目优势与风险

技术成熟度创建时间待补全,最近推送 ,发布过 6 个 Release
社区活跃Star 623 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。