v icon indicating copy to clipboard operation
v copied to clipboard

Define V syntax for multiple editors simultaneously...

Open ylluminate opened this issue 5 years ago • 17 comments

It could be useful if someone reworked v-vscode to incorporate multiple editors by using this handy tool: https://eeyo.io/iro/

Introductory article: https://medium.com/@model_train/creating-universal-syntax-highlighters-with-iro-549501698fd2

ylluminate avatar Jun 23 '19 17:06 ylluminate

Id love to have a plugin for GoLand.

MostHated avatar Jun 23 '19 17:06 MostHated

The Microsoft Language Server Protocol would also be very useful to define. Existing language implementations (would be good exposure for V): https://microsoft.github.io/language-server-protocol/implementors/servers/

ylluminate avatar Jun 23 '19 22:06 ylluminate

https://github.com/0x9ef/vscode-vlang define it for VSCode but it's TextMate.

You can transfer it to others IDE like Atom for example with : https://flight-manual.atom.io/hacking-atom/sections/converting-from-textmate/

AurelienFT avatar Jun 23 '19 23:06 AurelienFT

Yes, but I think conversion from TextMate to others is a manual process. The reason I thought using Iro might be the best option is because we'd essentially only have one grammar to maintain so as to update the others...

I agree that converting from TextMate to Iro seems like extra work, but to get the additional languages which would seem to give us all of the major editors (including emacs I believe) seems worth the effort...

Word of warning, when I was briefly playing around in Iro I wasn't sure if the save or download function worked quite right so if you fiddle with this you'll want to copy your work out of it so as to be sure you don't lose anything.

ylluminate avatar Jun 23 '19 23:06 ylluminate

By the way @MostHated from what I can tell GoLand will also work with the TextMate grammar that will come from this. See PhpStorm help re: TextMate and since PhpStorm pretty much is GoLand (same with all JetBrains editors), then this extends over. Also GoLand help.

ylluminate avatar Jun 24 '19 00:06 ylluminate

@ylluminate I've started it : https://gist.github.com/AurelienFT/49ffe2b04d80e7e8694be1488c4b0aec

AurelienFT avatar Jun 24 '19 01:06 AurelienFT

Adding V support to GitHub is relevant to this @AurelienFT: https://github.com/github/linguist/pull/4564

ylluminate avatar Jun 30 '19 03:06 ylluminate

What about this? https://github.com/0x9ef/vscode-vlang/blob/master/syntaxes/v.tmLanguage.json

joe-conigliaro avatar Jun 30 '19 03:06 joe-conigliaro

@joe-conigliaro that is what @AurelienFT is working back from. Once we get it defined in iro we'll have one source for updating the grammar so that TM and all the others are autogenerated and thus we should, in theory, support most editors pretty easily. Even emacs can use the pygments output...

ylluminate avatar Jun 30 '19 03:06 ylluminate

@ylluminate Cool that sounds good

joe-conigliaro avatar Jun 30 '19 03:06 joe-conigliaro

This issue has been closed due to the inactivity. Please reopen this issue if you want to continue the discussion.

chanbakjsd avatar Jan 14 '20 14:01 chanbakjsd

Once we have this - I am assuming that we will have VIM integration as well right?

VarunBatraIT avatar Jun 22 '20 06:06 VarunBatraIT

Id love to have a plugin for GoLand.

Or rather the IntelliJ Platform.

HTGAzureX1212 avatar Dec 30 '20 10:12 HTGAzureX1212

Hey guys, I want to give creating a plugin for intellij a try, I have some xp in creating lexer and parser as I made the mim programming language in kotlin and xml parser in kotlin - not mature yet also in creating intellij plugins actionable - custom project starter - search in stack overflow right inside ide

I appreciate any help from the community.

just need to completely know about the tokens and grammar of the language. (can be just a txt file showing the tokens, ...)

well, I can't wait to start this! could you help me please??

MohammadMD1383 avatar Jul 01 '22 13:07 MohammadMD1383

for those interested, you can use this plugin i wrote as a starting point (PRs are welcome!): https://github.com/nedpals/intellij-vlang

nedpals avatar Jul 12 '22 14:07 nedpals

V plugin for JetBrains IDEs is here: https://intellij-v.github.io

i582 avatar Jan 03 '23 07:01 i582

I made a request for nano editor support at https://github.com/scopatz/nanorc

pepa65 avatar Feb 14 '23 00:02 pepa65

@i582 does your new language server cover this issue?

ArtemkaKun avatar Jun 26 '23 07:06 ArtemkaKun

@i582 does your new language server cover this issue?

This is already the case, thanks to tree-sitter we already have highlighting in many editors, VS Code and Sublime Text already have it through plugins.

v-analyzer will only bring IDE features.

i582 avatar Jun 26 '23 07:06 i582

So maybe we should close this issue when your work will be out of beta

ArtemkaKun avatar Jun 26 '23 07:06 ArtemkaKun

v-analyzer VLS was released and it added a V LS support for bunch of editors, that are using LSP. So I think this issue can be closed

ArtemkaKun avatar Jul 04 '23 06:07 ArtemkaKun

I made a request for nano editor support at https://github.com/scopatz/nanorc

@Harxi made a nano syntax file: https://github.com/Harxi/vlang-nanorc

pepa65 avatar Jul 04 '23 07:07 pepa65