Sie sind nicht angemeldet.

Tourvista

Fortgeschrittener

  • »Tourvista« ist der Autor dieses Themas

Beiträge: 260

Wohnort: Leicester UK

  • Nachricht senden

1

Donnerstag, 9. August 2018, 15:33

Krpano Markup Language for VSCode Editor

Hello Klaus,

I'm working on an Extension for the VS Code editor , for editing XML files with the Krpano markup language.

The first step is to enable syntax highlighting to help reading the code better. This is what I get so far.




Luckily, there is a similar project in Github to do the same thing for the SublimeText editor, and I was able to use its tmLanguage file to cover some ground. Although the person writing that extension did an amazing job creating the regular expressions to find all the elements, there are a few missing.

Is there an easier way to have access to all the functions, elements and actions used by Krpano, other than the documentation web pages? Although they are very useful, I really struggle to find an structure to go through all the information.

Something like an index page or a list, with just the names and the type would be ideal.

VS Code developers have put a lot of effort to make easy to people write very powerful extensions. Syntax highlighting is only the beginning. it's also possible define formatting, snippets, intellisense, hovers and validators.

Here is the Github repository: VS Code Krpano Language

Many thanks,

Rafael

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tourvista« (9. August 2018, 20:32)


2

Donnerstag, 28. Januar 2021, 11:32

years later ... .-)
i switched to vscode from sublime recently and just found this!
great work, rafael !

it's a bit outdated (doesnt recognize newer comment syntax and other things)
i guess you never update it?

a.pu

Schüler

Beiträge: 120

Beruf: software engineer, author of krpano syntax highlighting, bundler and style guide

  • Nachricht senden

3

Donnerstag, 28. Januar 2021, 12:58

years later ... .-)
i switched to vscode from sublime recently and just found this!
great work, rafael !

it's a bit outdated (doesnt recognize newer comment syntax and other things)
i guess you never update it?


I have in plans to make vscode support for krpano syntax since this extension is already based on my work *smile*
But... sublime is my everything yet, sorry you left

4

Donnerstag, 28. Januar 2021, 13:03

i'd say i'm in transition... *squint*

vscode has much bigger resources, i guess, and seems to be more stable.

i tried to add comments for // and /* */ to that extension
and failed so far...

is it based on your sublime extension?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (28. Januar 2021, 14:32)


Tourvista

Fortgeschrittener

  • »Tourvista« ist der Autor dieses Themas

Beiträge: 260

Wohnort: Leicester UK

  • Nachricht senden

5

Donnerstag, 28. Januar 2021, 13:34

Hello,


Alexey has done a much better job with his extension. Mine only does syntax color and snippets, and it's not up-to-date.



I think it's possible that VSCode and Sublimetext extensions can share the same markup syntax & snippet files. This would be very handy keep both of them updated.


Unfortunately I don't have the time nor the knowledge to do this on my own.


Cheers,


Rafael

6

Donnerstag, 30. September 2021, 18:47

Thanks for sharing the markup on git Alex. Speeds up work so much!

https://github.com/apushkarev/krpano-for-vscode

noupunt

Schüler

Beiträge: 47

Wohnort: Barcelona

Beruf: Photographer and full stack developer

  • Nachricht senden

7

Freitag, 22. Oktober 2021, 18:55

Thanks for this great VSC Markup Language! I had a little problem with the coments and I show you how I've corrected it

I use this extension for VSC, and I had a problem with the comments.
The block comments are declared as /* */ and this works inside actions but not in the body of the krpano document, where those comments are ignored. so I'v changed this feature like this:

in
extensions\krpano-for-vscode-main\language-configuration.json


I've replaced the comments object by:


"comments": {
"blockComment": [ "<!--", "-->" ]
},

I hope it helps someone!!

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

8

Donnerstag, 18. November 2021, 21:49

Thx for that, looks great !
But I must be stupid again...
Installed VSCode, added your extension wich I can see in the extension list and is enabled, unfortunately the colors wont change :


Any clue ?

9

Donnerstag, 18. November 2021, 22:06

Did you try to press cmd+shift+p (mac) ctrl+shift+p (win), enter "change language mode" (hit return), enter "kml" (hit return)?

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

10

Freitag, 19. November 2021, 08:38

Did you try to press cmd+shift+p (mac) ctrl+shift+p (win), enter "change language mode" (hit return), enter "kml" (hit return)?

Oh yes ! works perfect now, thax guys !!!

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

11

Donnerstag, 3. März 2022, 10:02

Very new to visual studio and I don't find it very intuitive...
Can't find a way to enable the color picker for krpano language markup ?