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

Lspfinder showing error

Open edward-s opened this issue 3 years ago • 27 comments

Describe the bug

after updating, when using LSP finder, encountered the following error Screenshot 2023-03-27 at 10 47 02 AM

Steps to reproduce

:Lspsaga lsp_finder

Expected behavior

should show the lsp finder window

Neovim version (nvim -v)

0.8.3

lspsaga commit

70f863a

Terminal name/version

kitty

edward-s avatar Mar 27 '23 02:03 edward-s

Same bug here, using alacritty

noisyBrain avatar Mar 27 '23 03:03 noisyBrain

provide reproduce step

glepnir avatar Mar 27 '23 03:03 glepnir

This bug happens to me when trying to invoke lsp finder on something that would normally produce no result. For example go to a blank line in your code or an object property in javascript, invoke lsp finder and that error will appear.

tannerellen avatar Mar 27 '23 04:03 tannerellen

Just wanted to update... my above statement is only true for lua files. I have now tried this in javascript and svelte files and I get the error reported every time.

tannerellen avatar Mar 27 '23 05:03 tannerellen

IDK how to reproduce it ..

image

glepnir avatar Mar 27 '23 05:03 glepnir

can you update and test ? I fixed some bug in cursormoved .

glepnir avatar Mar 27 '23 05:03 glepnir

tried with latest commit, still having the same error

edward-s avatar Mar 27 '23 05:03 edward-s

some min code that can reproduce it ?

glepnir avatar Mar 27 '23 05:03 glepnir

i tried in c lua typescript go rust ..both work.

image

glepnir avatar Mar 27 '23 05:03 glepnir

not sure if this will help

im using default setup

require("lspsaga").setup()

:Lspsaga lsp_finder anywhere in any javascript code

worked using last friday's lspsaga commit

edward-s avatar Mar 27 '23 05:03 edward-s

a min js code /

glepnir avatar Mar 27 '23 06:03 glepnir

const test = () => {
  console.log('hello world');
};

:Lspsaga lsp_finder over test

edward-s avatar Mar 27 '23 06:03 edward-s

same as me in go.

obmutescences avatar Mar 27 '23 06:03 obmutescences

hmm.. image

glepnir avatar Mar 27 '23 06:03 glepnir

can you update and test again .. it works for me ..wired.

glepnir avatar Mar 27 '23 06:03 glepnir

thanks for the quick update! just updated to newest commit and tried again, getting the same error 'width' key must be a positive Integer

edward-s avatar Mar 27 '23 06:03 edward-s

I tried a min config can't reproduce it.

glepnir avatar Mar 27 '23 06:03 glepnir

Same bug in rust; lspsaga version: b5b7c13966fd4b977fb261b6d3fa26bafe3ec6e2

Configuration of lspsaga

local status, saga = pcall(require, "lspsaga")
if not status then
  return
end

saga.setup({
  -- keybinds for navigation in lspsaga window
  scroll_preview = { scroll_up = "<C-k>", scroll_down = "<C-j>" },
  -- when there has code action it will show a lightbulb
  lightbulb = {
    enable_in_insert = true,
    sign = false,
  },
  ui = {
    colors = {
      --float window normal bakcground color
      normal_bg = "#1c1c19",
      --title background color
      title_bg = "#afd700",
    },
  },
  beacon = {
    enable = false,
  },
})

wiserfz avatar Mar 27 '23 06:03 wiserfz

colors has been removed in 0.2.8. and i tried in rust.

image

glepnir avatar Mar 27 '23 06:03 glepnir

I

some min code that can reproduce it ?

local api = vim.api

api.nvim_command('set nu') api.nvim_command('set relativenumber')

-- Plugins local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then vim.fn.system( { 'git', 'clone', '--filter=blob:none', 'https://github.com/folke/lazy.nvim.git', '--branch=stable', -- latest stable release lazypath } ) end vim.opt.rtp:prepend(lazypath)

-- Example using a list of specs with the default options vim.g.mapleader = ',' -- Make sure to set mapleader before lazy so your mappings are correct

require('lazy').setup( { -- LuaFormatter off { 'neovim/nvim-lspconfig', config = function() require'lspconfig'.pyright.setup {} require'lspconfig'.gopls.setup {} end }, { 'williamboman/mason.nvim', config = function() require('mason').setup() end }, {'williamboman/mason-lspconfig.nvim'}, -- LuaFormatter on { 'jose-elias-alvarez/null-ls.nvim', config = function() local null_ls = require('null-ls') local diagnostics = null_ls.builtins.diagnostics null_ls.setup {sources = {diagnostics.golangci_lint}} end, dependencies = {{'nvim-lua/plenary.nvim'}} }, { 'glepnir/lspsaga.nvim', event = 'BufRead', config = function() require('lspsaga').setup({}) end, dependencies = {{'nvim-tree/nvim-web-devicons'}, {'nvim-treesitter/nvim-treesitter'}} } } )

0x00-ketsu avatar Mar 27 '23 06:03 0x00-ketsu