-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't memoize default_setup (#62)
- Loading branch information
Buck Evan
authored
Apr 19, 2023
1 parent
04fc509
commit 0bf4c84
Showing
2 changed files
with
3 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
local _ = require('mason-core.functional') | ||
local null_ls = require('null-ls') | ||
|
||
-- @param source string | ||
-- @param types string[] | ||
return _.memoize(function(source, types) | ||
return function(source, types) | ||
if not null_ls.is_registered(source) then | ||
vim.tbl_map(function(type) | ||
null_ls.register(null_ls.builtins[type][source]) | ||
end, types) | ||
end | ||
end) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters