simrat39 / symbols-outline.nvim

A tree like view for symbols in Neovim using the Language Server Protocol. Supports all your favourite languages.
MIT License
1.85k stars 101 forks source link

Error on SymbolsOutlineOpen #189

Closed gsalvatella closed 2 years ago

gsalvatella commented 2 years ago

The following error shows up when issuing :SymbolsOutlineOpen in vim 0.8.0:

E5108: Error executing lua ...acker/start/symbols-outline.nvim/lua/symbols-outline.lua:307: attempt to index field 'view' (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
arthur-yatsun commented 2 years ago

Have the same issue in nvim v0.9.0

farbodsz commented 2 years ago

I had the same issue and realised I forgot to add:

require("symbols-outline").setup()
gsalvatella commented 2 years ago

I can confirm that the problem is the new configuration. This is a breaking change from August that should have been notified properly.

arthur-yatsun commented 2 years ago

@gsalvatella, for me it's working now, I forgot to call the setup method

had this code in my config file

local status_ok, outline = pcall(require, "symbols_outline")
if status_ok then return end

it's working now with the code that @farbodsz suggested

gsalvatella commented 2 years ago

@arthur-yatsun The setup method was introduced on August. Before that simple vim globals were used, but these are not working anymore. So even if you had it correctly set up you need to update to the new setup method. I'm closing the issue anyways.