Skip to content

[FEAT]: Support discovering tool/language by file contents #44

Description

@daUnknownCoder

Are you on the latest version?

  • I have updated to the latest version.

Have you tried it with default config?

  • I have tried the default config.

Description

I wonder if you have used hyprland or not (the infamous wayland tiling window manager that does not sacrifice on its looks)

so the filetype is hypr and the directory it is stored in is ~/.config/hypr and all files have an extension .conf so what happens is, i want to set the Hyprland Logo in Rich Presence when I am editing my Hyprland config, i tried setting

conf = { "Hyprland", "https://styles.redditmedia.com/t5_6sciw0/styles/communityIcon_h3cvittvupi91.png" }

which works, but it shows the Hyprland logo for every .conf file, like mpd.conf, some filetypes excluded (like kitty.conf, which has the kitty logo) so the other i have tried is setting hypr = {...}, hyprlang = {...}, so the thing is Hyprland's config has official tree-sitter support too (https://github.com/tree-sitter-grammars/tree-sitter-hyprlang?tab=readme-ov-file)

Neovim version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1702233742

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

OS information

6.7.9-arch1-1 (Hyprland)

Steps to reproduce

It doesnt work so?

Logs

[presence.nvim] Setting up plugin for linux
[presence.nvim] Using XDG runtime path: /run/user/1000/app/com.discordapp.Discord
[presence.nvim] Using Discord IPC socket path: /run/user/1000/app/com.discordapp.Discord/discord-ipc-0
[presence.nvim] Checking Discord IPC socket at /run/user/1000/app/com.discordapp.Discord/discord-ipc-0...
[presence.nvim] Using id 99aaaa7a-6a4a-4372-a167-a142a33b7d25
[presence.nvim] Completed plugin setup
[presence.nvim] Getting nvim socket paths...
[presence.nvim] Executing command: `ss -lx|grep -E ".+nvim.+"`
[presence.nvim] Checked Discord IPC socket, looks good!
[presence.nvim] Checked Discord IPC socket, looks good!
[presence.nvim] Got nvim socket paths: {}
[presence.nvim] No other remote nvim instances
[presence.nvim] Got nvim socket paths: {}
[presence.nvim] No other remote nvim instances
[presence.nvim] Handling FocusGained event...
[presence.nvim] Connecting to Discord...
[presence.nvim] Connected to Discord
[presence.nvim] Authorizing with Discord...
[presence.nvim] Wrote message to pipe
[presence.nvim] Authorized with Discord for daunknownguy
[presence.nvim] Parsed filename hyprland.conf with conf extension
[presence.nvim] Getting project name for /home/daUnknownCoder/.config/hypr...
[presence.nvim] Not a git repository, skipping...
[presence.nvim] Setting activity for /home/daUnknownCoder/.config/hypr/hyprland.conf...
[presence.nvim] Using file asset: { "Configuration file", "config" }
[presence.nvim] No project detected
[presence.nvim] Sync activity to all peers...
[presence.nvim] Setting Discord activity...
[presence.nvim] Wrote message to pipe
[presence.nvim] Set activity in Discord for hyprland.conf
[presence.nvim] Handling FocusGained event...
[presence.nvim] Activity already set for /home/daUnknownCoder/.config/hypr/hyprland.conf, skipping...

Aditional info

with hypr = {...} or hyprland = {...}
image

with conf = {...}
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is neededwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions