-
Notifications
You must be signed in to change notification settings - Fork 58
Adding custom libraries #17
Comments
@folke |
Update to the latest version and do something like: local lspconfig = require('lspconfig')
local luadev = require("lua-dev").setup({
-- add any options here, or leave empty to use the default settings
-- lspconfig = {
-- cmd = {"lua-language-server"}
-- },
})
table.insert(luadev.settings.Lua.workspace.library, "/usr/lib/pd/extra/pdlua")
lspconfig.sumneko_lua.setup(luadev) |
Thanks for your response and the qucik change! appreciate it I get the following error
|
Sorry, should be: luadev.settings.Lua.workspace.library["/usr/lib/pd/extra/pdlua"] = true
Either way, please just check the docs for lua-language server. You can change whatever you want on the condig returned by lua-dev. |
Thanks. That works.
Only recently setting up sumneko. Still learning. Thank you for your help and patience. |
Is there a way to do this with the current state of Neodev? It would be great if there was an option in the setup function to add more library folders to include when setting up the library. Not sure if there is a way to do it with the |
You should just add any custom libraries to the settings for lspconfig. No need to change anything in Neodev for that |
Thanks for the quick reply, I am doing that currently but I am wondering if neodev provides an easy way to only add the library when neodev is active. Since it's a folder in my Neovim runtime path but it's not getting access to variables defined in my |
I'm not sure if Neodev should be giving access to these things automatically when it sets up the lbrary runtime path. I can see the folder in my runtime path and Neodev is correctly enabling the runtime so I can get auto complete for Sorry I'm continuing this on this issue, I just didn't want to open a new issue if it was related to this one and decrease clutter on the repo. It seems like if it's not supposed to be automatically detected, I would want to be able to add it to the override function to include my |
I have
|
The config folder is never added to the workspace outside of the config folder, since in most cases (like when developing a plugin) that's not wanted. If you still need that for a certain folder, then just add it only for that project. You could use a |
This might be the noobest question in git issues history, but I cant for the life of me figure out how to add libraries apart from the default.
For example, before using lua-dev I had something like this in "regular" sumneko, and it worked correctly.
I have tried adding the same in
libraries = {}
section like thisand I have also tried in the same's lspconfig like this
But with either setup, the libraries wont get picked up. I dont get any lsp features like hover, autocompletion, nothing at all.
I am sure there is a an exceedingly simple answer to this, which once you point out I will feel too stupid to show my face on github again.
Can you please help?
The text was updated successfully, but these errors were encountered: