symbols-outline.nvim icon indicating copy to clipboard operation
symbols-outline.nvim copied to clipboard

symbols-outline.lua:307: attempt to index field 'vijw' (a nil value)

Open zhanglin2018 opened this issue 2 years ago • 3 comments

image

E5108: Error executing lua ...acker/start/symbols-outline.nvim/lua/symbols-outline.lua:307: attempt to index field 'vijw' (a nil value) stack traceback: ...acker/start/symbols-outline.nvim/lua/symbols-outline.lua:307: in function 'toggle_outline' [string ":lua"]:1: in main chunk Press ENTER or type command to continue

zhanglin2018 avatar Aug 20 '22 10:08 zhanglin2018

i don't know how to fix this issue.

zhanglin2018 avatar Aug 20 '22 10:08 zhanglin2018

I suspect the configuration pattern may have changed recently.

I was getting a very similar error message.

My error message said attempt to index field 'view' (a nil value) - note view rather than vijw (I suspect a typo in your bug report, @zhanglin2018 ...?).

My config contained a line that looked like this:

vim.g.symbols_outline = { ... }

Rather than setting that global variable, I have changed it so I pass the table directly to the setup() method, and the problem has gone away:

require("symbols-outline").setup({ ... })

Geraint avatar Aug 22 '22 11:08 Geraint

@Geraint i'm not the original poster but thank you very much for your input here! I was very much puzzled with the very same issue and kept checking here for a fix... and it worked exactly as you describe.

brt avatar Aug 22 '22 14:08 brt

Went there before I found that I had local ok, outline = pcall(require, "symbols_outline") at my config. Should be symbols-outline.

dzintars avatar Sep 12 '22 19:09 dzintars