mirror of
https://github.com/jiriks74/presence.nvim
synced 2025-06-23 21:08:56 +02:00
Merge branch 'main' into windows-support
This commit is contained in:
commit
4f9eb6137a
2 changed files with 62 additions and 2 deletions
lua/presence
|
@ -422,13 +422,16 @@ function Presence:update_for_buffer(buffer, should_debounce)
|
|||
local parent_dirpath = self.get_dir_path(buffer, self.os.path_separator)
|
||||
local extension = self.get_file_extension(filename)
|
||||
|
||||
self.log:debug(string.format("Parsed filename %s with %s extension", filename, extension or "no"))
|
||||
|
||||
-- Determine image text and asset key
|
||||
local name = filename
|
||||
local asset_key = "file"
|
||||
local asset_key = "code"
|
||||
local description = filename
|
||||
local file_asset = extension and file_assets[extension] or file_assets[filename]
|
||||
local file_asset = file_assets[filename] or file_assets[extension]
|
||||
if file_asset then
|
||||
name, asset_key, description = unpack(file_asset)
|
||||
self.log:debug(string.format("Using file asset: %s", vim.inspect(file_asset)))
|
||||
end
|
||||
|
||||
local file_text = description or name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue