Skip to content

Commit

Permalink
fix: run luacheck and stylua
Browse files Browse the repository at this point in the history
  • Loading branch information
weskoerber committed Aug 8, 2023
1 parent e788846 commit a4f40a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions lua/obsidian/command.lua
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,10 @@ end

command.switch_workspace = function(client, data)
if not data.args or #data.args == 0 then
echo.info("Current workspace: " .. client.current_workspace.name .. " @ " .. tostring(client.dir), client.opts.log_level)
echo.info(
"Current workspace: " .. client.current_workspace.name .. " @ " .. tostring(client.dir),
client.opts.log_level
)
return
end

Expand All @@ -665,10 +668,7 @@ command.switch_workspace = function(client, data)

client.current_workspace = workspace

echo.info(
"Switching to workspace '" .. workspace.name .. "' (" .. workspace.path .. ")",
client.opts.log_level
)
echo.info("Switching to workspace '" .. workspace.name .. "' (" .. workspace.path .. ")", client.opts.log_level)
client.dir = Path:new(workspace.path)
end

Expand Down
2 changes: 1 addition & 1 deletion lua/obsidian/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ end
---@return obsidian.Client
obsidian.new_from_dir = function(dir)
local opts = config.ClientOpts.default()
opts.workspaces = vim.tbl_extend("force", obsidian.workspace.new('test_vault', dir), opts.workspaces)
opts.workspaces = vim.tbl_extend("force", obsidian.workspace.new("test_vault", dir), opts.workspaces)
opts.detect_cwd = false
return obsidian.new(opts)
end
Expand Down
2 changes: 1 addition & 1 deletion lua/obsidian/workspace.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ end
---@param opts obsidian.config.ClientOpts
---@return obsidian.Workspace
workspace.get_from_opts = function(opts)
local current_workspace = nil
local current_workspace

if opts.detect_cwd then
current_workspace = workspace.get_workspace_from_cwd(opts.workspaces)
Expand Down

0 comments on commit a4f40a8

Please sign in to comment.