symbols-outline.nvim
                                
                                 symbols-outline.nvim copied to clipboard
                                
                                    symbols-outline.nvim copied to clipboard
                            
                            
                            
                        Use vim.lsp.protocol.CompletionItemKind
Users can override their icons for completion popup menu with vim.lsp.protocol.CompletionItemKind. It would be nice if symbols-outline could use them as well so icons are the same. What do you think? Is it feasible?
It is feasible, but I am not sure if there are defaults already set, if there arent then it might take some work but ill implement it as an option
It would be great to be able to get defaults table. As far I can see, it is set here, thus one can get it with require('symbols-outline.config').options.symbols, but it seems it's not available at init time, because setup() is not called yet.
For instance, I already have defined my own symbols table
local symbols = {
  Boolean = "⊨",
  Class = '∴',
...
and I would like to construct new symbols table like that:
local default_outline_symbols = require('symbols-outline.config').options.symbols
local outline_symbols = {}
for type, definition in pairs(default_outline_symbols) do
  local my_definition = { hl = definition.hl, icon = symbols[type] or definition.icon }
  outline_symbols[type] =  my_definition
end
vim.g.symbols_outline = {
    symbols = outline_symbols
}
This way I wouldn't have to copy names of keys and highlight groups.
It would be great to be able to get defaults table. As far I can see, it is set here, thus one can get it with
require('symbols-outline.config').options.symbols, but it seems it's not available at init time, becausesetup()is not called yet.For instance, I already have defined my own symbols table
local symbols = { Boolean = "⊨", Class = '∴', ...and I would like to construct new symbols table like that:
local default_outline_symbols = require('symbols-outline.config').options.symbols local outline_symbols = {} for type, definition in pairs(default_outline_symbols) do local my_definition = { hl = definition.hl, icon = symbols[type] or definition.icon } outline_symbols[type] = my_definition end vim.g.symbols_outline = { symbols = outline_symbols }This way I wouldn't have to copy names of keys and highlight groups.
I will export the default options in the config module then
Thank you.
Just a small related issue, I'm attempting to configure this as per https://github.com/simrat39/symbols-outline.nvim/issues/19#issuecomment-913660023, but require("symbols-outline.config").options.symbols is coming out as nil
Once nvim is up, if I call :lua print(require("symbols-outline.config").options.symbols), I can see the table exists, but if I attempt to do it in my own config, the import works fine, but the table is nil.
Am I missing something?
Using packer to install the plugin, if it helps.
Just a small related issue, I'm attempting to configure this as per #19 (comment), but
require("symbols-outline.config").options.symbolsis coming out asnilOnce nvim is up, if I call
:lua print(require("symbols-outline.config").options.symbols), I can see the table exists, but if I attempt to do it in my own config, the import works fine, but the table isnil.Am I missing something?
Using packer to install the plugin, if it helps.
@SurrealTiggi the config.options table would not be initialized before the setup function is called. If you want to use the symbols before setup you can use the config.defaults table. Otherwise move the code to some place that can be called after the setup call.