From 2534235862adb475e253f9027ff11cb8cf3d74d4 Mon Sep 17 00:00:00 2001 From: qwjyh Date: Fri, 3 Nov 2023 18:39:54 +0900 Subject: [PATCH] (WIP)nvim: lean: setup lsp and lean.nvim manually --- dotfiles/neovim/init.lua | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/dotfiles/neovim/init.lua b/dotfiles/neovim/init.lua index 423037f..07562f0 100644 --- a/dotfiles/neovim/init.lua +++ b/dotfiles/neovim/init.lua @@ -130,6 +130,31 @@ require('lazy').setup({ 'folke/trouble.nvim', -- config = function }, + { + 'Julian/lean.nvim', + event = { 'BufReadPre *.lean', 'BufNewFile *.lean' }, + + dependencies = { + 'neovim/nvim-lspconfig', + 'nvim-lua/plenary.nvim', + 'hrsh7th/nvim-cmp', + }, + + -- see Julian/lean.nvim readme + opts = { + lsp = { + on_attach = on_attach, + }, + mappings = true, + }, + + -- this currently disables all default settings in lean.nvim + -- default lean.nvim config overwrites lspconfig + -- TODO: migrate default settings from lean.nvim + config = function () + vim.g.maplocalleader = ' ' + end, + }, }) ----------------------------------------------------------- @@ -540,7 +565,7 @@ lspconfig.powershell_es.setup { -- } local lss = { "pyright", "rust_analyzer", "texlab", "ccls", "clangd", "tsserver", --[["tailwindcss"]] "hls", "cmake", - "csharp_ls", "html", "r_language_server", } + "csharp_ls", "html", "r_language_server", "leanls" } for _, ls in pairs(lss) do lspconfig[ls].setup { on_attach = on_attach,