Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 14, 2024
1 parent 625db53 commit 2c3af36
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lua/hurl/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,17 @@ function M.setup()
vim.cmd('HurlSetVariable ' .. var_name .. ' ' .. var_value)
-- Append to the last line
vim.api.nvim_buf_set_lines(0, line_position, -1, false, { var_name .. ' = ' .. var_value })

-- Refresh the buffer display
vim.api.nvim_buf_set_lines(0, 0, -1, false, vim.tbl_map(function(key)
return key .. ' = ' .. _HURL_GLOBAL_CONFIG.global_vars[key]
end, vim.tbl_keys(_HURL_GLOBAL_CONFIG.global_vars)))
vim.api.nvim_buf_set_lines(
0,
0,
-1,
false,
vim.tbl_map(function(key)
return key .. ' = ' .. _HURL_GLOBAL_CONFIG.global_vars[key]
end, vim.tbl_keys(_HURL_GLOBAL_CONFIG.global_vars))
)
end)
end, {
nargs = '*',
Expand Down

0 comments on commit 2c3af36

Please sign in to comment.