From f71ec66309ce37d63f4b5523eb907648183f65be Mon Sep 17 00:00:00 2001 From: Georgi Kirilov Date: Tue, 1 Oct 2019 12:10:10 +0300 Subject: add a sample config --- defaults.lua | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 defaults.lua diff --git a/defaults.lua b/defaults.lua new file mode 100644 index 0000000..a1363aa --- /dev/null +++ b/defaults.lua @@ -0,0 +1,98 @@ +return { + {"absolute", "relative"}, + {"high", "low"}, + {"horizontal", "vertical"}, + {"in", "out"}, + {"inner", "outer"}, + {"left", "right"}, + {"top", "bottom"}, + {"up", "down"}, + + {"black", "white"}, + {"gray", "maroon", "red", "purple", "fuchsia", "green", "yellow", "blue", "aqua"}, + {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}, + {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"}, + {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}, + {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}, + + {"atan", "tan"}, + {"ceil", "floor"}, + {"cos", "sin"}, + {"min", "max"}, + + {"activate", "deactivate"}, + {"address", "port"}, + {"add", "remove"}, + {"available", "unavailable"}, + {"background", "foreground"}, + {"before", "after"}, + {"client", "server"}, + {"connected", "disconnected"}, + {"connect", "disconnect"}, + {"development", "production"}, + {"dev", "prod"}, + {"drag", "drop"}, + {"file", "folder"}, + {"first", "last"}, + {"from", "to"}, + {"get", "set"}, + {"input", "output"}, + {"install", "uninstall"}, + {"key", "value"}, + {"load", "unload"}, + {"minor", "major"}, + {"online", "offline"}, + {"open", "close"}, + {"parent", "child"}, + {"positive", "negative"}, + {"prefix", "suffix"}, + {"previous", "next"}, + {"public", "private"}, + {"request", "response"}, + {"req", "res"}, + {"row", "column"}, + {"short", "long"}, + {"show", "hide"}, + {"source", "destination"}, + {"start", "stop"}, + {"valid", "invalid"}, + {"visible", "hidden"}, + {"width", "height"}, + {"x", "y"}, + + {"0", "1"}, + {"enabled", "disabled"}, + {"enable", "disable"}, + {"on", "off"}, + {"true", "false"}, + {"yes", "no"}, + + {"header", "footer"}, + + -- The tokens below can't be reliably matched by the built-in word textobject. + -- + -- TODO (maybe): automatically generate a Lua pattern from all the words + -- in the configuration table, then: + -- region = {start = selection.range.start - horizon, finish = selection.range.finish + horizon} + -- match the pattern against file:content(region) + -- and find the match that contains selection.pos. + + -- {"[]", "{}"}, + -- {"(", ")"}, + -- {"[", "]"}, + -- {"{", "}"}, + -- {"'", "\"", "`"}, + + -- {"*=", "/="}, + -- {"*", "/"}, + -- {"&&", "||"}, + -- {"&", "|"}, + -- {"++", "--"}, + -- {"+=", "-="}, + -- {"+", "-"}, + -- {"<<", ">>"}, + -- {"<=", ">="}, + -- {"<", ">"}, + -- {"===", "!=="}, + -- {"==", "!="}, +} -- cgit