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

Commit

Permalink
fix: deepcopy lsp config before unsetting library for fallback scopes.
Browse files Browse the repository at this point in the history
…Fixes #190
  • Loading branch information
folke committed Mar 29, 2024
1 parent 6a533ed commit 1c5dc3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lua/neodev/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ function M.on_new_config(config, root_dir)
config.handlers["workspace/configuration"] = config.handlers["workspace/configuration"]
or function(err, result, ctx, cfg)
local ret = vim.lsp.handlers["workspace/configuration"](err, result, ctx, cfg)
ret = vim.deepcopy(ret)
-- when scopeUri is not set, then the requested config is for the fallback scope
-- Don't set workspace libraries for the fallback scope
-- Thanks to: https://github.com/LuaLS/lua-language-server/issues/1596#issuecomment-1855087288
Expand Down

0 comments on commit 1c5dc3e

Please sign in to comment.