aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim_lsp/util.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim_lsp/util.lua')
-rw-r--r--lua/nvim_lsp/util.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/nvim_lsp/util.lua b/lua/nvim_lsp/util.lua
index a9ca5680..19d0c250 100644
--- a/lua/nvim_lsp/util.lua
+++ b/lua/nvim_lsp/util.lua
@@ -366,5 +366,10 @@ function M.utf8_config(config)
return config
end
+-- Returns a function which returns the same value forever.
+function M.once(value)
+ return function() return value end
+end
+
return M
-- vim:et ts=2 sw=2