From ebb61135a97e3d37d8acda470da66f81fbfe1bf2 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Wed, 31 Jan 2024 20:36:10 -0500 Subject: [PATCH] Keybindings for lean4.nvim --- nix/base-system/init.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nix/base-system/init.lua b/nix/base-system/init.lua index 4550848..778709f 100644 --- a/nix/base-system/init.lua +++ b/nix/base-system/init.lua @@ -503,9 +503,15 @@ local harpoon = require('harpoon') harpoon:setup() -require('lean').setup{ +local lean = require'lean' + +lean.setup{ lsp = { on_attach = function(client, bufnr) + local opts = { buffer = bufnr } + vim.keymap.set({ "n", "v" }, "ti", function () vim.cmd("LeanInfoviewToggle") end, opts) + vim.keymap.set({ "n", "v" }, "sg", function () vim.cmd("LeanGoal") end, opts) + vim.keymap.set({ "n", "v" }, "stg", function () vim.cmd("LeanTermGoal") end, opts) end }, mappings = true,