Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reported while launching nvim with lazy loading off #5

Open
TheCosmicAspect opened this issue Nov 20, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@TheCosmicAspect
Copy link

The inclusion of require("discord").setup({ ... }), as shown in the README causes the following error when launching nvim:

Error detected while processing /home/$USER/.config/nvim/init.lua:
Invalid plugin spec {

It then spits out a long list of variables (I can include the whole error message if needed, but it is moderately long.)
Nvim still loads afterwards without problem. It's just that the error is reported in the terminal every time before nvim loads.

@gorillamoe gorillamoe self-assigned this Nov 20, 2024
@gorillamoe gorillamoe added the bug Something isn't working label Nov 20, 2024
@gorillamoe
Copy link
Member

Can you show the full part of your configuration of discord.nvim.

It works for me 🤔

@TheCosmicAspect
Copy link
Author

Sorry for the late response.
My configuration:

require("discord").setup({
      -- General options
      auto_connect        = true,                       -- Automatically connect to Discord RPC
      logo                = "auto",                     -- "auto" or url
      logo_tooltip        = nil,                        -- nil or string
      main_image          = "language",                 -- "language" or "logo"
      log_level           = nil,                        -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
      debounce_timeout    = 10,                         -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
      blacklist           = {},                         -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
      file_assets          = {},                         -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
      show_time           = true,                       -- Show the timer
      global_timer        = true,                       -- if set false, timer will be reset on aucmds

    -- Rich Presence text options
      editing_text        = "Editing %s",               -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
      file_explorer_text   = "Browsing %s",              -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
      git_commit_text     = "Committing changes",       -- Format string rendered when committing changes in git (either string or function(filename: string): string)
      plugin_manager_text = "Managing plugins",         -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
      reading_text        = "Reading %s",               -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
      workspace_text      = "Working on %s",            -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
      line_number_text    = "Line %s out of %s",        -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
      terminal_text       = "Using Terminal",           -- Format string rendered when in terminal mode.
})

Using the same as posted in the README still causes the error.
Somehow the error is much shorter than last time and I can copy it all easily.

Error detected while processing /home/$USER/.config/nvim/init.lua:
Failed to load `plugins`

/home/$USER/.config/nvim/lua/plugins/init.lua:33: module 'discord' not found:
^Ino field package.preload['discord']
cache_loader: module discord not found
cache_loader_lib: module discord not found
^Ino file './discord.lua'
^Ino file '/usr/share/luajit-2.1/discord.lua'
^Ino file '/usr/local/share/lua/5.1/discord.lua'
^Ino file '/usr/local/share/lua/5.1/discord/init.lua'
^Ino file '/usr/share/lua/5.1/discord.lua'
^Ino file '/usr/share/lua/5.1/discord/init.lua'
^Ino file './discord.so'
^Ino file '/usr/local/lib/lua/5.1/discord.so'
^Ino file '/usr/lib/lua/5.1/discord.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'

# stacktrace:
  - lua/plugins/init.lua:33 _in_ **load**
  - init.lua:17
Press ENTER or type command to continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants