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

docs: add lua to runtime path #2949

Closed
wants to merge 1 commit into from

Conversation

mikesmithgh
Copy link

👋 hey! I think I found a typo in the configuration instructions.

Using plenary.nvim as an example, when I have

library = vim.api.nvim_get_runtime_file('', true),

it includes the path /Users/mike/.local/share/nvim/lazy/plenary.nvim which lua_ls does not seem to pickup on the child lua directory.

Changing it to

library = vim.api.nvim_get_runtime_file('lua', true),

it includes the path /Users/mike/.local/share/nvim/lazy/plenary.nvim/lua and everything works as expected. lua_ls picks up on the plenary plugins functions it, describe, etc.

Please let me know if you need any other info.

@mikesmithgh mikesmithgh requested a review from glepnir as a code owner December 24, 2023 03:31
Copy link
Contributor

Do not change server_configurations.md directly. Edit the lua source file instead. See https://github.com/neovim/nvim-lspconfig/blob/master/CONTRIBUTING.md#generating-docs

-- "${3rd}/busted/library",
}
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower
-- library = vim.api.nvim_get_runtime_file("", true)
-- library = vim.api.nvim_get_runtime_file("lua", true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not correct

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glepnir Hey yep you are right. This turned out to be a misconfig on my side.

I had: (note the extra curly braces)

                {
                  workspace = {
                    checkThirdParty = false,
                    -- Make the server aware of Neovim runtime files
                    library = vim.api.nvim_get_runtime_file('', true),
                  },
                },

I remove those and now it works perfectly fine.

                workspace = {
                  checkThirdParty = false,
                  -- Make the server aware of Neovim runtime files
                  library = vim.api.nvim_get_runtime_file('', true),
                },

well... sometimes you have to go down the rabbit hole to find a couple of rogue curly braces I guess 😂. Feel free to close.

@glepnir glepnir closed this Dec 26, 2023
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.

2 participants