ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Use Visual studio code
@ 2019-08-19 20:08 Eric Détrez
  2019-08-19 22:03 ` Hans Hagen
  2019-08-21 19:44 ` Julian Gompper
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Détrez @ 2019-08-19 20:08 UTC (permalink / raw)
  To: Context

Hello

Is it possible to use VScode as IDE for ConTeXt ?



-- 
Eric Détrez
Informatique
Lycée Faidherbe, Lille
Documents de cours en pdf : eric-detrez.fr
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Use Visual studio code
  2019-08-19 20:08 Use Visual studio code Eric Détrez
@ 2019-08-19 22:03 ` Hans Hagen
  2019-08-21 19:44 ` Julian Gompper
  1 sibling, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2019-08-19 22:03 UTC (permalink / raw)
  To: info, mailing list for ConTeXt users

On 8/19/2019 10:08 PM, Eric Détrez wrote:

> Is it possible to use VScode as IDE for ConTeXt ?
It depends on how you define ide ... one problem is that it's not really 
possible to easy define keybindings for running, help etc per filetype 
yet (as in scite etc) and messing with this server model is not on my 
agenda.

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Use Visual studio code
  2019-08-19 20:08 Use Visual studio code Eric Détrez
  2019-08-19 22:03 ` Hans Hagen
@ 2019-08-21 19:44 ` Julian Gompper
  2019-08-21 20:28   ` Hans Hagen
  1 sibling, 1 reply; 4+ messages in thread
From: Julian Gompper @ 2019-08-21 19:44 UTC (permalink / raw)
  To: info, ntg-context

Hello,


I too use vscode as my editor, and recently wanted to use it for ConTeXt
as well.

Patrick Gundlach created a tmLanguage file for ConTeXt:
https://github.com/pgundlach/context.tmbundle/blob/master/Syntaxes/ConTeXt.tmLanguage

I just finished packaging and publishing said file in a vscode extension.

You can find it on GitHub:
https://github.com/JulianGmp/vscode-context-syntax

Or on the vscode marketplace:
https://marketplace.visualstudio.com/items?itemName=JulianGmp.context-syntax


As the name suggests, the extension only provides syntax highlighting. I
might add snippets or build macros in the future, though I would
probably implement these things in a seperate extension.


Best regards,

Julian


Also, if you want to build the document with a keybinding, you could
define a build task in your tasks.json:
https://gist.github.com/JulianGmp/a2b38212878c23d71de3d977214f2bf7


Am 19.08.2019 um 22:08 schrieb Eric Détrez:
> Hello
>
> Is it possible to use VScode as IDE for ConTeXt ?
>
>
>
> --
> Eric Détrez
> Informatique
> Lycée Faidherbe, Lille
> Documents de cours en pdf : eric-detrez.fr
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Use Visual studio code
  2019-08-21 19:44 ` Julian Gompper
@ 2019-08-21 20:28   ` Hans Hagen
  0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2019-08-21 20:28 UTC (permalink / raw)
  To: Julian Gompper, mailing list for ConTeXt users, info

On 8/21/2019 9:44 PM, Julian Gompper wrote:
> Hello,
> 
> 
> I too use vscode as my editor, and recently wanted to use it for ConTeXt
> as well.
> 
> Patrick Gundlach created a tmLanguage file for ConTeXt:
> https://github.com/pgundlach/context.tmbundle/blob/master/Syntaxes/ConTeXt.tmLanguage
> 
> I just finished packaging and publishing said file in a vscode extension.
> 
> You can find it on GitHub:
> https://github.com/JulianGmp/vscode-context-syntax
> 
> Or on the vscode marketplace:
> https://marketplace.visualstudio.com/items?itemName=JulianGmp.context-syntax
> 
> 
> As the name suggests, the extension only provides syntax highlighting. I
> might add snippets or build macros in the future, though I would
> probably implement these things in a seperate extension.

I wrote (reasonable advanced) lexers for all the languages that matter 
for context (tex, mp, lua, etc), also with support for embedded lexing 
as well as highlighting of categories of keywords (updates when new 
betas are pushed). These lexers are mostly compatible with my reference 
lexers for scite. So that should work anyway. They are poart of the 
distribution and activated when one starts vscode from the command line 
with the right switches or when one puts thexe lexers someplace known.

So, I didn't make some 'installable package' (also because i actually 
want to use a different color scheme and less clutter in the editor) so 
the idea is to have a independent start up without interference with an 
existing install.

But it works ok here (apart from adbaced suffix based runners, but i can 
run tex; ok, i could make mtxrun more clever and cheat but it would be a 
hack).

(The problem that I have with editors is that they keep adding stuff and 
become more complex over time while in practice I only need avery few 
features.)

> Also, if you want to build the document with a keybinding, you could
> define a build task in your tasks.json:
> https://gist.github.com/JulianGmp/a2b38212878c23d71de3d977214f2bf7
The problem is not to have key bindings (I can do that) but to have 
different ones per filetype (i want to run lua files with mtxrun 
--script for instance) and also because there can be multiple nindings 
per suffix. As far as I can see this is not yet possible (when i looked 
into it and searched abit i got the impression that this was a general 
known shortcoming but also that it was on some agenda to deal with it) 
and I don't want to ship/maintain a lot of fragile/moving target 
javascript (and node js) code.

Anyway, the files are in the distribuition to play with. And 
occasionally I see when it becomes more useable for me. It's currently 
mostly a fallback for when scite stops working (unfortunately the lua 
lexer support is is not build into scite and the (small) lib is 
unmaintained ... ok, i could do that when needed).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-21 20:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 20:08 Use Visual studio code Eric Détrez
2019-08-19 22:03 ` Hans Hagen
2019-08-21 19:44 ` Julian Gompper
2019-08-21 20:28   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).