This commit is contained in:
Zachary Yedidia 2022-07-20 10:16:46 -07:00
commit ba11d98fef
16 changed files with 376 additions and 56 deletions

View file

@ -7,7 +7,7 @@ DATE = $(shell GOOS=$(shell go env GOHOSTOS) GOARCH=$(shell go env GOHOSTARCH) \
go run tools/build-date.go)
ADDITIONAL_GO_LINKER_FLAGS = $(shell GOOS=$(shell go env GOHOSTOS) \
GOARCH=$(shell go env GOHOSTARCH) \
go run tools/info-plist.go "$(VERSION)")
go run tools/info-plist.go "$(GOOS)" "$(VERSION)")
GOBIN ?= $(shell go env GOPATH)/bin
GOVARS = -X github.com/zyedidia/micro/v2/internal/util.Version=$(VERSION) -X github.com/zyedidia/micro/v2/internal/util.CommitHash=$(HASH) -X 'github.com/zyedidia/micro/v2/internal/util.CompileDate=$(DATE)'
DEBUGVAR = -X github.com/zyedidia/micro/v2/internal/util.Debug=ON

View file

@ -1,4 +1,4 @@
<img alt="micro logo" src="./assets/micro-logo.svg" width="500px"/>
<img alt="micro logo" src="./assets/micro-logo-drop.svg" width="500px"/>
[![Build Status](https://travis-ci.org/zyedidia/micro.svg?branch=master)](https://travis-ci.org/zyedidia/micro)
[![Go Report Card](https://goreportcard.com/badge/github.com/zyedidia/micro)](https://goreportcard.com/report/github.com/zyedidia/micro)

104
assets/micro-logo-drop.svg Normal file
View file

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version="1.1"
id="Layer_1"
x="0px"
y="0px"
viewBox="0 0 304.70001 103.2"
enable-background="new 0 0 960 560"
xml:space="preserve"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="micro-logo-drop.svg"
width="304.70001"
height="103.2"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata
id="metadata21"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs19"><filter
style="color-interpolation-filters:sRGB"
inkscape:label="Blur"
id="filter1040"
x="-0.028037383"
y="-0.10549451"
width="1.0560748"
height="1.210989"><feGaussianBlur
stdDeviation="2 2"
result="blur"
id="feGaussianBlur1038" /></filter></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1043"
id="namedview17"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="2.5161345"
inkscape:cx="158.97401"
inkscape:cy="109.69207"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1"
inkscape:pagecheckerboard="0" /><g
id="g838"
transform="translate(-178,-172.8)"
style="fill:#ffffff;fill-opacity:1;filter:url(#filter1040)"><path
d="m 306.8,213.8 v -2.6 c 1.6,-0.1 2.9,-0.4 4.1,-0.8 1.2,-0.4 2.5,-1 4,-1.8 h 2.3 v 5.2 c 2.4,-1.9 4.2,-3.1 5.5,-3.8 2,-1 4,-1.5 5.8,-1.5 1.3,0 2.5,0.2 3.7,0.7 1.2,0.5 2.2,1 2.9,1.7 0.7,0.7 1.4,1.6 1.9,2.8 2.2,-1.9 4.2,-3.3 6,-4 1.9,-0.8 3.7,-1.2 5.6,-1.2 1.8,0 3.4,0.4 4.8,1.1 1.4,0.8 2.4,1.7 3,2.8 0.6,1.1 0.9,2.8 0.9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-0.4 2.4,-1 3.5,-1.8 0.9,-0.6 2.2,-1.8 4,-3.8 z"
id="path832"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" /><path
d="m 418.7,213.7 v -2.6 c 1.5,-0.1 2.8,-0.4 4,-0.8 1.2,-0.4 2.5,-1 4,-1.9 h 2.3 v 5.9 c 1.5,-1.8 3.2,-3.2 5.1,-4.3 1.9,-1.1 3.7,-1.6 5.2,-1.6 1.5,0 2.7,0.4 3.6,1.1 0.9,0.7 1.3,1.6 1.3,2.6 0,0.7 -0.3,1.4 -0.9,2 -0.6,0.6 -1.3,0.9 -2.1,0.9 -0.4,0 -0.7,-0.1 -1,-0.2 -0.3,-0.1 -0.7,-0.3 -1.2,-0.7 -1.1,-0.7 -2.1,-1.1 -2.9,-1.1 -1,0 -2.2,0.4 -3.4,1.3 -1.6,1.1 -2.8,2.2 -3.7,3.3 V 232 c 0,1.2 0.1,2.1 0.2,2.5 0.1,0.4 0.4,0.8 0.7,1.1 0.3,0.3 0.7,0.6 1.1,0.7 0.5,0.1 1.3,0.2 2.4,0.2 h 1 v 2.6 h -16 v -2.6 h 1.3 c 1.3,0 2.1,-0.1 2.5,-0.3 0.5,-0.3 0.9,-0.7 1.2,-1.3 0.3,-0.5 0.4,-1.5 0.4,-3 v -18.3 h -5.1 z"
id="path834"
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1" /><path
d="m 462.8,208.5 c 3,0 5.7,0.6 7.9,1.9 2.2,1.3 4,3.1 5.3,5.5 1.3,2.4 1.9,5.2 1.9,8.3 0,3.1 -0.7,5.9 -2,8.3 -1.3,2.4 -3.1,4.3 -5.4,5.5 -2.3,1.3 -5,1.9 -8.1,1.9 -5,0 -8.8,-1.6 -11.3,-4.7 -2.5,-3.1 -3.8,-6.8 -3.8,-11 0,-3.1 0.7,-5.8 2,-8.2 1.3,-2.4 3.1,-4.2 5.5,-5.6 2.4,-1.2 5.1,-1.9 8,-1.9 z m -0.2,3 c -2.4,0 -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-0.6,2.1 -0.9,2.9 -0.8,2.5 -1.6,4.8 -2.5,6.7 -0.9,1.9 -1.7,4 -2.4,6.2 -0.6,1.5 -0.8,2.9 -0.8,4.1 0,2.2 0.7,3.8 2,5 1.4,1.2 3,1.7 4.9,1.7 1.5,0 3,-0.5 4.4,-1.6 1.4,-1.1 2.7,-2.4 3.9,-3.9 1.2,-1.5 2.2,-3.1 3,-4.9 0.8,-1.7 1.4,-3.3 1.8,-4.6 0.1,-0.2 0.2,-0.6 0.3,-1.4 0.2,-0.8 0.3,-1.7 0.5,-2.7 0.2,-1 0.4,-2 0.6,-3.1 0.2,-1.1 0.4,-2 0.5,-2.7 0.2,-0.8 0.3,-1.6 0.5,-2.6 0.2,-1 0.5,-1.9 0.9,-2.8 0.4,-0.9 1,-1.6 1.6,-2.2 0.7,-0.6 1.5,-0.9 2.6,-0.9 1.3,0 2.1,0.4 2.6,1.1 0.4,0.7 0.6,1.6 0.6,2.6 -0.1,1 -0.2,2 -0.5,3 -0.3,1 -0.5,1.8 -0.7,2.4 -0.8,2.5 -1.6,4.7 -2.4,6.7 -0.8,2 -1.5,3.8 -2.2,5.2 -0.6,1.5 -1.1,2.6 -1.5,3.5 -0.4,0.9 -0.6,1.5 -0.6,1.8 0,2.6 0.6,4.5 1.7,5.6 1.1,1.1 2.3,1.7 3.6,1.7 2.2,0 3.9,-0.7 5.2,-2 1.3,-1.4 2.3,-3.9 2.9,-6.9 h 0.8 c 0.2,2.9 -0.1,5.3 -0.6,7.3 z"
id="path15"
inkscape:connector-curvature="0"
style="fill:#2e3192" /></svg>

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -335,10 +335,12 @@ var DefaultGlobalOnlySettings = map[string]interface{}{
"mouse": true,
"parsecursor": false,
"paste": false,
"savehistory": true,
"sucmd": "sudo",
"pluginchannels": []string{"https://raw.githubusercontent.com/micro-editor/plugin-channel/master/channel.json"},
"pluginrepos": []string{},
"savehistory": true,
"sucmd": "sudo",
"tabhighlight": false,
"tabreverse": true,
"xterm": false,
}

View file

@ -2,6 +2,7 @@ package display
import (
runewidth "github.com/mattn/go-runewidth"
"github.com/zyedidia/tcell/v2"
"github.com/zyedidia/micro/v2/internal/buffer"
"github.com/zyedidia/micro/v2/internal/config"
"github.com/zyedidia/micro/v2/internal/screen"
@ -94,16 +95,27 @@ func (w *TabWindow) Display() {
x := -w.hscroll
done := false
tabBarStyle := config.DefStyle.Reverse(true)
if style, ok := config.Colorscheme["tabbar"]; ok {
tabBarStyle = style
}
tabBarActiveStyle := tabBarStyle
if style, ok := config.Colorscheme["tabbar.active"]; ok {
tabBarActiveStyle = style
}
globalTabReverse := config.GetGlobalOption("tabreverse").(bool)
globalTabHighlight := config.GetGlobalOption("tabhighlight").(bool)
draw := func(r rune, n int, active bool) {
// xor of reverse and tab highlight to get tab character (as in filename and surrounding characters) reverse state
tabCharHighlight := (globalTabReverse || globalTabHighlight) && !(globalTabReverse && globalTabHighlight)
reverseStyles := func(reverse bool) (tcell.Style, tcell.Style) {
tabBarStyle := config.DefStyle.Reverse(reverse)
if style, ok := config.Colorscheme["tabbar"]; ok {
tabBarStyle = style
}
tabBarActiveStyle := tabBarStyle
if style, ok := config.Colorscheme["tabbar.active"]; ok {
tabBarActiveStyle = style
}
return tabBarStyle, tabBarActiveStyle
}
draw := func(r rune, n int, active bool, reversed bool) {
tabBarStyle, tabBarActiveStyle := reverseStyles(reversed)
style := tabBarStyle
if active {
style = tabBarActiveStyle
@ -131,28 +143,33 @@ func (w *TabWindow) Display() {
for i, n := range w.Names {
if i == w.active {
draw('[', 1, true)
draw('[', 1, true, tabCharHighlight)
} else {
draw(' ', 1, false)
draw(' ', 1, false, tabCharHighlight)
}
for _, c := range n {
draw(c, 1, i == w.active)
draw(c, 1, i == w.active, tabCharHighlight)
}
if i == len(w.Names)-1 {
done = true
}
if i == w.active {
draw(']', 1, true)
draw(' ', 2, true)
draw(']', 1, true, tabCharHighlight)
draw(' ', 2, true, globalTabReverse)
} else {
draw(' ', 3, false)
draw(' ', 1, false, tabCharHighlight)
draw(' ', 2, false, globalTabReverse)
}
if x >= w.Width {
break
}
}
if x < w.Width {
draw(' ', w.Width-x, false)
draw(' ', w.Width-x, false, globalTabReverse)
}
}

View file

@ -365,6 +365,14 @@ Here are the available options:
default value: `false`
* `tabhighlight`: inverts the tab characters' (filename, save indicator, etc) colors with respect to the tab bar.
default value: false
* `tabreverse`: reverses the tab bar colors when active.
default value: true
* `tabsize`: the size in spaces that a tab character should be displayed with.
default value: `4`
@ -491,6 +499,8 @@ so that you can see what the formatting should look like.
"sucmd": "sudo",
"syntax": true,
"tabmovement": false,
"tabhighlight": true,
"tabreverse": false,
"tabsize": 4,
"tabstospaces": false,
"useprimary": true,

View file

@ -5,18 +5,18 @@ detect:
rules:
- type: "(?i)\\b(action|advance|all|allocatable|allocated|any|apostrophe)\\b"
- type: "(?i)\\b(append|asis|assign|assignment|associated|character|common)\\b"
- type: "(?i)\\b(append|asis|assign|assignment|associated|bind|character|common)\\b"
- type: "(?i)\\b(complex|data|default|delim|dimension|double precision)\\b"
- type: "(?i)\\b(elemental|epsilon|external|file|fmt|form|format|huge)\\b"
- type: "(?i)\\b(elemental|enum|enumerator|epsilon|external|file|fmt|form|format|huge)\\b"
- type: "(?i)\\b(implicit|include|index|inquire|integer|intent|interface)\\b"
- type: "(?i)\\b(intrinsic|iostat|kind|logical|module|none|null|only)\\\\b"
- type: "(?i)\\b(operator|optional|pack|parameter|pointer|position|private)\\b"
- type: "(?i)\\b(program|public|real|recl|recursive|selected_int_kind)\\b"
- type: "(?i)\\b(selected_real_kind|subroutine|status)\\b"
- type: "(?i)\\b(selected_real_kind|subroutine|status|module|function|logical)\\b"
- constant: "(?i)\\b(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\\b"
- constant: "(?i)\\b(close|contains|count|cpu_time|cshift|date_and_time)\\b"
- constant: "(?i)\\b(deallocate|digits|dot_product|eor|eoshift|function|iachar)\\b"
- constant: "(?i)\\b(deallocate|digits|dot_product|eor|eoshift|iachar)\\b"
- constant: "(?i)\\b(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\\b"
- constant: "(?i)\\b(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\\b"
- constant: "(?i)\\b(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\\b"
@ -24,16 +24,18 @@ rules:
- constant: "(?i)\\b(random_number|random_seed|range|read|readwrite|replace)\\b"
- constant: "(?i)\\b(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\\b"
- constant: "(?i)\\b(spread|sum|system_clock|target|transfer|transpose|trim)\\b"
- constant: "(?i)\\b(ubound|unpack|verify|write|tiny|type|use|yes)\\b"
- constant: "(?i)\\b(ubound|unpack|verify|write|tiny|type|use|yes|true|false|not)\\b"
- constant.number: "\\b([0-9]+)\\b"
- statement: "(?i)\\b(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\\b"
- statement: "(?i)\\b(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\\b"
- statement: "(?i)\\b(.or.|repeat|select case|then|where|while)\\b"
- statement: "(?i)\\b(or|and|repeat|select|case|then|where|while|import)\\b"
- special: "(?i)\\b(continue|cycle|exit|go?to|result|return)\\b"
#Operator Color
- symbol.operator: "[.:;,+*|=!\\%]|/|-|&"
- symbol.operator: "[.:;,+*|=!\\%]|/|-|>|<|&"
#Parenthetical Color
- symbol.bracket: "[(){}]|\\[|\\]"
@ -60,4 +62,3 @@ rules:
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"

View file

@ -5,7 +5,7 @@ detect:
rules:
# Rebase commands
- statement: "^(p(ick)?|r(eword)?|e(dit)?|s(quash)?|f(ixup)?|x|exec|d(rop)?)\\b"
- statement: "^(p(ick)?|r(eword)?|e(dit)?|s(quash)?|f(ixup)?|x|exec|b(reak)?|d(rop)?|l(abel)?|t|reset|m(erge)?)\\b"
# Commit IDs
- identifier: "\\b([0-9a-f]{7,40})\\b"

View file

@ -0,0 +1,15 @@
filetype: gnuplot
detect:
filename: "\\.(gnu|gpi|plt|gp)$"
rules:
- statement: "\\b(set|unset|plot|splot|replot|if|else|do|for|while|fit)\\b"
- symbol.operator: "[-+/*=<>?:!~%&|^$]"
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b"
- comment:
start: "#"
end: "$"
rules:
- todo: "TODO:?"

52
runtime/syntax/hc.yaml Normal file
View file

@ -0,0 +1,52 @@
filetype: hc
detect:
filename: "(\\.(hc|HC)$|\\.(hh|HH)$|\\.ii?$|\\.(def)$)"
rules:
- identifier: "\\b[A-Z_][0-9A-Z_]+\\b"
- type: "\\b(F64|I8|U8|I16|U16|I32|U32|I64|U64|sizeof|enum|U0|static|extern|struct|union|class|intern|public|argc|argv|asm)\\b"
- statement: "\\b(for|if|while|do|else|case|default|switch)\\b"
- statement: "\\b(try|catch|throw|goto|continue|break|return)\\b"
- preproc: "^[[:space:]]*#[[:space:]]*(define|pragma|include|(un|ifn?)def|endif|el(if|se)|if|help_index|ifjit|ifaot|exe)"
# Operator Color
- symbol.operator: "([.:;,+*|=!\\%]|<|>|/|-|&)"
- symbol.brackets: "[(){}]|\\[|\\]"
# Integer Constants
- constant.number: "(\\b([1-9][0-9]*|0[0-7]*|0[Xx][0-9A-Fa-f]+|0[Bb][01]+)([Uu]?[Ll][Ll]?|[Ll][Ll]?[Uu]?)?\\b)"
# Decimal Floating Constants
- constant.number: "(\\b(([0-9]*[.][0-9]+|[0-9]+[.][0-9]*)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)[FfLl]?\\b)"
# Hexadecimal Floating Constants
- constant.number: "(\\b0[Xx]([0-9A-Za-z]*[.][0-9A-Za-z]+|[0-9A-Za-z]+[.][0-9A-Za-z]*)[Pp][+-]?[0-9]+[FfLl]?\\b)"
- constant.number: "NULL"
- constant.number: "TRUE"
- constant.number: "FALSE"
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- error: "..+"
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"
- comment:
start: "//"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "(TODO|XXX|FIXME):?"

View file

@ -22,7 +22,7 @@ rules:
- statement: "\\b(get|if|import|from|in|of|instanceof|let|new|reject|resolve|return)\\b"
- statement: "\\b(set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\\b"
# reserved but unassigned
- error: "\\b(enum|implements|interface|package|private|protected|public)"
- error: "\\b(enum|implements|interface|package|private|protected|public)\\b"
- constant: "\\b(globalThis|Infinity|null|undefined|NaN)\\b"
- constant: "\\b(null|undefined|NaN)\\b"
- constant: "\\b(true|false)\\b"

View file

@ -25,3 +25,8 @@ rules:
start: "#"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []

114
runtime/syntax/nu.yaml Normal file
View file

@ -0,0 +1,114 @@
filetype: nu
detect:
filename: "\\.nu$"
rules:
- symbol: "[-+/*=<>!~%?:&|]"
# https://www.nushell.sh/book/command_reference.html
- statement: "\\b(agg-groups|agg|alias|all-false|all-true|all?|ansi gradient)\\b"
- statement: "\\b(ansi strip|ansi|any?|append|append|arg-max)\\b"
- statement: "\\b(arg-min|arg-sort|arg-true|arg-unique|as-date)\\b"
- statement: "\\b(as-datetime|as|benchmark|build-string|cache|cal|cd)\\b"
- statement: "\\b(char|clear|col|collect|columns|compact|complete)\\b"
- statement: "\\b(concatenate|config|config env|config nu|contains)\\b"
- statement: "\\b(count|count-null|cp|cumulative|date format|date humanize)\\b"
- statement: "\\b(date list-timezone|date now|date to-record|date to-table)\\b"
- statement: "\\b(date to-timezone|date|db and|db as|db col|db collect)\\b"
- statement: "\\b(db describe|db fn|db from|db group-by|db join|db limit)\\b"
- statement: "\\b(db open|db or|db order-by|db over|db query|db schema)\\b"
- statement: "\\b(db select|db testing|db where|db|debug|decode)\\b"
- statement: "\\b(def-env|default|def|describe|describe|detect columns)\\b"
- statement: "\\b(df-not|do|drop|drop|drop column|drop nth|drop-duplicates)\\b"
- statement: "\\b(drop-nulls|dtypes|du|each while|each|echo|empty?)\\b"
- statement: "\\b(enter|env|error make|every|exec|exit|explode)\\b"
- statement: "\\b(export alias|export def|export def-env|export env)\\b"
- statement: "\\b(export extern|export|expr-not|extern|fetch|fill-na)\\b"
- statement: "\\b(fill-null|filter-with|find|first|flatten)\\b"
- statement: "\\b(fmt|format filesize|format|for|from csv|from eml)\\b"
- statement: "\\b(from ics|from ini|from json|from nuon|from ods|from ssv)\\b"
- statement: "\\b(from toml|from tsv|from url|from vcf|from xlsx|from xml)\\b"
- statement: "\\b(from yaml|from yml|from|get-day|get-hour|get-minute)\\b"
- statement: "\\b(get-month|get-nanosecond|get-ordinal|get-second|get-week)\\b"
- statement: "\\b(get-weekday|get-year|get|glob|grid|group-by)\\b"
- statement: "\\b(group|gstat|g|hash base64|hash md5|hash sha256|hash)\\b"
- statement: "\\b(headers|help|hide|histogram|history|if|ignore)\\b"
- statement: "\\b(inc|input|insert|into binary|into bool|into datetime|into decimal)\\b"
- statement: "\\b(into duration|into filesize|into int|into string|into)\\b"
- statement: "\\b(is-admin|is-duplicated|is-in|is-not-null)\\b"
- statement: "\\b(is-null|is-unique|join|keep|keep until)\\b"
- statement: "\\b(keep while|keybindings default|keybindings listen|keybindings list)\\b"
- statement: "\\b(keybindings|kill|last|length|let-env|let)\\b"
- statement: "\\b(lines|list|lit|load-env|ls|ls-df|match|math abs)\\b"
- statement: "\\b(math avg|math ceil|math eval|math floor|math max)\\b"
- statement: "\\b(math median|math min|math mode|math product|math round)\\b"
- statement: "\\b(math sqrt|math stddev|math sum|math variance|math|max)\\b"
- statement: "\\b(mean|median|melt|merge|metadata)\\b"
- statement: "\\b(min|mkdir|module|move|mv|n|n-unique|n-unique)\\b"
- statement: "\\b(nth|nu-highlight|open|open-df|otherwise|overlay)\\b"
- statement: "\\b(overlay add|overlay list|overlay new|overlay remove|p)\\b"
- statement: "\\b(par-each|parse|path basename|path dirname|path exists)\\b"
- statement: "\\b(path expand|path join|path parse|path relative-to|path split)\\b"
- statement: "\\b(path type|path|pivot|post|prepend|print|ps|quantile)\\b"
- statement: "\\b(quantile|query json|query web|query xml|query|random bool)\\b"
- statement: "\\b(random chars|random decimal|random dice|random integer)\\b"
- statement: "\\b(random uuid|random|range|reduce|register|reject|rename)\\b"
- statement: "\\b(replace|replace-all|reverse|reverse|rm|roll down)\\b"
- statement: "\\b(roll left|roll right|roll up|rolling|roll|rotate)\\b"
- statement: "\\b(run-external|sample|save|select|select|seq|seq char)\\b"
- statement: "\\b(seq date|set|set-with-idx|shape|shells|shift|shuffle)\\b"
- statement: "\\b(size|skip until|skip while|skip|sleep|slice|sort)\\b"
- statement: "\\b(sort-by|source|split chars|split column|split row)\\b"
- statement: "\\b(split-by|split|std|std|str camel-case|str capitalize)\\b"
- statement: "\\b(str collect|str contains|str downcase|str ends-with|str find-replace)\\b"
- statement: "\\b(str index-of|str kebab-case|str length|str lpad|str pascal-case)\\b"
- statement: "\\b(str replace|str reverse|str rpad|str screaming-snake-case)\\b"
- statement: "\\b(str snake-case|str starts-with|str substring|str title-case)\\b"
- statement: "\\b(str to-datetime|str to-decimal|str to-int|str trim|str upcase)\\b"
- statement: "\\b(str-lengths|str-slice|strftime|str|sum|sys|table)\\b"
- statement: "\\b(take until|take while|take|term size|to csv)\\b"
- statement: "\\b(to html|to json|to md|to nuon|to text|to toml|to tsv)\\b"
- statement: "\\b(to url|to xml|to yaml|to-csv|to-df|to-dummies|to-lazy)\\b"
- statement: "\\b(to-lowercase|to-nu|to-parquet|to-uppercase|touch|to)\\b"
- statement: "\\b(transpose|tutor|unalias|uniq|unique|update|update cells)\\b"
- statement: "\\b(upsert|url host|url path|url query|url scheme|url)\\b"
- statement: "\\b(use|value-counts|var|version|view-source|watch)\\b"
- statement: "\\b(when|where|which|window|with-column|with-env|wrap)\\b"
# https://www.nushell.sh/book/types_of_data.html#booleans
- constant: "\\b(false|true)\\b"
- constant.number: "\\b[-+]?([1-9][0-9])*\\b"
# https://www.nushell.sh/book/types_of_data.html#binary-data
- constant.number: "\\b[-+]?(0(x|b|o)\\[[0-9a-fA-F ]+\\])"
# https://www.nushell.sh/book/types_of_data.html#file-sizes
- constant.number: "\\b[-+]?([0-9]+[BbMmGgTtPp][i]?[Bb]?)?\\b"
# https://www.nushell.sh/book/types_of_data.html#duration
- constant.number: "\\b[-+]?([0-9]+[num]?[s])?\\b"
- constant.number: "\\b[-+]?([0-9]+(sec|min|hr|day|wk))?\\b"
# https://www.nushell.sh/book/types_of_data.html#dates
- constant.number: "\\b([0-9]+[-][0-9]+[-][0-9]+([T][0-9]+[:][0-9]+[:][0-9]+)?([\\+][0-9]+[:][0-9]+)?)\\b"
# https://www.nushell.sh/book/types_of_data.html#ranges
- constant.number: "([0-9]+(\\.\\.)[0-9]+)?"
# https://www.nushell.sh/book/types_of_data.html#open-ended-ranges
- constant.number: "((\\.\\.)[0-9]+)?"
- constant.number: "([0-9]+(\\.\\.))?"
- comment:
start: "#"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "(FIXME|TODO|NOTE):?"
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- constant.specialChar: "\\\\."

View file

@ -17,14 +17,14 @@ rules:
- comment: "<!--.+?-->"
- default: "<\\?(php|=)\" end=\"\\?>"
- identifier.class: "([a-zA-Z0-9_-]+)\\("
- type: "\\b(array|bool(ean)?|callable|callback|float|int(eger)?|iterable|object|resource|mixed|string|void)\\b"
- type: "\\b(array|bool|callable|float|int|iterable|object|mixed|string|void)\\b"
- identifier.class: "[a-zA-Z\\\\]+::"
- identifier: "\\b([A-Z][a-zA-Z0-9_]+)\\b"
- identifier: "([A-Z0-9_]+)[;|\\s|\\)|,]"
- type.keyword: "\\b(global|final|public|private|protected|static|const|var)\\b"
- statement: "\\b(abstract|catch|class|declare|do|else(if)?|end(declare|for(each)?|if|switch|while)|finally|for(each)|function|if|interface|namespace|switch|trait|try|while)\\b"
- statement: "\\b(abstract|catch|class|declare|do|else(if)?|end(declare|for(each)?|if|switch|while)|enum|finally|for(each)|function|if|interface|namespace|switch|trait|try|while)\\b"
- identifier: "\\bnew\\s+([a-zA-Z0-9\\\\]+)"
- special: "\\b(as|and|break|case|clone|continue|default|die|fn|echo|empty|eval|exit|extends|goto|or|include(_once)?|implements|instanceof|insteadof|isset|list|new|print|return|require(_once)?|unset|use|throw|xor|yield(\\s+from))\\b"
- special: "\\b(as|and|break|case|clone|continue|default|die|fn|echo|empty|eval|exit|extends|goto|or|include(_once)?|implements|instanceof|insteadof|isset|list|match|new|print|return|require(_once)?|unset|use|throw|xor|yield(\\s+from))\\b"
- constant.bool: "\\b(true|false|null|TRUE|FALSE|NULL)\\b"
- constant: "[\\s|=|\\s|\\(|/|+|-|\\*|\\[]"
- constant.number: "[0-9]"

View file

@ -1,7 +1,7 @@
filetype: scala
detect:
filename: "\\.scala$"
filename: "\\.sc(ala)?$"
rules:
- type: "\\b(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\\b"

View file

@ -1,4 +1,5 @@
//+build ignore
//go:build ignore
// +build ignore
package main
@ -6,7 +7,6 @@ import (
"fmt"
"io/ioutil"
"os"
"runtime"
)
func check(e error) {
@ -16,32 +16,32 @@ func check(e error) {
}
func main() {
if runtime.GOOS == "darwin" {
if len(os.Args) == 2 {
if len(os.Args) == 3 {
if os.Args[1] == "darwin" {
rawInfoPlistString := `<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>io.github.micro-editor</string>
<key>CFBundleName</key>
<string>micro</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>` + os.Args[1] + `</string>
</dict>
</plist>
`
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>io.github.micro-editor</string>
<key>CFBundleName</key>
<string>micro</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>` + os.Args[2] + `</string>
</dict>
</plist>
`
infoPlistData := []byte(rawInfoPlistString)
err := ioutil.WriteFile("/tmp/micro-info.plist", infoPlistData, 0644)
check(err)
fmt.Println("-linkmode external -extldflags -Wl,-sectcreate,__TEXT,__info_plist,/tmp/micro-info.plist")
} else {
panic("missing argument for version number!")
}
} else {
panic("missing arguments")
}
}