diff options
| author | srdusr <trevorgray@srdusr.com> | 2022-10-26 00:00:35 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2022-10-26 00:00:35 +0200 |
| commit | 7f30d31c9142bbeb10a21b4de9f58bc6d3a0a3f1 (patch) | |
| tree | 33fb7e88cc52a7b44994cdaedf3e85b18feee753 /lua/user/utils.lua | |
| parent | 463a9cef8349bbfd2ebf77f60a6a82799271021a (diff) | |
| download | dotfiles-7f30d31c9142bbeb10a21b4de9f58bc6d3a0a3f1.tar.gz dotfiles-7f30d31c9142bbeb10a21b4de9f58bc6d3a0a3f1.zip | |
Removed unnecessary files
Diffstat (limited to 'lua/user/utils.lua')
| -rw-r--r-- | lua/user/utils.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lua/user/utils.lua b/lua/user/utils.lua index 3c6f89e..bfb5faa 100644 --- a/lua/user/utils.lua +++ b/lua/user/utils.lua @@ -31,6 +31,15 @@ function M.may_create_dir(dir) end end +M['unload_lua_namespace'] = function(prefix) + local prefix_with_dot = prefix .. '.' + for key, value in pairs(package.loaded) do + if key == prefix or key:sub(1, #prefix_with_dot) == prefix_with_dot then + package.loaded[key] = nil + end + end +end + -- toggle cmp completion vim.g.cmp_toggle_flag = false -- initialize local normal_buftype = function() |
