From: Kyle Meyer <notifications@github.com>
To: kyleam/snakemake-mode <snakemake-mode@noreply.github.com>
Cc: Kyle Meyer <kyle@kyleam.com>,
Your activity <your_activity@noreply.github.com>
Subject: Re: shell/bash highlighting? (#25)
Date: Tue, 13 Feb 2018 01:32:37 +0000 (UTC) [thread overview]
Message-ID: <kyleam/snakemake-mode/issues/25/365121740@github.com> (raw)
In-Reply-To: <kyleam/snakemake-mode/issues/25@github.com>
[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]
>> This I do not understand? Shell highlighting for all strings?
>
> Yep :)
>
> I tried implementing this with `polymode` a while back -- it sort of worked but was slow enough to be annoying, although that's perhaps my lack of skill with lisp. I eventually got stuck when I realized that the "bash parts" are actually "bash + python format mini language": the curly braces kept messing things up. Deriving a python-string-shell-mode from shell-mode was beyond me.
I share @endrebak's confusion on the "all strings" bit. It doesn't seem
like it'd be useful to highlight fields like input/output/threads as
bash.
> Perhaps the low hanging fruit - just applying font locks to the python
> format mini language parts - would suffice.
I see them as mostly orthogonal, at least in implementation. The
mini-language parts would be highlighted via
snakemake-font-lock-keywords; the shell string would need mmm-mode (or
or another similar mode). The mini-language parts would be highlighted
by default; for the shell string, users would have to install/activate
mmm-mode, like they now have to do for R bits, and I believe it'd
override any other fontification.
Anyway, I'll plan to add highlighting for at least some mini-language
parts. For the shell mmm-mode stuff, I may find time to play around
with it (I don't use mmm-mode/wouldn't use this feature personally), but
I'd certainly welcome a PR adding it if you get something working
nicely.
> Although that one should probably just be implemented in python-mode? Curious that python-mode doesn't do that already...
Dunno. I suppose I can't think of any programming modes that have
special fontification of formatting specs (e.g., emacs-lisp-mode:
(format "all string %s" "font")), but there are of course lots out
there, so there may be good examples.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kyleam/snakemake-mode/issues/25#issuecomment-365121740
[-- Attachment #2: Type: text/html, Size: 5754 bytes --]
next prev parent reply other threads:[~2018-02-13 1:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 2:19 shell/bash highlighting? (#25) Elmar Pruesse
2018-02-12 3:41 ` Kyle Meyer
2018-02-12 8:46 ` Endre Bakken Stovner
2018-02-12 8:48 ` Endre Bakken Stovner
2018-02-12 20:44 ` Elmar Pruesse
2018-02-13 1:32 ` Kyle Meyer [this message]
2018-02-17 1:37 ` Kyle Meyer
2020-04-13 23:52 ` Kyle Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://git.kyleam.com/snakemake-mode
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=kyleam/snakemake-mode/issues/25/365121740@github.com \
--to=notifications@github.com \
--cc=kyle@kyleam.com \
--cc=reply+0013cd7c09b9d56d9b77179e574242e1decccc2184fb99c092cf00000001169a023492a169ce11a86e39@reply.github.com \
--cc=snakemake-mode@noreply.github.com \
--cc=your_activity@noreply.github.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.kyleam.com/snakemake-mode/
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 read-only IMAP folder(s) and NNTP newsgroup(s).