lspsaga.nvim icon indicating copy to clipboard operation
lspsaga.nvim copied to clipboard

Code action error with diagnostic

Open wiserfz opened this issue 1 year ago • 0 comments

Describe the bug

Use 'o' to call code action with diagnostic failed.

image

Steps to reproduce

go version: 1.22.2 language_file: main.go

package main

import (
	"fmt"
	"io/ioutil"
)

func mian() {
	_, err := ioutil.ReadFile("./file.txt")
	if err != nil {
		fmt.Println(err)
	}
}

saga.lua

return {
  "nvimdev/lspsaga.nvim",
  dependencies = {
    "nvim-treesitter/nvim-treesitter", -- optional
    "nvim-tree/nvim-web-devicons", -- optional
  },
  event = "BufReadPre",
  config = function()
    local setup, saga = pcall(require, "lspsaga")
    if not setup then
      return
    end

    saga.setup({
      -- when there has code action it will show a lightbulb
      lightbulb = {
        enable = false,
        sign = false,
      },
      beacon = {
        enable = false,
      },
      finder = {
        keys = {
          toggle_or_open = "<CR>",
          quit = "q",
          close = "<ESC>",
        },
      },
      rename = {
        in_select = false,
      },
      definition = {
        keys = {
          tabnew = "<C-c>n",
        },
      },
    })
  end,
}

Expected behavior

use code action success.

Neovim version (nvim -v)

NVIM v0.9.5

lspsaga commit

"lspsaga.nvim": { "branch": "main", "commit": "052234296f13e2705d5d290c7bd5a36d3dd81fde" }

Terminal name/version

terminal

wiserfz avatar May 02 '24 06:05 wiserfz