@enjoys/context-engine 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/data/completion/awk.json +203 -0
  2. package/data/completion/crontab.json +203 -0
  3. package/data/completion/dotenv.json +170 -0
  4. package/data/completion/graphql.json +181 -0
  5. package/data/completion/hcl.json +192 -0
  6. package/data/completion/ini.json +137 -0
  7. package/data/completion/json.json +170 -0
  8. package/data/completion/makefile.json +203 -0
  9. package/data/completion/markdown.json +225 -0
  10. package/data/completion/nginx.json +280 -0
  11. package/data/completion/perl.json +203 -0
  12. package/data/completion/powershell.json +225 -0
  13. package/data/completion/protobuf.json +181 -0
  14. package/data/completion/ssh_config.json +159 -0
  15. package/data/completion/systemd.json +170 -0
  16. package/data/completion/xml.json +159 -0
  17. package/data/completion/zsh.json +214 -0
  18. package/data/defination/awk.json +125 -0
  19. package/data/defination/crontab.json +107 -0
  20. package/data/defination/dotenv.json +71 -0
  21. package/data/defination/graphql.json +119 -0
  22. package/data/defination/hcl.json +125 -0
  23. package/data/defination/ini.json +77 -0
  24. package/data/defination/json.json +83 -0
  25. package/data/defination/makefile.json +113 -0
  26. package/data/defination/markdown.json +107 -0
  27. package/data/defination/nginx.json +131 -0
  28. package/data/defination/perl.json +101 -0
  29. package/data/defination/powershell.json +119 -0
  30. package/data/defination/protobuf.json +119 -0
  31. package/data/defination/ssh_config.json +89 -0
  32. package/data/defination/systemd.json +107 -0
  33. package/data/defination/xml.json +83 -0
  34. package/data/defination/zsh.json +113 -0
  35. package/data/hover/awk.json +47 -0
  36. package/data/hover/crontab.json +47 -0
  37. package/data/hover/dotenv.json +47 -0
  38. package/data/hover/graphql.json +47 -0
  39. package/data/hover/hcl.json +75 -0
  40. package/data/hover/ini.json +68 -0
  41. package/data/hover/json.json +89 -0
  42. package/data/hover/makefile.json +68 -0
  43. package/data/hover/markdown.json +68 -0
  44. package/data/hover/nginx.json +89 -0
  45. package/data/hover/perl.json +47 -0
  46. package/data/hover/powershell.json +54 -0
  47. package/data/hover/protobuf.json +47 -0
  48. package/data/hover/ssh_config.json +47 -0
  49. package/data/hover/systemd.json +54 -0
  50. package/data/hover/xml.json +61 -0
  51. package/data/hover/zsh.json +61 -0
  52. package/data/manifest.json +210 -6
  53. package/package.json +1 -1
