Skip to content
프로젝트

소개

Lean 정리 증명기의 Neovim 지원

개발 도구

이 수치를 측정하는 방법

What you can do

  • Abbreviation (unicode character) insertion (in insert mode & the command window accessible via q/)
  • An infoview which can show persistent goal, term & tactic state, as well as interactive widget support (for most widgets renderable as text)
  • User commands for interacting with infoviews, goals, diagnostics, and the Lean server (e.g. :LeanGoal, :LeanInfoviewToggle, :LeanRestartFile)
  • File progress information for visible lines in the sign column. If satellite.nvim is present, a satellite extension is registered for showing progress information for the whole document within its floating window.

측정된 스타 증가

in 24h
+2
in 7 days
+7
in 15 days
+21
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original
lean.nvim

lean.nvim

Neovim support for the Lean Theorem Prover

Lua Neovim MIT dotfiles using lean.nvim

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

vim.pack.add { "https://github.com/Julian/lean.nvim" }

vim.g.lean_config = { mappings = true }

(see the manual 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:

{
  '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
  },

  init = function()
    ---@type lean.Config
    vim.g.lean_config = { -- see the manual for full configuration options
      mappings = true,
    }
  end,
}

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 until you upgrade.

Optional: Terminal Graphics

In terminals that support the Kitty graphics protocol (Kitty, WezTerm, Ghostty, etc.), lean.nvim can render images and SVGs from ProofWidgets inline in the infoview.

SVG rendering requires 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.nvim's development is graciously sponsored by the Lean FRO. It is undoubtedly the case that lean.nvim would not be as featureful without this support, for which we owe sincere thanks.

Features

  • Abbreviation (unicode character) insertion (in insert mode & the command window accessible via q/)

  • An infoview which can show persistent goal, term & tactic state, as well as interactive widget support (for most widgets renderable as text)

  • User commands for interacting with infoviews, goals, diagnostics, and the Lean server (e.g. :LeanGoal, :LeanInfoviewToggle, :LeanRestartFile)

  • File progress information for visible lines in the sign column. If satellite.nvim is present, a satellite extension is registered for showing progress information for the whole document within its floating window.

  • vim-matchup definitions for Lean

  • switch.vim base definitions for Lean

  • If telescope.nvim is present, a :Telescope loogle command is available as a frontend for the Loogle JSON API.

  • Semantic highlighting support -- see the manual for full details and the wiki for a sample color scheme setup

  • Simple snippets (in VSCode-compatible format, usable with e.g. vim-vsnip)

  • Lean library search path access via lean.current_search_path(), which you might find useful as a set of paths to grep (or live grep) within See the wiki for a sample configuration.

Configuration & Usage

For detail on the full list of supported configuration options, key mappings, and commands, see the manual.

Other Useful Plugins

Particularly if you're also a VSCode user, there may be other plugins you're interested in. Below is a (hopelessly incomplete) list of a few:

Contributing

Contributions are most welcome. Feel free to send pull requests for anything you'd like to see, or open an issue if you'd like to discuss. See CONTRIBUTING.md for details on running tests, linting and testing.

관련 프로젝트 살펴보기

불러오는 중…