-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Description
The LSP handler injected by lean.setup() appears to strip the data field from codeAction/resolve requests. When executing a :lua vim.lsp.buf.code_action() the following panic occurs
[ERROR] .../lean/stderr.lua:92 "rpc" "lake" "stderr" "PANIC at Lean.Server.CodeAction.getFileSource! Lean.Server.CodeActions.Basic:47:22: no data param on code action Change to IO.println\nbacktrace:\n"
Disabling this plugin's LSP management and using the native Neovim client fixes the issue:
require('lean').setup{ lsp = { enable = false } }
vim.lsp.config('leanls', {
cmd = { 'lean', '--server' },
init_options = {
editDelay = 10,
hasWidgets = true,
},
on_attach = function(client, bufnr)
local opts = { buffer = bufnr, noremap = true, silent = true }
vim.keymap.set('n', '<C-CR>', vim.lsp.buf.code_action, opts)
end,
})
vim.lsp.enable('leanls')neovim v0.11.5
Metadata
Metadata
Assignees
Labels
No labels