@@ -0,0 +1,119 @@
1
+ {
2
+ "language": "protobuf",
3
+ "definitions": {
4
+ "syntax": {
5
+ "signature": "syntax = \"proto3\";",
6
+ "description": "Declares the protobuf syntax version. proto3 is the current version.",
7
+ "type": "keyword",
8
+ "module": "protobuf"
9
+ },
10
+ "message": {
11
+ "signature": "message Name { type field = number; }",
12
+ "description": "Defines a structured data type. Field numbers must be unique within a message.",
13
+ "type": "keyword",
14
+ "module": "protobuf"
15
+ },
16
+ "service": {
17
+ "signature": "service Name { rpc Method(Req) returns (Res); }",
18
+ "description": "Defines a gRPC service with RPC methods.",
19
+ "type": "keyword",
20
+ "module": "protobuf"
21
+ },
22
+ "rpc": {
23
+ "signature": "rpc Name(Request) returns (Response)",
24
+ "description": "Defines a remote procedure call method within a service.",
25
+ "type": "keyword",
26
+ "module": "protobuf"
27
+ },
28
+ "enum": {
29
+ "signature": "enum Name { VALUE = number; }",
30
+ "description": "Defines an enumeration. First value must be 0 (default/unspecified).",
31
+ "type": "keyword",
32
+ "module": "protobuf"
33
+ },
34
+ "oneof": {
35
+ "signature": "oneof name { type field = num; }",
36
+ "description": "At most one field in the oneof can be set at a time. Setting one clears others.",
37
+ "type": "keyword",
38
+ "module": "protobuf"
39
+ },
40
+ "repeated": {
41
+ "signature": "repeated Type name = num;",
42
+ "description": "A repeated field represents a list/array. Can contain zero or more elements.",
43
+ "type": "modifier",
44
+ "module": "protobuf"
45
+ },
46
+ "map": {
47
+ "signature": "map<KeyType, ValueType> name = num;",
48
+ "description": "Map field for key-value pairs. Keys must be integral or string types.",
49
+ "type": "modifier",
50
+ "module": "protobuf"
51
+ },
52
+ "import": {
53
+ "signature": "import \"file.proto\";",
54
+ "description": "Import definitions from another proto file.",
55
+ "type": "keyword",
56
+ "module": "protobuf"
57
+ },
58
+ "package": {
59
+ "signature": "package name;",
60
+ "description": "Declares the namespace to prevent name collisions between proto definitions.",
61
+ "type": "keyword",
62
+ "module": "protobuf"
63
+ },
64
+ "option": {
65
+ "signature": "option name = value;",
66
+ "description": "File, message, or field-level options. Common: go_package, java_package.",
67
+ "type": "keyword",
68
+ "module": "protobuf"
69
+ },
70
+ "stream": {
71
+ "signature": "stream Type",
72
+ "description": "Used in RPC definitions for client-streaming, server-streaming, or bidirectional streaming.",
73
+ "type": "modifier",
74
+ "module": "protobuf"
75
+ },
76
+ "double": {
77
+ "signature": "double",
78
+ "description": "64-bit floating point number.",
79
+ "type": "scalar",
80
+ "module": "protobuf"
81
+ },
82
+ "float": {
83
+ "signature": "float",
84
+ "description": "32-bit floating point number.",
85
+ "type": "scalar",
86
+ "module": "protobuf"
87
+ },
88
+ "int32": {
89
+ "signature": "int32",
90
+ "description": "32-bit signed integer. Inefficient for negative numbers; use sint32 instead.",
91
+ "type": "scalar",
92
+ "module": "protobuf"
93
+ },
94
+ "int64": {
95
+ "signature": "int64",
96
+ "description": "64-bit signed integer.",
97
+ "type": "scalar",
98
+ "module": "protobuf"
99
+ },
100
+ "bool": {
101
+ "signature": "bool",
102
+ "description": "Boolean true/false value.",
103
+ "type": "scalar",
104
+ "module": "protobuf"
105
+ },
106
+ "string": {
107
+ "signature": "string",
108
+ "description": "UTF-8 or 7-bit ASCII text string.",
109
+ "type": "scalar",
110
+ "module": "protobuf"
111
+ },
112
+ "bytes": {
113
+ "signature": "bytes",
114
+ "description": "Arbitrary byte sequence.",
115
+ "type": "scalar",
116
+ "module": "protobuf"
117
+ }
118
+ }
119
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "language": "ssh_config",
3
+ "definitions": {
4
+ "Host": {
5
+ "signature": "Host pattern",
6
+ "description": "Restricts the following declarations to hosts matching the pattern. * matches all. Supports wildcards and negation (!).",
7
+ "type": "keyword",
8
+ "module": "ssh_config(5)"
9
+ },
10
+ "Match": {
11
+ "signature": "Match criteria",
12
+ "description": "Conditional block matching on host, user, address, etc. More flexible than Host.",
13
+ "type": "keyword",
14
+ "module": "ssh_config(5)"
15
+ },
16
+ "HostName": {
17
+ "signature": "HostName hostname",
18
+ "description": "The real hostname or IP to connect to. Allows using short aliases in Host.",
19
+ "type": "directive",
20
+ "module": "ssh_config(5)"
21
+ },
22
+ "User": {
23
+ "signature": "User username",
24
+ "description": "The remote username to log in as.",
25
+ "type": "directive",
26
+ "module": "ssh_config(5)"
27
+ },
28
+ "Port": {
29
+ "signature": "Port 22",
30
+ "description": "The port number to connect to on the remote host. Default is 22.",
31
+ "type": "directive",
32
+ "module": "ssh_config(5)"
33
+ },
34
+ "IdentityFile": {
35
+ "signature": "IdentityFile ~/.ssh/id_ed25519",
36
+ "description": "Path to the private key file. Multiple can be specified; they are tried in order.",
37
+ "type": "directive",
38
+ "module": "ssh_config(5)"
39
+ },
40
+ "ProxyJump": {
41
+ "signature": "ProxyJump host1,host2",
42
+ "description": "Connect through one or more jump hosts (bastion). Replacement for ProxyCommand.",
43
+ "type": "directive",
44
+ "module": "ssh_config(5)"
45
+ },
46
+ "LocalForward": {
47
+ "signature": "LocalForward localport host:remoteport",
48
+ "description": "Forward a local port through SSH to a destination accessible from the remote host.",
49
+ "type": "directive",
50
+ "module": "ssh_config(5)"
51
+ },
52
+ "RemoteForward": {
53
+ "signature": "RemoteForward remoteport host:localport",
54
+ "description": "Forward a remote port back to the local machine through the SSH tunnel.",
55
+ "type": "directive",
56
+ "module": "ssh_config(5)"
57
+ },
58
+ "DynamicForward": {
59
+ "signature": "DynamicForward port",
60
+ "description": "Set up a local SOCKS5 proxy forwarding through the SSH connection.",
61
+ "type": "directive",
62
+ "module": "ssh_config(5)"
63
+ },
64
+ "ForwardAgent": {
65
+ "signature": "ForwardAgent yes|no",
66
+ "description": "Forward the SSH authentication agent to the remote machine. Use with caution.",
67
+ "type": "directive",
68
+ "module": "ssh_config(5)"
69
+ },
70
+ "ServerAliveInterval": {
71
+ "signature": "ServerAliveInterval 60",
72
+ "description": "Send a keep-alive message every N seconds if no data has been received. Prevents connection drops.",
73
+ "type": "directive",
74
+ "module": "ssh_config(5)"
75
+ },
76
+ "StrictHostKeyChecking": {
77
+ "signature": "StrictHostKeyChecking yes|no|ask|accept-new",
78
+ "description": "Controls host key verification. accept-new adds unknown keys but rejects changed ones.",
79
+ "type": "directive",
80
+ "module": "ssh_config(5)"
81
+ },
82
+ "AddKeysToAgent": {
83
+ "signature": "AddKeysToAgent yes|no",
84
+ "description": "Automatically add keys to the running ssh-agent after authentication.",
85
+ "type": "directive",
86
+ "module": "ssh_config(5)"
87
+ }
88
+ }
89
+ }
@@ -0,0 +1,107 @@
1
+ {
2
+ "language": "systemd",
3
+ "definitions": {
4
+ "Unit": {
5
+ "signature": "[Unit]",
6
+ "description": "Contains generic information about the unit - description, dependencies, ordering.",
7
+ "type": "section",
8
+ "module": "systemd.unit"
9
+ },
10
+ "Service": {
11
+ "signature": "[Service]",
12
+ "description": "Configuration specific to service units - how to start, stop, and manage the process.",
13
+ "type": "section",
14
+ "module": "systemd.service"
15
+ },
16
+ "Install": {
17
+ "signature": "[Install]",
18
+ "description": "Installation info used by systemctl enable/disable. Defines which target pulls in this unit.",
19
+ "type": "section",
20
+ "module": "systemd.unit"
21
+ },
22
+ "Timer": {
23
+ "signature": "[Timer]",
24
+ "description": "Timer unit configuration. Modern replacement for cron jobs.",
25
+ "type": "section",
26
+ "module": "systemd.timer"
27
+ },
28
+ "Type": {
29
+ "signature": "Type=simple|forking|oneshot|notify|dbus",
30
+ "description": "Defines the process start-up type. simple: main process stays in foreground. forking: traditional daemon. oneshot: runs once.",
31
+ "type": "directive",
32
+ "module": "systemd.service"
33
+ },
34
+ "ExecStart": {
35
+ "signature": "ExecStart=/path/to/command",
36
+ "description": "The command to run when the service is started. Must be an absolute path.",
37
+ "type": "directive",
38
+ "module": "systemd.service"
39
+ },
40
+ "Restart": {
41
+ "signature": "Restart=no|on-success|on-failure|on-abnormal|on-watchdog|on-abort|always",
42
+ "description": "Configures when the service should be automatically restarted.",
43
+ "type": "directive",
44
+ "module": "systemd.service"
45
+ },
46
+ "RestartSec": {
47
+ "signature": "RestartSec=5",
48
+ "description": "Time to sleep before restarting a service. Default is 100ms.",
49
+ "type": "directive",
50
+ "module": "systemd.service"
51
+ },
52
+ "User": {
53
+ "signature": "User=username",
54
+ "description": "Run the service as the specified user.",
55
+ "type": "directive",
56
+ "module": "systemd.exec"
57
+ },
58
+ "WorkingDirectory": {
59
+ "signature": "WorkingDirectory=/path",
60
+ "description": "Set the working directory for the executed process.",
61
+ "type": "directive",
62
+ "module": "systemd.exec"
63
+ },
64
+ "Environment": {
65
+ "signature": "Environment=KEY=value",
66
+ "description": "Set environment variables for the service process.",
67
+ "type": "directive",
68
+ "module": "systemd.exec"
69
+ },
70
+ "EnvironmentFile": {
71
+ "signature": "EnvironmentFile=/path/to/file",
72
+ "description": "Load environment variables from a file. Prefix with - to ignore if missing.",
73
+ "type": "directive",
74
+ "module": "systemd.exec"
75
+ },
76
+ "After": {
77
+ "signature": "After=unit.target",
78
+ "description": "Defines ordering - start this unit after the listed units.",
79
+ "type": "directive",
80
+ "module": "systemd.unit"
81
+ },
82
+ "WantedBy": {
83
+ "signature": "WantedBy=multi-user.target",
84
+ "description": "When enabled, this unit will be started by the specified target.",
85
+ "type": "directive",
86
+ "module": "systemd.unit"
87
+ },
88
+ "OnCalendar": {
89
+ "signature": "OnCalendar=*-*-* 00:00:00",
90
+ "description": "Calendar event expression for timer units. Supports: daily, weekly, hourly, or specific timestamps.",
91
+ "type": "directive",
92
+ "module": "systemd.timer"
93
+ },
94
+ "LimitNOFILE": {
95
+ "signature": "LimitNOFILE=65536",
96
+ "description": "Set the max number of open file descriptors for the process.",
97
+ "type": "directive",
98
+ "module": "systemd.exec"
99
+ },
100
+ "ProtectSystem": {
101
+ "signature": "ProtectSystem=strict|full|true",
102
+ "description": "Mount /usr and /boot as read-only. strict also mounts /etc as read-only.",
103
+ "type": "directive",
104
+ "module": "systemd.exec"
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,83 @@
1
+ {
2
+ "language": "xml",
3
+ "definitions": {
4
+ "element": {
5
+ "signature": "<tag>content</tag>",
6
+ "description": "An XML element is the basic building block. Elements can contain text, attributes, and other elements.",
7
+ "type": "structure",
8
+ "module": "XML 1.0"
9
+ },
10
+ "attribute": {
11
+ "signature": "name=\"value\"",
12
+ "description": "Attributes provide additional information about elements. Values must be quoted.",
13
+ "type": "syntax",
14
+ "module": "XML 1.0"
15
+ },
16
+ "namespace": {
17
+ "signature": "xmlns:prefix=\"URI\"",
18
+ "description": "XML namespaces prevent element name conflicts by qualifying names with a URI.",
19
+ "type": "syntax",
20
+ "module": "XML Namespaces"
21
+ },
22
+ "CDATA": {
23
+ "signature": "<![CDATA[ ... ]]>",
24
+ "description": "CDATA sections contain text that should not be parsed. Useful for embedding code or special characters.",
25
+ "type": "structure",
26
+ "module": "XML 1.0"
27
+ },
28
+ "comment": {
29
+ "signature": "<!-- comment -->",
30
+ "description": "XML comments are ignored by parsers. Cannot contain the sequence --.",
31
+ "type": "syntax",
32
+ "module": "XML 1.0"
33
+ },
34
+ "declaration": {
35
+ "signature": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>",
36
+ "description": "The XML declaration specifies the XML version and character encoding. Must be the first line.",
37
+ "type": "syntax",
38
+ "module": "XML 1.0"
39
+ },
40
+ "DOCTYPE": {
41
+ "signature": "<!DOCTYPE root SYSTEM \"file.dtd\">",
42
+ "description": "Document Type Declaration defines the document structure and can reference an external DTD.",
43
+ "type": "syntax",
44
+ "module": "XML 1.0"
45
+ },
46
+ "processing_instruction": {
47
+ "signature": "<?target data?>",
48
+ "description": "Processing instructions provide information to the application processing the XML.",
49
+ "type": "syntax",
50
+ "module": "XML 1.0"
51
+ },
52
+ "well_formed": {
53
+ "signature": "Well-formed XML rules",
54
+ "description": "XML must have a single root element, properly nested tags, quoted attributes, and case-sensitive tag names.",
55
+ "type": "concept",
56
+ "module": "XML 1.0"
57
+ },
58
+ "XPath": {
59
+ "signature": "//element[@attr='value']",
60
+ "description": "XPath is a query language for selecting nodes from an XML document. Supports axes, predicates, and functions.",
61
+ "type": "standard",
62
+ "module": "XPath 1.0"
63
+ },
64
+ "XSLT": {
65
+ "signature": "xsl:stylesheet",
66
+ "description": "XSLT is a language for transforming XML documents into other formats (HTML, text, other XML).",
67
+ "type": "standard",
68
+ "module": "XSLT 1.0"
69
+ },
70
+ "DTD": {
71
+ "signature": "Document Type Definition",
72
+ "description": "DTD defines the structure and legal elements/attributes of an XML document. Can be internal or external.",
73
+ "type": "standard",
74
+ "module": "XML 1.0"
75
+ },
76
+ "XSD": {
77
+ "signature": "XML Schema Definition",
78
+ "description": "XSD is an XML-based alternative to DTD for describing the structure of XML documents with data types.",
79
+ "type": "standard",
80
+ "module": "XML Schema"
81
+ }
82
+ }
83
+ }
@@ -0,0 +1,113 @@
1
+ {
2
+ "language": "zsh",
3
+ "definitions": {
4
+ "alias": {
5
+ "signature": "alias name='command'",
6
+ "description": "Creates a shortcut for a command. Aliases are expanded before execution.",
7
+ "type": "builtin",
8
+ "module": "zsh"
9
+ },
10
+ "function": {
11
+ "signature": "fname() { ... }",
12
+ "description": "Defines a shell function. Functions can accept arguments accessed via $1, $2, etc.",
13
+ "type": "syntax",
14
+ "module": "zsh"
15
+ },
16
+ "export": {
17
+ "signature": "export NAME=value",
18
+ "description": "Sets and exports an environment variable, making it available to child processes.",
19
+ "type": "builtin",
20
+ "module": "zsh"
21
+ },
22
+ "source": {
23
+ "signature": "source file",
24
+ "description": "Read and execute commands from a file in the current shell environment. Also: . file",
25
+ "type": "builtin",
26
+ "module": "zsh"
27
+ },
28
+ "setopt": {
29
+ "signature": "setopt OPTION_NAME",
30
+ "description": "Enable a zsh shell option. Use unsetopt to disable.",
31
+ "type": "builtin",
32
+ "module": "zsh"
33
+ },
34
+ "autoload": {
35
+ "signature": "autoload -Uz function",
36
+ "description": "Mark a function for autoloading. -U suppresses alias expansion, -z forces zsh-style.",
37
+ "type": "builtin",
38
+ "module": "zsh"
39
+ },
40
+ "bindkey": {
41
+ "signature": "bindkey 'key' widget",
42
+ "description": "Bind a key sequence to a ZLE (Zsh Line Editor) widget.",
43
+ "type": "builtin",
44
+ "module": "zsh"
45
+ },
46
+ "zstyle": {
47
+ "signature": "zstyle ':pattern' key value",
48
+ "description": "Set context-sensitive style for the completion system and other modules.",
49
+ "type": "builtin",
50
+ "module": "zsh"
51
+ },
52
+ "compdef": {
53
+ "signature": "compdef function command",
54
+ "description": "Associate a completion function with a command.",
55
+ "type": "builtin",
56
+ "module": "zsh/compctl"
57
+ },
58
+ "PROMPT": {
59
+ "signature": "PROMPT='format'",
60
+ "description": "The primary prompt string. Supports escape sequences: %n (username), %m (hostname), %~ (cwd), %F{color}...%f.",
61
+ "type": "variable",
62
+ "module": "zsh"
63
+ },
64
+ "RPROMPT": {
65
+ "signature": "RPROMPT='format'",
66
+ "description": "Right-side prompt. Disappears when typing reaches it. Useful for git status, time, etc.",
67
+ "type": "variable",
68
+ "module": "zsh"
69
+ },
70
+ "HISTFILE": {
71
+ "signature": "HISTFILE=~/.zsh_history",
72
+ "description": "File where command history is saved.",
73
+ "type": "variable",
74
+ "module": "zsh"
75
+ },
76
+ "HISTSIZE": {
77
+ "signature": "HISTSIZE=10000",
78
+ "description": "Maximum number of history entries kept in memory.",
79
+ "type": "variable",
80
+ "module": "zsh"
81
+ },
82
+ "SAVEHIST": {
83
+ "signature": "SAVEHIST=10000",
84
+ "description": "Maximum number of history entries saved to HISTFILE.",
85
+ "type": "variable",
86
+ "module": "zsh"
87
+ },
88
+ "ZSH_THEME": {
89
+ "signature": "ZSH_THEME=\"theme_name\"",
90
+ "description": "Oh My Zsh theme selector. Set before sourcing oh-my-zsh.sh.",
91
+ "type": "variable",
92
+ "module": "Oh My Zsh"
93
+ },
94
+ "AUTO_CD": {
95
+ "signature": "setopt AUTO_CD",
96
+ "description": "If a command is a directory name, cd into it automatically.",
97
+ "type": "option",
98
+ "module": "zsh"
99
+ },
100
+ "GLOB_DOTS": {
101
+ "signature": "setopt GLOB_DOTS",
102
+ "description": "Include dotfiles in glob patterns without explicitly specifying the dot.",
103
+ "type": "option",
104
+ "module": "zsh"
105
+ },
106
+ "SHARE_HISTORY": {
107
+ "signature": "setopt SHARE_HISTORY",
108
+ "description": "Share history between all running zsh sessions.",
109
+ "type": "option",
110
+ "module": "zsh"
111
+ }
112
+ }
113
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "language": "awk",
3
+ "hovers": {
4
+ "fields": {
5
+ "contents": [
6
+ {
7
+ "value": "```awk\n# input: \"John 30 Engineer\"\n# $0 = \"John 30 Engineer\" (whole line)\n# $1 = \"John\" (1st field)\n# $2 = \"30\" (2nd field)\n# $NF = \"Engineer\" (last field)\n# NF = 3 (field count)\n```\n**Fields** - Awk splits each line into fields by FS (default: whitespace). Access with `$1`, `$2`, etc."
8
+ }
9
+ ]
10
+ },
11
+ "pattern_action": {
12
+ "contents": [
13
+ {
14
+ "value": "```awk\n/error/ { print } # regex match\n$3 > 100 { print $1, $3 } # field condition\nNR == 1 { print \"Header:\", $0 }\nNR > 1 { sum += $2 } # skip header\nEND { print sum } # final output\n```\n**pattern { action }** is the fundamental awk structure. If pattern matches, action executes. Omit pattern to match all lines."
15
+ }
16
+ ]
17
+ },
18
+ "arrays": {
19
+ "contents": [
20
+ {
21
+ "value": "```awk\n# Associative arrays (like hash maps)\n{ count[$1]++ } # count occurrences\n{ total[$1] += $2 } # sum by group\nEND {\n for (k in count)\n print k, count[k]\n}\n\n# Check existence:\nif (\"key\" in arr) ...\ndelete arr[\"key\"]\n```\n**Arrays** are associative (string-indexed). No declaration needed. Use `for (k in arr)` to iterate."
22
+ }
23
+ ]
24
+ },
25
+ "one_liners": {
26
+ "contents": [
27
+ {
28
+ "value": "```bash\n# Print 2nd column:\nawk '{print $2}' file.txt\n\n# Sum column:\nawk '{s+=$1} END{print s}' data.txt\n\n# CSV with header skip:\nawk -F, 'NR>1 {print $1}' data.csv\n\n# Unique values:\nawk '!seen[$0]++' file.txt\n\n# Replace text:\nawk '{gsub(/old/,\"new\")}1' file.txt\n```\n**One-liners** - awk excels as a command-line data processor. `-F` sets field separator."
29
+ }
30
+ ]
31
+ },
32
+ "printf": {
33
+ "contents": [
34
+ {
35
+ "value": "```awk\nprintf \"%-20s %5d %8.2f\\n\", $1, $2, $3\n\n# Format specifiers:\n# %s string %-20s left-aligned, 20 wide\n# %d integer %5d right-aligned, 5 wide\n# %f float %8.2f 8 wide, 2 decimal\n# %x hex %o octal\n```\n**printf** provides C-style formatted output. Unlike print, it does NOT add a newline automatically."
36
+ }
37
+ ]
38
+ },
39
+ "built_in_vars": {
40
+ "contents": [
41
+ {
42
+ "value": "```awk\nNR # total record (line) number\nFNR # record number in current file\nNF # number of fields in current line\nFS # input field separator (default: space)\nOFS # output field separator (default: space)\nRS # input record separator (default: newline)\nORS # output record separator (default: newline)\nFILENAME # current input filename\n```\n**Built-in variables** control how awk reads and writes data."
43
+ }
44
+ ]
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "language": "crontab",
3
+ "hovers": {
4
+ "format": {
5
+ "contents": [
6
+ {
7
+ "value": "```\n# .---------------- minute (0-59)\n# | .------------- hour (0-23)\n# | | .---------- day of month (1-31)\n# | | | .------- month (1-12 or jan-dec)\n# | | | | .---- day of week (0-7 or sun-sat)\n# | | | | |\n * * * * * command\n```\n**Cron expression** has 5 time fields followed by the command. Fields support `*`, ranges (`1-5`), lists (`1,3,5`), and steps (`*/5`)."
8
+ }
9
+ ]
10
+ },
11
+ "examples": {
12
+ "contents": [
13
+ {
14
+ "value": "```cron\n*/5 * * * * # every 5 minutes\n0 */2 * * * # every 2 hours\n0 9 * * 1-5 # weekdays at 9 AM\n0 0 1 * * # monthly (1st at midnight)\n0 0 * * 0 # weekly (Sunday midnight)\n30 2 * * * # daily at 2:30 AM\n```\n**Common schedules** - The most frequently used cron patterns for server tasks."
15
+ }
16
+ ]
17
+ },
18
+ "special": {
19
+ "contents": [
20
+ {
21
+ "value": "```cron\n@reboot command # run once at startup\n@hourly command # 0 * * * *\n@daily command # 0 0 * * *\n@weekly command # 0 0 * * 0\n@monthly command # 0 0 1 * *\n@yearly command # 0 0 1 1 *\n```\n**Special strings** are shortcuts for common schedules. `@reboot` is particularly useful for startup tasks."
22
+ }
23
+ ]
24
+ },
25
+ "logging": {
26
+ "contents": [
27
+ {
28
+ "value": "```cron\n# Log stdout and stderr to file:\n0 2 * * * /opt/backup.sh >> /var/log/backup.log 2>&1\n\n# Silence output:\n0 * * * * /opt/check.sh > /dev/null 2>&1\n\n# Email output:\nMAILTO=admin@example.com\n```\n**Logging** - Redirect output to files. Without redirection, cron emails output to MAILTO."
29
+ }
30
+ ]
31
+ },
32
+ "PATH": {
33
+ "contents": [
34
+ {
35
+ "value": "```cron\n# Cron has minimal PATH by default!\n# Always set PATH or use absolute paths:\nPATH=/usr/local/bin:/usr/bin:/bin\n\n# Or use absolute command paths:\n0 * * * * /usr/local/bin/node /opt/app/task.js\n```\n**PATH** - Cron's default PATH is minimal. Commands that work in your shell may fail in cron without setting PATH."
36
+ }
37
+ ]
38
+ },
39
+ "flock": {
40
+ "contents": [
41
+ {
42
+ "value": "```cron\n# Prevent overlapping runs:\n*/5 * * * * flock -n /tmp/myjob.lock /opt/slow-task.sh\n\n# With timeout:\n*/5 * * * * flock -w 10 /tmp/myjob.lock /opt/task.sh\n```\n**flock** prevents concurrent execution. Use `-n` to skip if locked, `-w N` to wait up to N seconds."
43
+ }
44
+ ]
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "language": "dotenv",
3
+ "hovers": {
4
+ "variable": {
5
+ "contents": [
6
+ {
7
+ "value": "```bash\nKEY=value\nDATABASE_URL=postgres://localhost/mydb\nPORT=3000\n```\n**Environment variables** are key-value pairs. No spaces around `=`. Values are strings by default. Apps parse types themselves."
8
+ }
9
+ ]
10
+ },
11
+ "comment": {
12
+ "contents": [
13
+ {
14
+ "value": "```bash\n# This is a comment\n# DATABASE_URL=old-value # disabled\n```\n**Comments** start with `#`. Used for documentation and temporarily disabling variables."
15
+ }
16
+ ]
17
+ },
18
+ "quoted": {
19
+ "contents": [
20
+ {
21
+ "value": "```bash\nSINGLE='literal $value'\nDOUBLE=\"expanded ${VAR}\"\nUNQUOTED=no-spaces-allowed\n```\n**Quoting** rules: Single quotes are literal. Double quotes allow variable expansion. Unquoted values end at whitespace/newline."
22
+ }
23
+ ]
24
+ },
25
+ "DATABASE_URL": {
26
+ "contents": [
27
+ {
28
+ "value": "```bash\n# PostgreSQL\nDATABASE_URL=postgres://user:pass@host:5432/db\n# MySQL\nDATABASE_URL=mysql://user:pass@host:3306/db\n# SQLite\nDATABASE_URL=sqlite:///path/to/db.sqlite3\n```\n**DATABASE_URL** is the standard connection string format used by ORMs and database tools."
29
+ }
30
+ ]
31
+ },
32
+ "security": {
33
+ "contents": [
34
+ {
35
+ "value": "```bash\n# .gitignore:\n.env\n.env.local\n.env.*.local\n\n# .env.example (commit this):\nDATABASE_URL=\nAPI_KEY=\nSECRET_KEY=\n```\n**Security** - Never commit `.env` files with secrets. Use `.env.example` as a template for required variables."
36
+ }
37
+ ]
38
+ },
39
+ "loading": {
40
+ "contents": [
41
+ {
42
+ "value": "```bash\n# Load order (typical):\n# 1. .env (shared defaults)\n# 2. .env.local (local overrides)\n# 3. .env.development (environment-specific)\n# 4. .env.development.local\n```\n**Loading priority** varies by framework. Later files override earlier ones. System env vars usually take highest priority."
43
+ }
44
+ ]
45
+ }
46
+ }
47
+ }