Skip to content

Commit

Permalink
chore: run stylua
Browse files Browse the repository at this point in the history
  • Loading branch information
weskoerber committed Aug 3, 2023
1 parent b4e19b7 commit e632901
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lua/obsidian/command.lua
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ end

command.switch_workspace = function(client, data)
if not util.contains_key(client.opts.workspaces, data.args) then
echo.err("Workspace '" .. data.args .. "' does not exist", client.opts.log_level);
echo.err("Workspace '" .. data.args .. "' does not exist", client.opts.log_level)
return
end

Expand Down
4 changes: 2 additions & 2 deletions lua/obsidian/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ config.ClientOpts = {}
---@return obsidian.config.ClientOpts
config.ClientOpts.default = function()
return {
workspaces = { },
workspaces = {},
default_workspace = nil,
log_level = nil,
notes_subdir = nil,
Expand All @@ -52,7 +52,7 @@ config.ClientOpts.normalize = function(opts)
opts.completion = vim.tbl_extend("force", config.CompletionOpts.default(), opts.completion)
opts.daily_notes = vim.tbl_extend("force", config.DailyNotesOpts.default(), opts.daily_notes)
for key, value in pairs(opts.workspaces) do
opts.workspaces[key] = vim.fs.normalize(tostring(value))
opts.workspaces[key] = vim.fs.normalize(tostring(value))
end

return opts
Expand Down
6 changes: 3 additions & 3 deletions lua/obsidian/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ obsidian.new = function(opts)
end

if not current_workspace then
current_workspace = '.'
current_workspace = "."
opts.workspaces[current_workspace] = cwd
end

echo.info('current_workspace: ' .. current_workspace .. ' @ ' .. opts.workspaces[current_workspace], opts.log_level)
echo.info("current_workspace: " .. current_workspace .. " @ " .. opts.workspaces[current_workspace], opts.log_level)

self.dir = Path:new(opts.workspaces[current_workspace])
self.opts = opts
Expand All @@ -56,7 +56,7 @@ end
---@return obsidian.Client
obsidian.new_from_dir = function(dir)
local opts = config.ClientOpts.default()
vim.tbl_extend('force', opts.workspaces, { vim.fs.normalize(dir) })
vim.tbl_extend("force", opts.workspaces, { vim.fs.normalize(dir) })
return obsidian.new(opts)
end

Expand Down

0 comments on commit e632901

Please sign in to comment.