Skip to content

module completion suggestions missing first characters #269

Description

@HiPhish

Hello,

When trying to complete the name of a module for require I noticed a few issues:

  • some of the module names are missing their first character. For example, if I type require' the suggestions will include ello instead of hello, ennel instead of fennel, doc instea of ldoc, arkdown instead of markdown, and so on.
  • Modules from sub-directories are included without prefix, i.e. instead of pl.class I see class (from `~/.luarocks/)

Commit: f220b54
OS: Void Linux
Client: Neovim with built-in LSP client
Server settings:

Lua =
  completion = {
    callSnippet = "Both",
  },
  runtime = {
    version = "Lua 5.3",
  },
  workspace = {
    library = {
      ["/home/hiphish/.luarocks/share/lua/5.3"] = true,
      ["/usr/share/lua/5.3"] = true,
    },
    maxPreload = 1000,
    preloadFileSize = 1000,
  },
}

It appears that the server searches the directories from Lua.workspace.directory recursively for files and suggests them in require. Log files are not created, so I cannot post any. Here are two screenshots instead.

Screenshot_20201124_210316
Screenshot_20201124_230112

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions