Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Split codebase into client-server architecture #131

Open
wants to merge 593 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
593 commits
Select commit Hold shift + click to select a range
4e67d61
docs: update the examples
vyfor Dec 27, 2024
d6f7a40
style: remove unused variables
vyfor Dec 27, 2024
0d5c61b
fix(ipc): properly cleanup on exit
vyfor Dec 27, 2024
a4bccf4
perf: avoid unnecessary lookups
vyfor Dec 28, 2024
541a563
fix: set executable permissions on unix systems
vyfor Dec 28, 2024
23ba754
fix(server): use panic-free means to write to stdout
vyfor Dec 28, 2024
9423cf3
merge #147
vyfor Dec 28, 2024
e4f9b71
build: bump project version
vyfor Dec 28, 2024
20d27e1
ci: add freebsd target
vyfor Dec 28, 2024
6b320e9
refactor(config): set `cursor_update_mode` to `'on_hold'` by default
vyfor Dec 28, 2024
9ef07b7
docs: update the configuration guide
vyfor Dec 28, 2024
304d171
feat: add `notes` field
vyfor Dec 28, 2024
14ff704
chore: bump assets version
vyfor Dec 28, 2024
8ea0ad8
perf(mappings): significant performance improvements
vyfor Dec 28, 2024
78b7ca6
docs: update the configuration guide
vyfor Dec 28, 2024
f59f170
chore: update `.luacheckrc`
vyfor Dec 28, 2024
46164b4
refactor(usercmds): do not include stack traceback when logging on un…
vyfor Dec 28, 2024
a77e86c
fix(ipc): cleanup the stale pipe if the server process was forcefully…
vyfor Dec 29, 2024
ac35d97
ci: prepare for publishing to luarocks
vyfor Dec 29, 2024
8f723a5
refactor(config): rename `advanced.server.build` to `update`
vyfor Dec 29, 2024
cf728c3
docs: update the examples
vyfor Dec 29, 2024
eba53d9
feat(usercmds): add `:Cord update`
vyfor Dec 29, 2024
e2d16d2
refactor: update log message
vyfor Dec 29, 2024
f0749be
refactor: change `'Connecting'` log level to `DEBUG`
vyfor Dec 29, 2024
cf23961
docs: update the configuration guide
vyfor Dec 29, 2024
7774af4
docs: prefer `:Cord update` over `:Cord fetch`
vyfor Dec 29, 2024
3f1dba6
docs(readme): add installation step for `rocks.nvim`
vyfor Dec 29, 2024
ce8ce56
docs(readme): include a link for cord's brand new discord server
vyfor Dec 29, 2024
618ce39
fix(async): avoid including debug info on regular errors and fix erro…
vyfor Dec 29, 2024
47c3d6a
feat(usercmds): add `:Cord status`
vyfor Dec 29, 2024
2b0fc96
merge #152
vyfor Dec 29, 2024
807291f
feat(ipc): continuously read data from Discord pipe to detect sudden …
vyfor Dec 30, 2024
b5f7cee
style: fix warnings
vyfor Dec 31, 2024
a490466
merge #155
vyfor Dec 31, 2024
86f2a70
fix(server): fix logging level comparison
vyfor Dec 31, 2024
90ba49a
feat: implement reconnection mechanism for Discord
vyfor Dec 31, 2024
8e57129
fix: update server's status to `ready` on receiving the ready event
vyfor Dec 31, 2024
e2e2fd3
chore: temporarily comment out code
vyfor Dec 31, 2024
a5c8ca3
perf: handle logic responsible for broadcasting the ready event more …
vyfor Jan 1, 2025
3d478f1
fix: avoid joining the handles
vyfor Jan 1, 2025
66ca7cd
ci: integrate semantic release
vyfor Jan 2, 2025
52ae36f
build: set project version to `2.0.0-beta.1`
vyfor Jan 2, 2025
a60ac04
ci: update release.yml
vyfor Jan 2, 2025
f166cfc
chore(release): 1.0.0-beta.1 [skip ci]
semantic-release-bot Jan 2, 2025
638dadf
ci: update semantic release
vyfor Jan 2, 2025
1bd6bb9
fix: close uv handles before exiting
vyfor Jan 2, 2025
9744462
chore: update `.releaserc.json`
vyfor Jan 2, 2025
573814d
feat!: update semantic release's ci
vyfor Jan 2, 2025
149cb9f
style: fix warnings
vyfor Jan 2, 2025
f398c02
chore: set previous release in `.releaserc.json`
vyfor Jan 2, 2025
ca109e5
chore: remove changelog
vyfor Jan 2, 2025
1c39245
chore(release): 2.0.0-beta.1 [skip ci]
semantic-release-bot Jan 2, 2025
9984818
ci: update `release.yml`
vyfor Jan 2, 2025
705f0ac
chore: change semantic release config
vyfor Jan 2, 2025
02340b1
fix: resolve autocmds errors
vyfor Jan 2, 2025
5fbdd5d
chore: update releaserc
vyfor Jan 2, 2025
bb07214
chore: update `.gitignore`
vyfor Jan 2, 2025
371b6eb
chore(release): 2.0.0-beta.2 [skip ci]
semantic-release-bot Jan 2, 2025
c05af76
chore: remove changelog
vyfor Jan 2, 2025
30c3177
ci: update `release.yml`
vyfor Jan 2, 2025
fb719c6
chore(release): 2.0.0-beta.1 [skip ci]
semantic-release-bot Jan 2, 2025
8149653
chore: update semantic release
vyfor Jan 2, 2025
f253296
Merge branch 'client-server' of https://github.com/vyfor/cord.nvim in…
vyfor Jan 2, 2025
7e9c5b0
chore: update semantic release
vyfor Jan 2, 2025
f3f503f
chore(release): 2.0.0-beta.1 [skip ci]
semantic-release-bot Jan 2, 2025
e475c5c
chore: update semantic release
vyfor Jan 2, 2025
671f856
Merge branch 'client-server' of https://github.com/vyfor/cord.nvim in…
vyfor Jan 2, 2025
4792fd8
chore(release): 2.0.0-beta.1 [skip ci]
semantic-release-bot Jan 2, 2025
f555b4b
chore: prepare for publishing
vyfor Jan 2, 2025
164b4b1
chore: prepare for publishing
semantic-release-bot Jan 2, 2025
bc45219
chore: prepare for publishing
semantic-release-bot Jan 2, 2025
4f39c08
chore: prepare for publishing
semantic-release-bot Jan 2, 2025
48cda89
ci: track latest server version with changes in `server-version.txt`
vyfor Jan 3, 2025
6ad1f8d
ci: cache cargo
vyfor Jan 3, 2025
106a1da
ci: checkout to correct branch
vyfor Jan 3, 2025
c6ff458
fix: adjust server fetching logic
vyfor Jan 3, 2025
355d63a
feat: automatically download the server executable if it is not present
vyfor Jan 3, 2025
fe35d24
ci: fix cache key
vyfor Jan 3, 2025
edd237a
feat: notify user about ongoing reconnection if any
vyfor Jan 3, 2025
e24c3b9
refactor(config)!: organize `config.advanced`
vyfor Jan 3, 2025
651e177
refactor(config): change the default time it takes for an idle server…
vyfor Jan 3, 2025
3a00f41
docs: update the guides
vyfor Jan 3, 2025
eca13c3
ci: disable commenting on issues and prs
vyfor Jan 3, 2025
dd209d5
feat(usercmds): add `:Cord version` & `:Cord check_version`
vyfor Jan 3, 2025
ca5d658
chore: update `.stylua.toml`
vyfor Jan 3, 2025
e905ae3
feat(mappings): add Snacks Dashboard
vyfor Jan 3, 2025
f327a5f
ci: check if `cargo cross` exists in cache before installing
vyfor Jan 3, 2025
6d670bf
docs: update readme
vyfor Jan 3, 2025
71ed71b
fix: fetching local version should not produce errors
vyfor Jan 3, 2025
5cead48
fix(server): fetch and store the server version from the local text file
vyfor Jan 3, 2025
d4b0f32
build: bump project version
vyfor Jan 3, 2025
8bf2b77
chore: update server version to 2.0.0-beta.4 [skip ci]
github-actions[bot] Jan 3, 2025
8c91002
ci: update release workflow
vyfor Jan 3, 2025
e8fbba5
Merge branch 'client-server' of https://github.com/vyfor/cord.nvim in…
vyfor Jan 3, 2025
875497d
ci: update `release.yml`
vyfor Jan 3, 2025
d5c4231
fix(config): ensure idle icon is set when validating the config
vyfor Jan 3, 2025
544652f
ci: update semantic release
vyfor Jan 3, 2025
3087034
ci: avoid reinstalling rust every time
vyfor Jan 3, 2025
2ea0f55
build: bump project version
vyfor Jan 4, 2025
f7720ec
ci: prepare for publishing to crates.io
vyfor Jan 5, 2025
c901de3
docs: update readme
vyfor Jan 5, 2025
3250927
docs(examples): add an example for integration with last.fm
vyfor Jan 5, 2025
607c3bb
feat(usercmds): add `:Cord shutdown`
vyfor Jan 7, 2025
8824070
build: bump project version to 2.0.0-beta.6 [skip ci]
github-actions[bot] Jan 7, 2025
97b734e
ci: fix `release.yml`
vyfor Jan 7, 2025
4f24157
docs: update the guides
vyfor Jan 9, 2025
a67d435
fix(manager): fixed incorrect handling of timestamps
vyfor Jan 9, 2025
f945715
build: bump project version to 2.0.0-beta.7 [skip ci]
github-actions[bot] Jan 9, 2025
4cb5a01
ci: fixed semantic release workflow
vyfor Jan 9, 2025
fabd09f
fix(manager): fixed timestamp logic
vyfor Jan 9, 2025
ce5e9c0
build: bump project version to 2.0.0-beta.8 [skip ci]
github-actions[bot] Jan 9, 2025
67bc5b4
feat(mappings): add icon for Awk language
vyfor Jan 9, 2025
501d2ea
feat(mappings): add icon for config files
vyfor Jan 9, 2025
842fd15
feat(mappings): add icon for SVG
vyfor Jan 9, 2025
5487836
feat(mappings): add icon for image files
vyfor Jan 9, 2025
2e31f5d
build: bump project version to 2.0.0-beta.9 [skip ci]
github-actions[bot] Jan 9, 2025
2421524
feat(mappings): add icon for log files
vyfor Jan 9, 2025
f7de261
build: bump project version to 2.0.0-beta.10 [skip ci]
github-actions[bot] Jan 9, 2025
9768097
ci: add workflow for publishing to the GitHub Wiki
vyfor Jan 10, 2025
8f120df
docs: move the wiki to `.github/wiki`
vyfor Jan 10, 2025
2bf334e
Merge branch 'client-server' of https://github.com/vyfor/cord.nvim in…
vyfor Jan 10, 2025
019b467
docs: update wiki
vyfor Jan 10, 2025
1d32435
ci: update wiki workflow
vyfor Jan 10, 2025
f1899cf
docs(wiki): fix hyperlinks
vyfor Jan 10, 2025
efbfa36
docs(wiki): fix inconsistencies
vyfor Jan 10, 2025
b97170c
docs(wiki): update configuration guide
vyfor Jan 10, 2025
7046d03
docs: include a link to the discord server
vyfor Jan 10, 2025
4d7d35d
docs(wiki): explain text options configuration in a more concise way
vyfor Jan 10, 2025
dd5a79c
chore(icons): bump assets version
vyfor Jan 10, 2025
458a9ff
feat: add dashboard support for NvDash
arztareef Jan 10, 2025
a476f7e
merge #160
vyfor Jan 10, 2025
9c7205a
build: bump project version to 2.0.0-beta.11 [skip ci]
github-actions[bot] Jan 10, 2025
ff9c806
perf(mappings): performance optimizations
vyfor Jan 11, 2025
a715e1d
docs(wiki): update the wiki
vyfor Jan 11, 2025
8bcfa1a
Merge branch 'client-server' of https://github.com/vyfor/cord.nvim in…
vyfor Jan 11, 2025
cc0affa
feat(mappings): add a plethora of new mappings and icons
vyfor Jan 11, 2025
9e7b579
chore: bump assets version
vyfor Jan 11, 2025
15fd1ee
build: bump project version to 2.0.0-beta.12 [skip ci]
github-actions[bot] Jan 11, 2025
f09506d
fix(mappings): prioritize file extensions over filetypes
vyfor Jan 11, 2025
a4c0775
build: bump project version to 2.0.0-beta.13 [skip ci]
github-actions[bot] Jan 11, 2025
0731b02
feat(mappings): add support for a plethora of plugins
vyfor Jan 11, 2025
732fd29
feat(mappings): add more default icons
vyfor Jan 11, 2025
682c82a
feat(config): add `text.test` option
vyfor Jan 11, 2025
6e72bc3
feat(config): add `text.debug` option
vyfor Jan 11, 2025
f39fad7
feat(config): add `text.diagnostics` option
vyfor Jan 11, 2025
bfad8fb
feat(config): add `text.games` option
vyfor Jan 11, 2025
ac0bed6
refactor(config)!: rename `text.lsp_manager` -> `text.lsp`
vyfor Jan 11, 2025
6f9a70d
docs(wiki): update the configuration guide
vyfor Jan 11, 2025
1f440c7
build: bump project version to 2.0.0-beta.14 [skip ci]
github-actions[bot] Jan 11, 2025
7527afc
feat(manager): allow disabling text categories via boolean values
vyfor Jan 12, 2025
ef31070
merge #165
vyfor Jan 12, 2025
6623970
build: bump project version to 2.0.0-beta.15 [skip ci]
github-actions[bot] Jan 12, 2025
9b5e4fe
feat(mappings): add more new icons and mappings
vyfor Jan 12, 2025
de76bfa
docs: update readme
vyfor Jan 12, 2025
5dfc098
merge #167
vyfor Jan 12, 2025
b7733d3
build: bump project version to 2.0.0-beta.16 [skip ci]
github-actions[bot] Jan 12, 2025
7d0ef13
feat: add support for LazyVim (#168)
vyfor Jan 12, 2025
5320c44
build: bump project version to 2.0.0-beta.17 [skip ci]
github-actions[bot] Jan 12, 2025
fef32b2
feat: implement reconnection logic for initial connection
vyfor Jan 13, 2025
bef10f8
merge #170
vyfor Jan 13, 2025
8cedb93
build: bump project version to 2.0.0-beta.18 [skip ci]
github-actions[bot] Jan 13, 2025
817cd26
chore: update server version to 2.0.0-beta.18 [skip ci]
github-actions[bot] Jan 13, 2025
750036e
refactor(config): rename and reorganize hooks
vyfor Jan 14, 2025
2a2b111
feat: implement hooks handler
vyfor Jan 14, 2025
dbcd0b5
perf(config): compute only necessary arguments
vyfor Jan 14, 2025
b90ca4e
feat: introduce plugins system
vyfor Jan 14, 2025
2a8d3e7
docs(wiki): update the guides
vyfor Jan 14, 2025
a1d0f27
docs(readme): mention the new plugin system in the readme
vyfor Jan 14, 2025
626f229
docs(wiki): add a guide about the plugin system
vyfor Jan 14, 2025
f3705d7
feat(plugins): add `diagnostics` plugin
vyfor Jan 14, 2025
a8d7c8d
docs(wiki): document plugin usage
vyfor Jan 14, 2025
a299d5c
feat(plugins): add `cord.plugins.diagnostics`
vyfor Jan 14, 2025
ebe6c1a
docs(examples): use renamed hooks
vyfor Jan 14, 2025
cff042a
feat(plugins.diagnostics): add plugin description
vyfor Jan 14, 2025
7782b46
feat(plugins): add `cord.plugins.local_time`
vyfor Jan 14, 2025
69147c8
feat(plugins): add `cord.plugins.scoped_timestamps`
vyfor Jan 15, 2025
9ee4e0c
refactor(config): remove redundant `advanced.plugin.variables_in_func…
vyfor Jan 15, 2025
ebfab3c
merge #174
vyfor Jan 15, 2025
c1ad442
build: bump project version to 2.0.0-beta.19 [skip ci]
github-actions[bot] Jan 15, 2025
732d189
refactor(plugins.diagnostics): set scope to buffer by default
vyfor Jan 15, 2025
d38fe28
chore: bump server version to 2.0.0-beta.20
vyfor Jan 16, 2025
62f3ed0
ci: update release workflow
vyfor Jan 16, 2025
3a683c5
fix(plugins.diagnostics): use correct validation function
vyfor Jan 16, 2025
6109cf7
build: bump project version to 2.0.0-beta.20 [skip ci]
github-actions[bot] Jan 16, 2025
acaece0
fix(plugins.scoped_timestamps): correctly handle idle status
vyfor Jan 16, 2025
77337c2
build: bump project version to 2.0.0-beta.21 [skip ci]
github-actions[bot] Jan 16, 2025
2eb4eaa
feat: redesign usercommands
vyfor Jan 16, 2025
9011104
build: bump project version to 2.0.0-beta.22 [skip ci]
github-actions[bot] Jan 16, 2025
162126c
chore: fix luacheck warnings
vyfor Jan 16, 2025
540183c
docs(wiki): update information about usercommands
vyfor Jan 16, 2025
6127065
docs: update config documentation
vyfor Jan 16, 2025
1c862c6
feat(hooks): allow prioritized hooks in user configuration
vyfor Jan 16, 2025
3ef7097
build: bump project version to 2.0.0-beta.23 [skip ci]
github-actions[bot] Jan 16, 2025
2651e5d
fix(usercmds): fix argument parsing logic
vyfor Jan 16, 2025
6a91561
ci(release): upgrade `upload-artifact` & `download-artifact` to v4
vyfor Jan 16, 2025
3c78eec
docs: update usercommand usages
vyfor Jan 16, 2025
a7b9f25
feat(mappings): add `text.terminal` option
vyfor Jan 17, 2025
4992eee
refactor(usercmds): rename `:Cord check` -> `:Cord update check`
vyfor Jan 17, 2025
e16c90b
chore: bump assets version
vyfor Jan 17, 2025
c152c71
build: bump project version to 2.0.0-beta.24 [skip ci]
github-actions[bot] Jan 17, 2025
29efe00
perf: avoid evaluating string templates if `config.variables` is not …
vyfor Jan 17, 2025
d4619e3
build: bump project version to 2.0.0-beta.25 [skip ci]
github-actions[bot] Jan 17, 2025
a859c61
ci: add vimdoc generation
vyfor Jan 18, 2025
f40ceb5
chore(docs): update vimdoc [skip ci]
vyfor Jan 18, 2025
e150bc9
docs: update documentation
vyfor Jan 18, 2025
225ce5b
chore(docs): update vimdoc [skip ci]
vyfor Jan 18, 2025
ac8bf0a
feat: add `:checkhealth cord` to validate user configuration
vyfor Jan 20, 2025
04121f5
chore(docs): update vimdoc [skip ci]
vyfor Jan 20, 2025
71eadd7
build: bump project version to 2.0.0-beta.26 [skip ci]
github-actions[bot] Jan 20, 2025
b79fdfd
style: remove unused variable
vyfor Jan 20, 2025
c7b32e8
fix(usercmd): handle feature user commands without args by mapping th…
vyfor Jan 20, 2025
49acb99
fix(usercmd): fix broken autocompletion
vyfor Jan 20, 2025
4920f2a
feat!: remove `:Cord presence clear` & add `:Cord presence suppress`
vyfor Jan 20, 2025
2a9aac7
fix(usercmd): allow calling checkhealth from user commands
vyfor Jan 20, 2025
912fa82
chore(docs): update vimdoc [skip ci]
vyfor Jan 20, 2025
6e9f7c8
build: bump project version to 2.0.0-beta.27 [skip ci]
github-actions[bot] Jan 20, 2025
f1b9266
feat: set `opts.name` independently of assets
vyfor Jan 20, 2025
33a56cd
refactor(config): update text options to use `opts.name` instead
vyfor Jan 20, 2025
99737e2
docs: update text options documentation
vyfor Jan 20, 2025
bf158f9
refactor!: rename `opts.workspace_name` -> `opts.workspace`
vyfor Jan 20, 2025
26c1390
feat(manager): take `vim.bo.modifiable` into account when setting `op…
vyfor Jan 20, 2025
0706911
feat: add support for checkhealth buffers (#182)
vyfor Jan 20, 2025
441dbf0
chore(docs): update vimdoc [skip ci]
vyfor Jan 20, 2025
33dbf7a
fix(usercmd): add input validation
vyfor Jan 21, 2025
2a7f43a
build: bump project version to 2.0.0-beta.28 [skip ci]
github-actions[bot] Jan 21, 2025
9849751
docs(readme): update feature section
vyfor Jan 22, 2025
dd9c711
chore(docs): update vimdoc [skip ci]
vyfor Jan 22, 2025
a0507c8
refactor: rename `cord.api.usercmd` -> `cord.api.command`
vyfor Jan 22, 2025
f9498b5
feat: allow `ActivityManager:toggle_idle` to accept a `force` parameter
vyfor Jan 22, 2025
9c2e71c
docs(wiki): add keymappings example
vyfor Jan 22, 2025
474db66
chore(docs): update vimdoc [skip ci]
vyfor Jan 22, 2025
e4afedc
build: bump project version to 2.0.0-beta.29 [skip ci]
github-actions[bot] Jan 22, 2025
9f6d330
fix(manager): ensure the manager is setup only once
vyfor Jan 22, 2025
da12d49
fix(server): assume disconnection after receiving an error
vyfor Jan 22, 2025
0c6c581
build: bump project version to 2.0.0-beta.30 [skip ci]
github-actions[bot] Jan 23, 2025
0530d00
chore: update server version to 2.0.0-beta.30 [skip ci]
github-actions[bot] Jan 23, 2025
ed60ef6
fix: reinitialize the server if the plugin was installed with the ser…
vyfor Jan 23, 2025
9ea3a22
build: bump project version to 2.0.0-beta.31 [skip ci]
github-actions[bot] Jan 23, 2025
3a2833b
feat: automatically load the plugin on startup without needing a `set…
vyfor Jan 23, 2025
155e821
chore(docs): update vimdoc [skip ci]
vyfor Jan 23, 2025
4a067e8
build: bump project version to 2.0.0-beta.32 [skip ci]
github-actions[bot] Jan 23, 2025
33d20ab
style: fix warnings
vyfor Jan 23, 2025
57d4282
refactor(checkhealth): include additional information
vyfor Jan 24, 2025
72b5f9e
feat(checkhealth): include information about required executables
vyfor Jan 24, 2025
102ac2f
refactor(config)!: rename `advanced.plugin.log_level` -> `log_level` …
vyfor Jan 24, 2025
cef595b
chore: update bug report template
vyfor Jan 24, 2025
22c7604
chore(docs): update vimdoc [skip ci]
vyfor Jan 24, 2025
8c0ba31
build: bump project version to 2.0.0-beta.33 [skip ci]
github-actions[bot] Jan 24, 2025
c649174
ci: add `pr.yml`
vyfor Jan 24, 2025
e88d2ff
ci: update `pr.yml`
vyfor Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 21 additions & 37 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,22 @@ body:
- type: textarea
attributes:
label: "Description"
description: "Description of the problem you are facing"
validations:
required: true
- type: input
attributes:
label: "Operating system"
placeholder: "Ubuntu 22.04.4"
description: "Description of the problem you are facing. You may include any relevant logs, screenshots, etc."
validations:
required: true
- type: textarea
attributes:
label: "Neovim version"
description: "`nvim -v`"
label: "Checkhealth"
description: "Output of `:checkhealth cord`"
render: markdown
placeholder: |
NVIM v0.10.0-dev-2671+gdc110cba3
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188
validations:
required: true
- type: textarea
attributes:
label: "Steps to reproduce"
description: "Steps to reproduce the issue with the minimal configuration"
placeholder: |
1. `nvim -nu init.lua`
1. `nvim -nu repro.lua`
2. ...
validations:
required: true
Expand All @@ -41,32 +31,26 @@ body:
- type: textarea
attributes:
label: "Actual behavior"
description: "What actually happens. You may include any relevant logs, screenshots, etc."
description: "What actually happens."
- type: textarea
attributes:
label: "Minimal configuration"
description: "Minimal configuration to reproduce the issue"
render: Lua
value: |
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable',
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
label: "Minimal configuration"
description: "Minimal configuration to reproduce the issue"
render: Lua
value: |
vim.env.LAZY_STDPATH = '.repro'
load(vim.fn.system 'curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua')()

require('lazy').setup({
{
'vyfor/cord.nvim',
build = './build',
opts = {},
require('lazy.minit').repro {
spec = {
{
'vyfor/cord.nvim',
branch = 'client-server',
build = ':Cord update',
},
},
}, {})
}

-- do anything else you need to do to reproduce the issue
validations:
required: true
8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/icon-request.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/server-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.0-beta.30
93 changes: 93 additions & 0 deletions .github/wiki/Assets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# 📂 Custom Assets

## Structure

Cord allows the customization and addition of custom assets. To do so, you need to modify the `assets` table in the setup configuration of the plugin:

```lua
require('cord').setup {
assets = {
-- key: string = value: string or table
},
}
```

## Asset Configuration

| Option | Type | Description |
| ----------- | --------------------- | ------------------------------------------------------------------------------------------------------------ |
| **(key)** | `string` | The key can be a Vim filetype (like `lua`), a filename (like `Cargo.toml`), or a file extension (like `.rs`) |
| **(value)** | `string \| table` | This can either be a string pointing to the icon or a table with options below |
| `icon` | `string \| function ` | A direct URL to the icon image or the name of the rich presence asset (in case you use your own application) |
| `tooltip` | `string \| function` | Text that appears when hovering over the icon |
| `name` | `string \| function` | An optional override for the icon name. Redundant for `language` types |
| `text` | `string \| function` | An optional override for the icon text. Unlike other options, this will fully override the text |
| `type` | `string` | Specifies the context of the asset. |

Available types:
- `language` (default)
- `docs`
- `plugin_manager`
- `lsp_manager`
- `file_browser`
- `vcs`
- `workspace`
- `dashboard`
- `notes`
- `debug`
- `test`
- `diagnostics`
- `games`
- `terminal`

**Examples**:
```lua
['.rs'] = 'rust_icon'
```
```lua
lazy = {
name = 'Lazy', -- `config.text.plugin_manager + name` = "Managing plugins in Lazy"
icon = 'https://example.com/lazy.png',
tooltip = 'lazy.nvim',
type = 'plugin_manager'
}
```
> Use Cord's existing icon
```lua
['.settings'] = require('cord.api.icon').get('gear') -- or { icon = require(...) }
```
> In the below configuration, only the tooltip for Lua files is changed, while the icon and name remain as provided by Cord's defaults.
```lua
lua = {
-- Overrides default tooltip and text only
tooltip = '.lua file',
text = 'Writing in Lua' -- `config.text.editing` is ignored
}
```

Some languages cannot be identified solely by their filename or extension. In such cases, we can utilize the `vim.filetype.add` function to add extra patterns for filetype detection:

```lua
vim.filetype.add {
pattern = {
['.*/waybar/config'] = 'jsonc',
['.*/hypr/.*%.conf'] = 'hyprlang',
-- ...
},
}
```

## Overriding Defaults

In addition to setting icons for specific filetypes or extensions, you can also define icons for generic scenarios:

- `['Cord.new']`: Sets the icon for a new buffer when Neovim is opened without any file arguments.
- `['Cord.unknown']`: Used when the filetype is not detected by the editor or not supported in Cord at the moment.
- `['Cord.override']`: Overrides all of the existing icons.

**Example**:
```lua
['Cord.new'] = 'default_icon'
['Cord.unknown'] = 'unknown_icon'
['Cord.override'] = 'rust' -- Rust... Rust everywhere...
```
Loading
Loading