Skip to content

Commit

Permalink
feat: recognize languages & enchance configuration (#7)
Browse files Browse the repository at this point in the history
* feat: add get_extension

* feat: add language icons (#8)

chore: icons

Co-authored-by: Youssef Khalil <[email protected]>

* add copyright notice, rename to language_icons

* add zed icons

* change assets notice

* feat: add language recognition from file name or ext

* style: cleanup

* feat: regex support

* feat: return text as default

* build: reduce deps

* docs: lsp configuration

* feat: large text, small text

* refactor: simplify configuration

* refactor: simplify discord

* feat: placeholders

* feat: make state & details option

---------

Co-authored-by: Youssef Khalil <[email protected]>
  • Loading branch information
xhyrom and darkyeg authored Aug 4, 2024
1 parent 9495faa commit f7af3a6
Show file tree
Hide file tree
Showing 203 changed files with 732 additions and 211 deletions.
220 changes: 54 additions & 166 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,22 @@ You can configure state, details and git integration by changing Discord Presenc
"lsp": {
"discord_presence": {
"initialization_options": {
// Base url for all language icons
"base_icons_url": "https://raw.githubusercontent.com/xhyrom/zed-discord-presence/feat/recognize-languages/assets/icons/",

"state": "Working on {filename}",
"details": "In {workspace}",
// URL for large image
"large_image": "{base_icons_url}/{language}.png",
"large_text": "{language:u}", // :u makes first letter upper-case
// URL for small image
"small_image": "{base_icons_url}/zed.png",
"small_text": "Zed",
"git_integration": true
}
}
}
}
```

You can also use `null` to unset the option. Possible for everything except `base_icons_url` and `git_integration`
Loading

0 comments on commit f7af3a6

Please sign in to comment.