micro/runtime/syntax
sum01 8629357c70
Remove weird ignore on git-commit
It was needlessly highlighting everything that wasn't a comment.

Adds keyword detection for Github-esque issue-closing syntax.
Adds missing 'd' and 'drop' highlighting in git-rebase-todo
2018-01-05 03:41:50 -05:00
..
ada.yaml #964 add ada syntax 2017-12-27 14:27:42 +00:00
apacheconf.yaml
arduino.yaml
asciidoc.yaml
asm.yaml
awk.yaml
c++.yaml
c.yaml Remove new keyword from C syntax 2017-07-10 00:36:49 -02:30
caddyfile.yaml
clojure.yaml Support .cljs and .cljc as clojure files 2017-11-14 13:58:28 -05:00
cmake.yaml
coffeescript.yaml
colortest.yaml
conf.yaml
conky.yaml
cpp.yaml
crontab.yaml added crontab highlighting. (#689) 2017-06-10 15:24:46 -04:00
crystal.yaml
csharp.yaml
css.yaml
cython.yaml
d.yaml
dart.yaml
dockerfile.yaml Use type.keyword instead of keyword 2017-09-13 18:00:47 -04:00
dot.yaml
erb.yaml
fish.yaml
fortran.yaml
gdscript.yaml
gentoo-ebuild.yaml
gentoo-etc-portage.yaml
git-commit.yaml Remove weird ignore on git-commit 2018-01-05 03:41:50 -05:00
git-config.yaml Use type.keyword instead of keyword 2017-09-13 18:00:47 -04:00
git-rebase-todo.yaml Remove weird ignore on git-commit 2018-01-05 03:41:50 -05:00
glsl.yaml
go.yaml Move incomplete colorschemes and improve cd 2017-11-23 15:57:17 -05:00
golo.yaml
groff.yaml
haml.yaml
haskell.yaml
html.yaml
html4.yaml
html5.yaml
ini.yaml
inputrc.yaml
java.yaml
javascript.yaml Improve JavaScript syntax highlighting 2017-12-17 23:53:58 +01:00
json.yaml
julia.yaml added const for julia 2017-12-29 13:08:21 -05:00
keymap.yaml
kickstart.yaml
kotlin.yaml Added kotlin highlighting and fixed swift line comment todo not highlighting. 2017-05-26 01:59:51 +01:00
ledger.yaml Improve yaml string highlighting 2017-08-14 11:28:10 -04:00
lfe.yaml
LICENSE
lilypond.yaml
lisp.yaml
lua.yaml Add some Lua syntax (#962) 2017-12-31 00:37:11 -05:00
mail.yaml
makefile.yaml
man.yaml
markdown.yaml
micro.yaml Fix micro file syntax 2017-12-30 12:13:52 -05:00
mpdconf.yaml
nanorc.yaml
nginx.yaml
nim.yaml
objc.yaml
ocaml.yaml
octave.yaml Added initial support for Octave/Matlab syntax highlighting 2017-10-02 14:08:22 +04:00
pascal.yaml
patch.yaml
peg.yaml
perl.yaml Perl syntax highlighting fix (#818) 2017-09-24 11:59:57 -04:00
perl6.yaml
php.yaml
pkg-config.yaml
po.yaml
pony.yaml
pov.yaml
privoxy-action.yaml
privoxy-config.yaml
privoxy-filter.yaml
puppet.yaml
python2.yaml
python3.yaml
r.yaml Improved R syntax rules 2017-04-15 02:06:19 +02:00
README.md Update readme 2017-09-29 13:46:51 -04:00
reST.yaml
rpmspec.yaml
ruby.yaml
rust.yaml
scala.yaml a couple more keywords to scala syntax 2017-10-04 10:17:50 +01:00
sed.yaml
sh.yaml Fix comment regex for shell filetype 2017-10-20 23:57:49 -04:00
sls.yaml
solidity.yaml Use type.keyword instead of keyword 2017-09-13 18:00:47 -04:00
sql.yaml
swift.yaml Added kotlin highlighting and fixed swift line comment todo not highlighting. 2017-05-26 01:59:51 +01:00
syntax_checker.go make syntax_checker work with error messages 2017-08-06 08:25:19 +01:00
syntax_converter.go Fix windows errors 2018-01-04 21:46:44 -05:00
systemd.yaml
tcl.yaml
tex.yaml
toml.yaml
twig.yaml Add twig syntax (https://twig.sensiolabs.org/) 2017-06-30 12:31:18 +02:00
typescript.yaml
vala.yaml improved highlighting for Vala types 2017-07-11 14:40:38 +02:00
vhdl.yaml
vi.yaml
xml.yaml
xresources.yaml Correct the comment from # to ! as point out in the gitter chat. 2017-06-10 11:33:50 +01:00
yaml.yaml Improve yaml string highlighting 2017-08-14 11:28:10 -04:00
yum.yaml
zsh.yaml

Syntax Files

Here are micro's syntax files.

Each yaml file specifies how to detect the filetype based on file extension or headers (first line of the file). Then there are patterns and regions linked to highlight groups which tell micro how to highlight that filetype.

Making your own syntax files is very simple. I recommend you check the file after you are finished with the syntax_checker.go program (located in this directory). Just place your yaml syntax file in the current directory and run go run syntax_checker.go and it will check every file. If there are no errors it will print No issues!.

You can read more about how to write syntax files (and colorschemes) in the colors documentation.

Legacy '.micro' filetype

Micro used to use the .micro filetype for syntax files which is no longer supported. If you have .micro syntax files that you would like to convert to the new filetype, you can use the syntax_converter.go program (also located in this directory):

$ go run syntax_converter.go c.micro > c.yaml

Most the the syntax files here have been converted using that tool.

Note that the tool isn't perfect and though it is unlikely, you may run into some small issues that you will have to fix manually (about 4 files from this directory had issues after being converted).

Micro syntax highlighting files

These are the syntax highlighting files for micro. To install them, just put all the syntax files in ~/.config/micro/syntax.

They are taken from Nano, specifically from this repository. Micro syntax files are almost identical to Nano's, except for some key differences:

  • Micro does not use icolor. Instead, for a case insensitive match, use the case insensitive flag (i) in the regular expression
    • For example, icolor green ".*" would become color green "(?i).*"

Using with colorschemes

Not all of these files have been converted to use micro's colorscheme feature. Most of them just hardcode the colors, which can be problematic depending on the colorscheme you use.

Here is a list of the files that have been converted to properly use colorschemes:

  • vi
  • go
  • c
  • d
  • markdown
  • html
  • lua
  • swift
  • rust
  • java
  • javascript
  • pascal
  • python
  • ruby
  • sh
  • git
  • tex
  • solidity

License

Because the nano syntax files I have modified are distributed under the GNU GPLv3 license, these files are also distributed under that license. See LICENSE.