sumneko_lua.lua 906 B

12345678910111213141516171819202122232425262728293031323334
  1. local dev_opts = {
  2. library = {
  3. vimruntime = true, -- runtime path
  4. types = true, -- full signature, docs and completion of vim.api, vim.treesitter, vim.lsp and others
  5. -- plugins = true, -- installed opt or start plugins in packpath
  6. -- you can also specify the list of plugins to make available as a workspace library
  7. plugins = { "plenary.nvim" },
  8. },
  9. override = nil, -- function(root_dir, options) end,
  10. }
  11. local lua_dev_loaded, lua_dev = pcall(require, "lua-dev")
  12. if lua_dev_loaded then
  13. lua_dev.setup(dev_opts)
  14. end
  15. local opts = {
  16. settings = {
  17. Lua = {
  18. diagnostics = {
  19. globals = { "vim", "lvim", "packer_plugins" },
  20. },
  21. workspace = {
  22. library = {
  23. [require("lvim.utils").join_paths(get_runtime_dir(), "lvim", "lua")] = true,
  24. },
  25. maxPreload = 100000,
  26. preloadFileSize = 10000,
  27. },
  28. },
  29. },
  30. }
  31. return opts