Comments (11)
Thanks. That works.
Either way, please just check the docs for lua-language server. You can change whatever you want on the condig returned by lua-dev.
Only recently setting up sumneko. Still learning. Thank you for your help and patience.
from neodev.nvim.
@folke
I just tried your gist article which preceded this plugin. Putting the desired paths in that setup's add("/usr/lib/pd/extra/pdlua")
works perfectly
Is there anything that I am doing syntactically wrong in what in my previous post
from neodev.nvim.
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)
from neodev.nvim.
Thanks for your response and the qucik change! appreciate it
I get the following error
E5100: Cannot convert given lua table: table should either have a sequence of positive integer keys or contain only string keys
Error executing vim.schedule lua callback: /usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:399: error converting argument 1
from neodev.nvim.
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.
from neodev.nvim.
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 override
function. I can see that I can modify the setup options there like enable/disable the library or plugins, but is there a way to add a specific folder to the workspace library list?
from neodev.nvim.
You should just add any custom libraries to the settings for lspconfig. No need to change anything in Neodev for that
from neodev.nvim.
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 ~/.config/nvim
folder
from neodev.nvim.
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 vim
types as well as plugins, but it's not properly adding the other folders in the runtime path as part of the library. So I can't get auto complete for the other variables that I have defined in other runtime path folders. So in this case I want it to automatically add runtime path folders to the workspace library and only when neodev has detected that it should be enabled. So adding it to my global lspconfig
settings for sumneko_lua
isn't really an appropriate place since it's only related to my neovim configuration files/folders
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 config
folder and other runtime path folders.
from neodev.nvim.
I have ~/.config/separate_folder
in my RTP and investigating the workspace settings that are set with vim.lsp.get_active_client()
I see that it's correctly adding the neodev stable types, my user/share/nvim/runtime/lua
and ~/.config/separate_folder/lua
but it's not adding ~/.config/nvim/lua
which is still in my RTP and should be getting checked
workspace = {
checkThirdParty = false,
ignoreDir = { "types/nightly", "lua" },
library = { "/home/micah/.local/share/nvim/lazy/neodev.nvim/types/stable", "/usr/share/nvim/runtime/lua", "/home/micah
/.config/separate_folder/lua" }
}
from neodev.nvim.
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 luarc.json
file in that folder, to add in your config as a workspace folder.
from neodev.nvim.
Related Issues (20)
- bug: sign_place() can't accept buffer name as "buf" param HOT 2
- bug: Can't get completion for plugins HOT 15
- bug: duplicated/shorter documentation with neodev HOT 3
- bug: Inconsistent application of `override` function HOT 1
- feature: just get the LSP server settings
- feature: Type inference with lazy `opts` HOT 1
- feature: Resolve symlink
- feature: Possibly generate luacheckrc or selene configs of the neovim API? HOT 4
- bug: `too many open files` when the workspace is large HOT 1
- bug: neodev with lspconfig and custom on_attach HOT 1
- Remove nightly meta annotations conflicting with upstream neovim HOT 1
- New releases?
- bug: example .neoconf.json uses "sumneko_lua" instead of "lua_ls" HOT 2
- bug: Recent attempt to fix the double Lua LSP workspace loading progress seems to break Lua indexes in certain situations HOT 3
- bug: no completions in `~/.config/nvim/after` directory HOT 4
- bug: neodev not working with mason-lspconfig HOT 8
- bug:
- bug: Neodev does not load in other worksapce.
- feature: plugin description on hover HOT 1
- bug: Change to use nightly types causes missing types for vim.uv.* HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neodev.nvim.