ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
2.01k stars 56 forks source link

`Error executing vim.schedule lua callback: ...er/start/lsp_signature.nvim/lua/lsp_signature/helper.lua:645: col value outside range` #249

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago

The error:

Error executing vim.schedule lua callback: ...er/start/lsp_signature.nvim/lua/lsp_signature/helper.lua:645: col value outside range
stack traceback:
        [C]: in function 'nvim_buf_set_extmark'
        ...er/start/lsp_signature.nvim/lua/lsp_signature/helper.lua:645: in function 'highlight_parameter'
        ...cker/start/lsp_signature.nvim/lua/lsp_signature/init.lua:529: in function 'handler'
        /usr/local/share/nvim/runtime/lua/vim/lsp.lua:1391: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

setup:

require('lsp_signature').on_attach({
  bind = true,
  hint_enable = true,
  floating_window = true, toggle_key = '<C-d>',
    max_height = 7, max_width = 60, wrap = false,
    hi_parameter = 'IncSearch', padding = '*',
    handler_opts = { border = 'shadow' },
    transparency = 40,
    close_timeout = 4000,
}, bufnr)

but the floating window did show after pressing enter on the error message.

xiantang commented 1 year ago

https://github.com/neovim/neovim/issues/20365

ray-x commented 1 year ago

from the screenshot. Is the function you saw the error require() ?

xiantang commented 1 year ago

from the screenshot. Is the function you saw the error require() ?

I don't find function like require()

https://github.com/ray-x/lsp_signature.nvim/blob/e528f7313dc67aa1f8caa796a56232af5a569871/lua/lsp_signature/helper.lua#L645

xiantang commented 1 year ago

I cannot reproduce this issue every time, sometimes I can encounter this.

ray-x commented 1 year ago

I mean this: image Is this how you reproduce the error?

nyngwang commented 1 year ago

@ray-x Oh, sorry for my unclear issue. That indentation is probably not related to this thread. (The reason I added so many indentations was that the left border touched the sign column if I didn't do that). If I remember correctly the problem only happened on border shadow, with/without that indentations, so I only put my setup config here.

xiantang commented 1 year ago

I mean this: image Is this how you reproduce the error?

yes when I typed require( sometimes the error occur.

xiantang commented 1 year ago

image

kiyoon commented 1 year ago

I still have this issue

ray-x commented 1 year ago

lua LSP as well? also, I am wondering if it is related to this.

padding = '*',
handler_opts = { border = 'shadow' },

I do not use those setups on a daily based.

The last thing, would be great if someone can send me an error log by setup

  debug = true, -- set to true to enable debug logging
  log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on
  -- default is  ~/.cache/nvim/lsp_signature.log
  verbose = true, -- show debug line number
kiyoon commented 1 year ago

I use border='rounded' but no padding. I see this from time to time and it could have been lua as I developed a lot in lua recently.

      local cfg = {
        on_attach = function(client, bufnr)
          require("lsp_signature").on_attach({
            bind = true, -- This is mandatory, otherwise border config won't get registered.
            handler_opts = {
              border = "rounded",
            },
          }, bufnr)
        end,
      }
      require("lsp_signature").setup(cfg)

If I see the error again I'll send you the log.

kiyoon commented 1 year ago

Edit: nevermind, I got the log. It's very long, which part is relevant and how can I paste it?

kiyoon commented 1 year ago

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:155 |1: sig actPar |2: 0 |3: function M.on_attach(cfg: any, bufnr: any)
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:177 |1: nextpara: |2: {
  label = { 21, 29 }
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:188 |1: func |2: function M.on_attach(cfg: any, bufnr: any) |3: {
  label = { 21, 29 }
}

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:350 |1: md lines trim |2: { "```lua", "function M.on_attach(cfg: any, bufnr: any)", "```" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:373 |1: label: |2: function M.on_attach(cfg: any, bufnr: any)
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:448 |1: win config |2: {
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  check_completion_visible = true,
  close_events = { "BufHidden" },
  focus_id = "lsp_signature204",
  line_to_cursor = '      require("lsp_signature").on_attach(',
  max_height = 12,
  max_width = 80,
  stylize_markdown = true,
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," },
  wrap = true,
  wrap_at = 80,
  zindex = 200
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:399 |1: { "function M.on_attach(cfg: any, bufnr: any)" }
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:411 |1: popup size: |2: 42 |3: 1 |4: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:430 |1: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}
 |2: 0 |3: 36 |4: 1
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:321 |1: cleanup vt |2: 24
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:325 |1: bufnr, ns |2: 0 |3: 46
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:177 |1: virtual text:  |2: 327 |3: 328 |4: { "                                 🐼 cfg: any", "String" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:503 |1: floating opt |2: {
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  check_completion_visible = true,
  close_events = { "BufHidden" },
  focus_id = "lsp_signature204",
  focusable = true,
  line_to_cursor = '      require("lsp_signature").on_attach(',
  max_height = 1,
  max_width = 80,
  noautocmd = true,
  offset_x = -20,
  offset_y = 0,
  stylize_markdown = true,
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," },
  wrap = true,
  wrap_at = 80,
  zindex = 200
}
 |3: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  max_height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}
 |4: 0 |5: { "function M.on_attach(cfg: any, bufnr: any)" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:521 |1: sig_cfg new bufnr, winnr  |2: 6 |3: 1006
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:630 |1: extmark |2: 6 |3: 22 |4: 29 |5: 0 |6: LspSignatureActiveParameter
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:644 |1: extmark |2: 6 |3: 21 |4: 29 |5: 0
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:653 |1: extmark_id |2: 1
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:195 |1: signature handler
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:244 |1: sig result |2: {
  bufnr = 1,
  client_id = 2,
  method = "textDocument/signatureHelp",
  params = {
    position = {
      character = 41,
      line = 327
    },
    textDocument = {
      uri = "file:///home/kiyoon/bin/vimrc4ubuntu/lua/user/lazy.lua"
    }
  }
}
 |3: {
  cfgActiveSignature = 0,
  signatures = { {
      activeParameter = 0,
      label = "function M.on_attach(cfg: any, bufnr: any)",
      parameters = { {
          label = { 21, 29 }
        }, {
          label = { 31, 41 }
        } }
    } }
}
 |4: {
  border = "rounded",
  check_completion_visible = true,
  line_to_cursor = '      require("lsp_signature").on_attach(',
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," }
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:155 |1: sig actPar |2: 0 |3: function M.on_attach(cfg: any, bufnr: any)
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:177 |1: nextpara: |2: {
  label = { 21, 29 }
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:188 |1: func |2: function M.on_attach(cfg: any, bufnr: any) |3: {
  label = { 21, 29 }
}

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:350 |1: md lines trim |2: { "```lua", "function M.on_attach(cfg: any, bufnr: any)", "```" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:373 |1: label: |2: function M.on_attach(cfg: any, bufnr: any)
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:448 |1: win config |2: {
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  check_completion_visible = true,
  close_events = { "BufHidden" },
  focus_id = "lsp_signature15",
  line_to_cursor = '      require("lsp_signature").on_attach(',
  max_height = 12,
  max_width = 80,
  stylize_markdown = true,
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," },
  wrap = true,
  wrap_at = 80,
  zindex = 200
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:399 |1: { "function M.on_attach(cfg: any, bufnr: any)" }
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:411 |1: popup size: |2: 42 |3: 1 |4: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:430 |1: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}
 |2: 0 |3: 36 |4: 1
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:321 |1: cleanup vt |2: 24
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:325 |1: bufnr, ns |2: 6 |3: 46
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:177 |1: virtual text:  |2: 327 |3: 328 |4: { "                                 🐼 cfg: any", "String" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:503 |1: floating opt |2: {
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  check_completion_visible = true,
  close_events = { "BufHidden" },
  focus_id = "lsp_signature15",
  focusable = true,
  line_to_cursor = '      require("lsp_signature").on_attach(',
  max_height = 1,
  max_width = 80,
  noautocmd = true,
  offset_x = -20,
  offset_y = 0,
  stylize_markdown = true,
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," },
  wrap = true,
  wrap_at = 80,
  zindex = 200
}
 |3: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  max_height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}
 |4: 0 |5: { "function M.on_attach(cfg: any, bufnr: any)" }

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:630 |1: extmark |2: 6 |3: 22 |4: 29 |5: 0 |6: LspSignatureActiveParameter
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:644 |1: extmark |2: 6 |3: 21 |4: 29 |5: 0
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:653 |1: extmark_id |2: 2
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:764 |1: changed
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:577 |1: delta |2: h( |3:       require("lsp_signature").on_attach( |4:       require("lsp_signature").on_attach |5: {}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:588 |1: {
  triggerCharacters = { "(", "," }
}
 |2:       require("lsp_signature").on_attach(
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:235 |1: ( |2: true
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:237 |1: (
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:235 |1: , |2: false
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:241 |1: not special |2: ,
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:252 |1: [%(,][^%(,%)]*$ |2: %(, |3: ^%(,%)
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:265 |1: last trigger char |2: (
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:620 |1: lsp cap:  |2: true |3: true |4: 41
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:195 |1: signature handler
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:244 |1: sig result |2: {
  bufnr = 1,
  client_id = 2,
  method = "textDocument/signatureHelp",
  params = {
    position = {
      character = 41,
      line = 327
    },
    textDocument = {
      uri = "file:///home/kiyoon/bin/vimrc4ubuntu/lua/user/lazy.lua"
    }
  }
}
 |3: {
  cfgActiveSignature = 0,
  signatures = { {
      activeParameter = 0,
      label = "function M.on_attach(cfg: any, bufnr: any)",
      parameters = { {
          label = { 21, 29 }
        }, {
          label = { 31, 41 }
        } }
    } }
}
 |4: {
  border = "rounded",
  check_completion_visible = true,
  line_to_cursor = '      require("lsp_signature").on_attach(',
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," }
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:155 |1: sig actPar |2: 0 |3: function M.on_attach(cfg: any, bufnr: any)
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:177 |1: nextpara: |2: {
  label = { 21, 29 }
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:188 |1: func |2: function M.on_attach(cfg: any, bufnr: any) |3: {
  label = { 21, 29 }
}

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:350 |1: md lines trim |2: { "```lua", "function M.on_attach(cfg: any, bufnr: any)", "```" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:373 |1: label: |2: function M.on_attach(cfg: any, bufnr: any)
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:448 |1: win config |2: {
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  check_completion_visible = true,
  close_events = { "BufHidden" },
  focus_id = "lsp_signature975",
  line_to_cursor = '      require("lsp_signature").on_attach(',
  max_height = 12,
  max_width = 80,
  stylize_markdown = true,
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," },
  wrap = true,
  wrap_at = 80,
  zindex = 200
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:399 |1: { "function M.on_attach(cfg: any, bufnr: any)" }
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:411 |1: popup size: |2: 42 |3: 1 |4: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:430 |1: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}
 |2: 0 |3: 36 |4: 1
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:764 |1: changed
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:577 |1: delta |2: () |3:       require("lsp_signature").on_attach() |4:       require("lsp_signature").on_attach( |5: {}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:588 |1: {
  triggerCharacters = { "(", "," }
}
 |2:       require("lsp_signature").on_attach()
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:235 |1: ( |2: true
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:237 |1: (
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:235 |1: , |2: false
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:241 |1: not special |2: ,
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:252 |1: [%(,][^%(,%)]*$ |2: %(, |3: ^%(,%)
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:620 |1: lsp cap:  |2: true |3: false |4: 42
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:321 |1: cleanup vt |2: 24
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:177 |1: virtual text:  |2: 327 |3: 328 |4: { "                                  🐼 cfg: any", "String" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:503 |1: floating opt |2: {
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  check_completion_visible = true,
  close_events = { "BufHidden" },
  focus_id = "lsp_signature975",
  focusable = true,
  line_to_cursor = '      require("lsp_signature").on_attach(',
  max_height = 1,
  max_width = 80,
  noautocmd = true,
  offset_x = -21,
  offset_y = 0,
  stylize_markdown = true,
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," },
  wrap = true,
  wrap_at = 80,
  zindex = 200
}
 |3: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  max_height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}
 |4: 0 |5: { "function M.on_attach(cfg: any, bufnr: any)" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:521 |1: sig_cfg new bufnr, winnr  |2: 7 |3: 1007
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:630 |1: extmark |2: 7 |3: 22 |4: 29 |5: 0 |6: LspSignatureActiveParameter
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:644 |1: extmark |2: 7 |3: 21 |4: 29 |5: 0
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:653 |1: extmark_id |2: 1
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:764 |1: changed
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:577 |1: delta |2: () |3:       require("lsp_signature").on_attach( |4:       require("lsp_signature").on_attach() |5: {}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:588 |1: {
  triggerCharacters = { "(", "," }
}
 |2:       require("lsp_signature").on_attach(
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:235 |1: ( |2: true
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:237 |1: (
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:235 |1: , |2: false
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:241 |1: not special |2: ,
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:252 |1: [%(,][^%(,%)]*$ |2: %(, |3: ^%(,%)
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:265 |1: last trigger char |2: (
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:620 |1: lsp cap:  |2: true |3: true |4: 41
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:195 |1: signature handler
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:244 |1: sig result |2: {
  bufnr = 1,
  client_id = 2,
  method = "textDocument/signatureHelp",
  params = {
    position = {
      character = 41,
      line = 327
    },
    textDocument = {
      uri = "file:///home/kiyoon/bin/vimrc4ubuntu/lua/user/lazy.lua"
    }
  }
}
 |3: {
  cfgActiveSignature = 0,
  signatures = { {
      activeParameter = 0,
      label = "function M.on_attach(cfg: any, bufnr: any)",
      parameters = { {
          label = { 21, 29 }
        }, {
          label = { 31, 41 }
        } }
    } }
}
 |4: {
  border = "rounded",
  check_completion_visible = true,
  line_to_cursor = '      require("lsp_signature").on_attach(',
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," }
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:155 |1: sig actPar |2: 0 |3: function M.on_attach(cfg: any, bufnr: any)
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:177 |1: nextpara: |2: {
  label = { 21, 29 }
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:188 |1: func |2: function M.on_attach(cfg: any, bufnr: any) |3: {
  label = { 21, 29 }
}

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:350 |1: md lines trim |2: { "```lua", "function M.on_attach(cfg: any, bufnr: any)", "```" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:373 |1: label: |2: function M.on_attach(cfg: any, bufnr: any)
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:448 |1: win config |2: {
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  check_completion_visible = true,
  close_events = { "BufHidden" },
  focus_id = "lsp_signature319",
  line_to_cursor = '      require("lsp_signature").on_attach(',
  max_height = 12,
  max_width = 80,
  stylize_markdown = true,
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," },
  wrap = true,
  wrap_at = 80,
  zindex = 200
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:399 |1: { "function M.on_attach(cfg: any, bufnr: any)" }
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:411 |1: popup size: |2: 42 |3: 1 |4: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:430 |1: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}
 |2: 0 |3: 36 |4: 1
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:321 |1: cleanup vt |2: 24
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:325 |1: bufnr, ns |2: 7 |3: 46
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:177 |1: virtual text:  |2: 327 |3: 328 |4: { "                                 🐼 cfg: any", "String" }

שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:503 |1: floating opt |2: {
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  check_completion_visible = true,
  close_events = { "BufHidden" },
  focus_id = "lsp_signature319",
  focusable = true,
  line_to_cursor = '      require("lsp_signature").on_attach(',
  max_height = 1,
  max_width = 80,
  noautocmd = true,
  offset_x = -20,
  offset_y = 0,
  stylize_markdown = true,
  trigger_from_lsp_sig = true,
  triggered_chars = { "(", "," },
  wrap = true,
  wrap_at = 80,
  zindex = 200
}
 |3: {
  anchor = "SW",
  border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
  col = 0,
  height = 1,
  max_height = 1,
  relative = "cursor",
  row = 0,
  style = "minimal",
  width = 42,
  zindex = 200
}
 |4: 0 |5: { "function M.on_attach(cfg: any, bufnr: any)" }

שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:630 |1: extmark |2: 7 |3: 22 |4: 29 |5: 0 |6: LspSignatureActiveParameter
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:644 |1: extmark |2: 7 |3: 21 |4: 29 |5: 0
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:653 |1: extmark_id |2: 2
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:710 |1: mode:    |2: n
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:734 |1: Insert leave cleanup
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:341 |1: stack traceback:
    ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:341: in function 'cleanup_async'
    .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:735: in function 'on_InsertLeave'
    [string ":lua"]:1: in main chunk
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:710 |1: mode:    |2: n
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:734 |1: Insert leave cleanup
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:341 |1: stack traceback:
    ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:341: in function 'cleanup_async'
    .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:735: in function 'on_InsertLeave'
    .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:759: in function ''
    vim/_editor.lua: in function <vim/_editor.lua:0>
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:719 |1: mode:    |2: n
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:725 |1: close timer
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:350 |1: async cleanup:  |2: n
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:321 |1: cleanup vt |2: 24
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:325 |1: bufnr, ns |2: 7 |3: 46
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:332 |1: closing winnr |2: 1007
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:719 |1: mode:    |2: n
שׁ .../nvim/lazy/lsp_signature.nvim/lua/lsp_signature/init.lua:725 |1: close timer
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:350 |1: async cleanup:  |2: n
שׁ ...vim/lazy/lsp_signature.nvim/lua/lsp_signature/helper.lua:321 |1: cleanup vt |2: 24

I think one of the last ones are relevant. I only put the last bit

ray-x commented 1 year ago

are you use noice by any chance?

kiyoon commented 1 year ago

are you use noice by any chance?

No, I don't use that although I may have installed it once.

kiyoon commented 1 year ago

But I use nvim-notify and wilder.nvim

nyngwang commented 1 year ago

@kiyoon Hi, just want to say thank you for helping me reply with the owner. I'm involving a mess with another plugin so cannot reply frequently with my old issues, as least recently.

ray-x commented 1 year ago

As from the log. there is nothing wrong... Also is the updated version work for you ?

kiyoon commented 1 year ago

@ray-x So far it seems to be ok. What did you change? @nyngwang No worries, thanks for the initial issue!

ray-x commented 1 year ago

TBH, added strict=false to ignore col position errors I have a feeling that the error was caused by an invalid floating buffer. (buffer might be closed by lsp handler or insert leave event)

kiyoon commented 1 year ago

At least it does the job well haha! Thanks for the fix, I'll let you know if I still face issues.