Skip to content

Conversation

Mo-tmd
Copy link

@Mo-tmd Mo-tmd commented Apr 27, 2025

This seems to make it possible to jump to any lua file under rootPath, regardless of directory structure.

I'm a noob in this area, please let me know if there's anything strange.

@Mo-tmd Mo-tmd requested a review from glepnir as a code owner April 27, 2025 18:28
@Mo-tmd Mo-tmd force-pushed the master branch 4 times, most recently from d16d96b to 6953f0c Compare April 27, 2025 18:42
This seems to make it possible to jump to any file regardless of
project structure.
@Mo-tmd Mo-tmd changed the title featu(lua_ls): Add rootPath to workspace.library feat(lua_ls): add rootPath to workspace.library Apr 27, 2025
@antonk52

This comment was marked as resolved.

@Mo-tmd

This comment was marked as resolved.

@antonk52

This comment was marked as resolved.

@justinmk
Copy link
Member

This seems interesting but in the Lua projects I tried, it doesn't seem to have any effect, the library is always {}.

Here is the output of :lua =vim.lsp.config['lua_ls'] :

{
  before_init = <function 1>,
  cmd = { "lua-language-server" },
  filetypes = { "lua" },
  name = "lua_ls",
  root_markers = { ".luarc.json", ".luarc.jsonc", ".luacheckrc", ".stylua.toml", "stylua.toml", "selene.toml", "selene.yml", ".git" },
  settings = {
    Lua = {
      workspace = {
        library = {}
      }
    }
  }
}

What is an example that you are seeing? And what does :checkhealth vim.lsp show for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants