From b97bcbeddc3902911c2e9ab5f13b5327a81c745f Mon Sep 17 00:00:00 2001 From: Ashkan Kiani Date: Wed, 13 Nov 2019 10:45:30 -0800 Subject: Add skeleton and refactor texlab. --- lua/common_lsp/util.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lua/common_lsp/util.lua') diff --git a/lua/common_lsp/util.lua b/lua/common_lsp/util.lua index 2de92447..ee48b5d7 100644 --- a/lua/common_lsp/util.lua +++ b/lua/common_lsp/util.lua @@ -54,5 +54,20 @@ function M.tbl_deep_extend(dst, ...) return dst end +function M.nvim_multiline_command(command) + validate { command = { command, 's' } } + for line in vim.gsplit(command, "\n", true) do + api.nvim_command(line) + end +end + +function M.lookup_section(settings, section) + for part in vim.gsplit(section, '.', true) do + settings = settings[part] + end + return settings +end + + return M -- vim:et ts=2 sw=2 -- cgit v1.2.3-70-g09d2