polina4096 / voices

record and listen to voice messages in your favorite IDE by JetBrains
GNU General Public License v3.0
411 stars 7 forks source link

Agree on a standard for voice comments #26

Closed 0x501D closed 1 year ago

0x501D commented 1 year ago

Greetings, I am the author of a similar plugin for vim and propose to agree on a standard for voice comments so that they are universal and work the same in different IDEs.

Currently I'm using this label:

<comment (// | # | ...)> :voice="path_to file"

Example:

// :voice="~/stuff/bruh.ogg"

Using this lablel is easy to extract path with regexp:

'.* :voice="\(.*\)".*'
polina4096 commented 1 year ago

i'm not sure there is any benefit in a format which is easy to parse with regexp

extensions that implement voice messages may most likely interact with LSP anyways to extract single line comments from sources to find where to insert graphics or add relevant interactions

there is no need to use regexp when the LSP already does the parsing

to me it feels that voice message comments should be represented as single line (not always possible: CSS) comments, so even if you really need to use regexp, it should be possible to parse all lines that follow the language-specific single line comment syntax with the current comment syntax

as of now, this extension uses: voice:path_to_file in a language specific single-line comment, it will be problematic to migrate to new, or support multiple formats

0x501D commented 1 year ago

The main idea is not to simplify the use of regular expressions, but to agree on a single format. I can change it to the voice:path format in my plugin without any problems. the main thing is to agree on one format so that it works the same in different IDE's.

We can select the voice:path option in one line as a uniform format for presenting the voice comment.

polina4096 commented 1 year ago

i do find it simpler to just agree on voice:path fromat to be completely honest, as i don't want to break compatibility with any possible existing comments, or support multiple formats

0x501D commented 1 year ago

Agreed. I will remake my plugin to the above format and stick to it.

0x501D commented 1 year ago

I think we can close this issue.