1
0
Fork 0
mirror of https://github.com/jiriks74/presence.nvim synced 2025-07-15 22:08:49 +02:00

Merge branch 'andweeb:main' into main

This commit is contained in:
Sean Ray 2022-12-30 17:35:45 -05:00 committed by GitHub
commit 4249c0c72b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 5 deletions

View file

@ -113,6 +113,7 @@ return {
["requirements.txt"] = { "requirements.txt", "python" },
["tailwind.config.js"] = { "Tailwind", "tailwind" },
["terraform.rc"] = { "Terraform config", "terraform" },
["v.mod"] = { "v.mod", "vlang" },
["watchman.json"] = { "Watchman config", "watchman" },
["webpack.config.js"] = { "Webpack", "webpack" },
["webpack.config.ts"] = { "Webpack", "webpack" },
@ -254,6 +255,8 @@ return {
tsx = { "React", "react" },
txt = { "Text file", "text" },
uc = { "UnrealScript", "unreal" },
v = { "Vlang", "vlang" },
vsh = { "Vlang shell script", "vlang" },
vb = { "Visual Basic", "visual_basic" },
vbp = { "Visual Basic project file", "visual_basic" },
vim = { "Vim", "vim" },

View file

@ -4,5 +4,7 @@ return {
["NERD_tree_"] = "NERDTree",
["[defx] default-"] = "Defx",
["netrw"] = "Netrw",
["TelescopePrompt"] = "Telescope"
["TelescopePrompt"] = "Telescope",
['neo-tree'] = 'Neotree',
['fern'] = 'Fern'
}

View file

@ -121,6 +121,7 @@ function Presence:setup(options)
self:set_option("line_number_text", "Line %s out of %s")
self:set_option("blacklist", {})
self:set_option("buttons", true)
self:set_option("show_time", true)
-- File assets options
self:set_option("file_assets", {})
for name, asset in pairs(default_file_assets) do
@ -820,9 +821,9 @@ function Presence:update_for_buffer(buffer, should_debounce)
local activity = {
state = status_text,
assets = assets,
timestamps = {
timestamps = self.options.show_time == 1 and {
start = relative_activity_set_at,
},
} or nil,
}
-- Add button that links to the git workspace remote origin url
@ -870,9 +871,9 @@ function Presence:update_for_buffer(buffer, should_debounce)
if self.workspaces[project_path] then
self.workspaces[project_path].updated_at = activity_set_at
activity.timestamps = {
activity.timestamps = self.options.show_time == 1 and {
start = self.workspaces[project_path].started_at,
}
} or nil
else
self.workspaces[project_path] = {
started_at = activity_set_at,