You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per the discussion in #2948, it would be great to update the documentation to clearly indicate that the /lua folder needs to be used at the end in order for the Lua language server to pick up documentations for the Vim's Lua runtime.
Notice that the line where vim.env.VIMRUNTIME is described lacks the /lua folder at the end.
Actual behavior
The documentation does not mention concatenating the /lua folder when setting up the lua_ls.
Expected behavior
The documentation should mention concatenating the /lua folder when setting up the lua_ls.
Minimal config
require'lspconfig'.lua_ls.setup {
on_init=function(client)
localpath=client.workspace_folders[1].nameifnotvim.loop.fs_stat(path..'/.luarc.json') andnotvim.loop.fs_stat(path..'/.luarc.jsonc') thenclient.config.settings=vim.tbl_deep_extend('force', client.config.settings, {
Lua= {
runtime= {
-- Tell the language server which version of Lua you're using-- (most likely LuaJIT in the case of Neovim)version='LuaJIT'
},
-- Make the server aware of Neovim runtime filesworkspace= {
checkThirdParty=false,
library= {
vim.env.VIMRUNTIME-- "${3rd}/luv/library"-- "${3rd}/busted/library",
}
-- or pull in all of 'runtimepath'. NOTE: this is a lot slower-- library = vim.api.nvim_get_runtime_file("", true)
}
}
})
client.notify("workspace/didChangeConfiguration", { settings=client.config.settings })
endreturntrueend
}
LSP log
None.
The text was updated successfully, but these errors were encountered:
Description
As per the discussion in #2948, it would be great to update the documentation to clearly indicate that the
/lua
folder needs to be used at the end in order for the Lua language server to pick up documentations for the Vim's Lua runtime.Neovim version
NVIM v0.9.4
Build type: Release
LuaJIT 2.1.1700008891
Nvim-lspconfig version
master
Operating system and version
Arch
Affected language servers
lua_ls
Steps to reproduce
server_configurations.md
file.lua_ls
.vim.env.VIMRUNTIME
is described lacks the/lua
folder at the end.Actual behavior
The documentation does not mention concatenating the
/lua
folder when setting up thelua_ls
.Expected behavior
The documentation should mention concatenating the
/lua
folder when setting up thelua_ls
.Minimal config
LSP log
None.
The text was updated successfully, but these errors were encountered: