Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
fix: sumneko_lua -> lua_ls
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Feb 12, 2023
1 parent 4f59939 commit 5076ebb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ completion for the nvim lua API.

- Automatically configures **lua-language-server** for your **Neovim** config, **Neovim** runtime and plugin
directories
- [Annotations](https://github.com/sumneko/lua-language-server/wiki/Annotations) for completion, hover and signatures of:
- [Annotations](https://github.com/LuaLS/lua-language-server/wiki/Annotations) for completion, hover and signatures of:
- Vim functions
- Neovim api functions
- `vim.opt`
Expand Down Expand Up @@ -93,7 +93,7 @@ require("neodev").setup({
-- then setup your lsp server as usual
local lspconfig = require('lspconfig')

-- example to setup sumneko and enable call snippets
-- example to setup lua_ls and enable call snippets
lspconfig.lua_ls.setup({
settings = {
Lua = {
Expand Down
11 changes: 4 additions & 7 deletions lua/neodev/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ end
function M.setup_jsonls(config)
local schemas = config.settings.json and config.settings.json.schemas or {}
table.insert(schemas, {
name = "Sumneko Lua Settings",
url = "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
name = "LuaLS Settings",
url = "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
fileMatch = { ".luarc.json", ".luarc.jsonc" },
})
config.settings = vim.tbl_deep_extend("force", config.settings, {
Expand Down Expand Up @@ -78,11 +78,8 @@ function M.on_new_config(config, root_dir)
or {}

if opts.library.enabled then
config.settings = vim.tbl_deep_extend(
"force",
config.settings or {},
require("neodev.sumneko").setup(opts, config.settings).settings
)
config.settings =
vim.tbl_deep_extend("force", config.settings or {}, require("neodev.luals").setup(opts, config.settings).settings)
for _, lib in ipairs(library) do
table.insert(config.settings.Lua.workspace.library, lib)
end
Expand Down
File renamed without changes.

0 comments on commit 5076ebb

Please sign in to comment.