Refactoring

This commit is contained in:
Olivier Roques
2020-12-23 22:54:52 +01:00
parent be48745e8e
commit 7b0dd9a92c
5 changed files with 86 additions and 118 deletions

View File

@@ -1,21 +1,11 @@
local M = {}
M.theme = require('hardline.themes.default')
function M.echo(hlgroup, msg)
vim.cmd(string.format('echohl %s', hlgroup))
vim.cmd(string.format('echo "[hardline] %s"', msg))
vim.cmd('echohl None')
end
function M.build_args(tbl_args)
local args = {}
for k, v in pairs(tbl_args) do
table.insert(args, string.format('%s=%s', k, v))
end
return table.concat(args, ' ')
end
function M.set_active(active)
vim.api.nvim_win_set_var(0, 'hardline_active', active)
end