mirror of
https://github.com/ThePrimeagen/harpoon.git
synced 2025-07-16 11:00:23 +00:00
style: remove trailing whitespace
This commit is contained in:
parent
df4fbd7f73
commit
5c0ab042f9
@ -43,7 +43,7 @@ function merge_table_impl(t1, t2)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function merge_tables(...)
|
function merge_tables(...)
|
||||||
local out = {}
|
local out = {}
|
||||||
for i = 2, select("#",...) do
|
for i = 2, select("#",...) do
|
||||||
merge_table_impl(out, select(i, ...))
|
merge_table_impl(out, select(i, ...))
|
||||||
@ -51,7 +51,7 @@ function merge_tables(...)
|
|||||||
return out
|
return out
|
||||||
end
|
end
|
||||||
|
|
||||||
function ensure_correct_config(config)
|
function ensure_correct_config(config)
|
||||||
local projects = config.projects
|
local projects = config.projects
|
||||||
if projects[cwd] == nil then
|
if projects[cwd] == nil then
|
||||||
projects[cwd] = {
|
projects[cwd] = {
|
||||||
@ -73,7 +73,7 @@ function ensure_correct_config(config)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function expand_dir(config)
|
function expand_dir(config)
|
||||||
local projects = config.projects or {}
|
local projects = config.projects or {}
|
||||||
local expanded_config = {}
|
local expanded_config = {}
|
||||||
for k in pairs(projects) do
|
for k in pairs(projects) do
|
||||||
@ -99,7 +99,7 @@ M.save = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- 1. saved. Where do we save?
|
-- 1. saved. Where do we save?
|
||||||
M.setup = function(config)
|
M.setup = function(config)
|
||||||
function read_config(config)
|
function read_config(config)
|
||||||
return vim.fn.json_decode(Path:new(config):read())
|
return vim.fn.json_decode(Path:new(config):read())
|
||||||
end
|
end
|
||||||
@ -119,10 +119,10 @@ M.setup = function(config)
|
|||||||
c_config = {}
|
c_config = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
local complete_config =
|
local complete_config =
|
||||||
merge_tables(
|
merge_tables(
|
||||||
{projects = {}},
|
{projects = {}},
|
||||||
expand_dir(c_config),
|
expand_dir(c_config),
|
||||||
expand_dir(u_config),
|
expand_dir(u_config),
|
||||||
expand_dir(config))
|
expand_dir(config))
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ M.get_mark_config = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- should only be called for debug purposes
|
-- should only be called for debug purposes
|
||||||
M.print_config = function()
|
M.print_config = function()
|
||||||
print(vim.inspect(harpoon_config))
|
print(vim.inspect(harpoon_config))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user