https://bugs.kde.org/show_bug.cgi?id=397563

--- Comment #2 from Mark <mpic...@gmail.com> ---
(In reply to Nate Graham from comment #1)
> Would the need for this go away if Kate was better about choosing a syntax
> highlighting mode in the first place? What are the ones that it's not so
> good at?

I do not think it's possible for it to get good enough on this. Some of the
file types I work with don't have a mime type and/or lack an extension, so I
don't think detection is feasible. Even if 100% were detected, would we really
want mime type X to be mapped to something that's _kinda_ like it, say python?
That might not bother me or you short term, but I think it'd become a problem
sooner or later.

Types it isn't good at include:

* Starlark (formerly skylark), file names BUILD, BUILD.bazel, *.BUILD, *.bzl.
Quite similar to python; for this one I simply added the extensions to kate's
python highlighter.

* Jinja2 templates. The underlying content can be practically anything
text-based: C++, bash, python, html, ansible, other yaml, etc etc. In some
cases I prefer to use Jinja2 highlighting (making template items more visible)
and in others I prefer to switch to highlighting of the underlying content.
I've installed a set of highlighters for Jinja2 with common underlying formats,
which is helpful - but
  a) this doesn't cover every underlying format, and
  b) even when the underlying format _is_ detected, I still desire to switch
highlight modes at times.

* ERB templates, golang's templates, etc. Similar issues as with Jinja2.

* Various outdated (or proprietary) formats that I use from time to time.

* Plus there's at least one extension that's used for two drastically different
things; *.bas springs to mind though I don't recall what would use that other
than some dialect of BASIC.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to