skyzos danielsanjosepro commited on
Commit
62af3c4
·
verified ·
0 Parent(s):

Duplicate from danielsanjosepro/first-humanoid-dataset

Browse files

Co-authored-by: Daniel San Jose Pro <danielsanjosepro@users.noreply.huggingface.co>

This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +67 -0
  2. README.md +219 -0
  3. data/chunk-000/episode_000000.parquet +3 -0
  4. data/chunk-000/episode_000001.parquet +3 -0
  5. data/chunk-000/episode_000002.parquet +3 -0
  6. data/chunk-000/episode_000003.parquet +3 -0
  7. data/chunk-000/episode_000004.parquet +3 -0
  8. data/chunk-000/episode_000005.parquet +3 -0
  9. data/chunk-000/episode_000006.parquet +3 -0
  10. data/chunk-000/episode_000007.parquet +3 -0
  11. data/chunk-000/episode_000008.parquet +3 -0
  12. data/chunk-000/episode_000009.parquet +3 -0
  13. data/chunk-000/episode_000010.parquet +3 -0
  14. data/chunk-000/episode_000011.parquet +3 -0
  15. data/chunk-000/episode_000012.parquet +3 -0
  16. data/chunk-000/episode_000013.parquet +3 -0
  17. data/chunk-000/episode_000014.parquet +3 -0
  18. data/chunk-000/episode_000015.parquet +3 -0
  19. data/chunk-000/episode_000016.parquet +3 -0
  20. data/chunk-000/episode_000017.parquet +3 -0
  21. data/chunk-000/episode_000018.parquet +3 -0
  22. meta/.ipynb_checkpoints/blacklist-checkpoint.json +10 -0
  23. meta/.ipynb_checkpoints/episode_mapping-checkpoint.json +21 -0
  24. meta/.ipynb_checkpoints/episodes-checkpoint.jsonl +19 -0
  25. meta/.ipynb_checkpoints/episodes_stats-checkpoint.jsonl +0 -0
  26. meta/.ipynb_checkpoints/info-checkpoint.json +184 -0
  27. meta/blacklist.json +10 -0
  28. meta/episode_mapping.json +21 -0
  29. meta/episodes.jsonl +19 -0
  30. meta/episodes_stats.jsonl +0 -0
  31. meta/info.json +184 -0
  32. meta/pipeline_config.json +25 -0
  33. meta/tasks.jsonl +1 -0
  34. nvim-linux-x86_64/bin/nvim +3 -0
  35. nvim-linux-x86_64/lib/nvim/parser/c.so +3 -0
  36. nvim-linux-x86_64/lib/nvim/parser/lua.so +0 -0
  37. nvim-linux-x86_64/lib/nvim/parser/markdown.so +3 -0
  38. nvim-linux-x86_64/lib/nvim/parser/markdown_inline.so +3 -0
  39. nvim-linux-x86_64/lib/nvim/parser/query.so +0 -0
  40. nvim-linux-x86_64/lib/nvim/parser/vim.so +3 -0
  41. nvim-linux-x86_64/lib/nvim/parser/vimdoc.so +3 -0
  42. nvim-linux-x86_64/share/applications/nvim.desktop +93 -0
  43. nvim-linux-x86_64/share/icons/hicolor/128x128/apps/nvim.png +3 -0
  44. nvim-linux-x86_64/share/man/man1/nvim.1 +420 -0
  45. nvim-linux-x86_64/share/nvim/runtime/autoload/README.txt +22 -0
  46. nvim-linux-x86_64/share/nvim/runtime/autoload/RstFold.vim +62 -0
  47. nvim-linux-x86_64/share/nvim/runtime/autoload/ada.vim +637 -0
  48. nvim-linux-x86_64/share/nvim/runtime/autoload/adacomplete.vim +109 -0
  49. nvim-linux-x86_64/share/nvim/runtime/autoload/bitbake.vim +95 -0
  50. nvim-linux-x86_64/share/nvim/runtime/autoload/cargo.vim +149 -0
.gitattributes ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mds filter=lfs diff=lfs merge=lfs -text
13
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
14
+ *.model filter=lfs diff=lfs merge=lfs -text
15
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
16
+ *.npy filter=lfs diff=lfs merge=lfs -text
17
+ *.npz filter=lfs diff=lfs merge=lfs -text
18
+ *.onnx filter=lfs diff=lfs merge=lfs -text
19
+ *.ot filter=lfs diff=lfs merge=lfs -text
20
+ *.parquet filter=lfs diff=lfs merge=lfs -text
21
+ *.pb filter=lfs diff=lfs merge=lfs -text
22
+ *.pickle filter=lfs diff=lfs merge=lfs -text
23
+ *.pkl filter=lfs diff=lfs merge=lfs -text
24
+ *.pt filter=lfs diff=lfs merge=lfs -text
25
+ *.pth filter=lfs diff=lfs merge=lfs -text
26
+ *.rar filter=lfs diff=lfs merge=lfs -text
27
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
28
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar filter=lfs diff=lfs merge=lfs -text
31
+ *.tflite filter=lfs diff=lfs merge=lfs -text
32
+ *.tgz filter=lfs diff=lfs merge=lfs -text
33
+ *.wasm filter=lfs diff=lfs merge=lfs -text
34
+ *.xz filter=lfs diff=lfs merge=lfs -text
35
+ *.zip filter=lfs diff=lfs merge=lfs -text
36
+ *.zst filter=lfs diff=lfs merge=lfs -text
37
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
38
+ # Audio files - uncompressed
39
+ *.pcm filter=lfs diff=lfs merge=lfs -text
40
+ *.sam filter=lfs diff=lfs merge=lfs -text
41
+ *.raw filter=lfs diff=lfs merge=lfs -text
42
+ # Audio files - compressed
43
+ *.aac filter=lfs diff=lfs merge=lfs -text
44
+ *.flac filter=lfs diff=lfs merge=lfs -text
45
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
46
+ *.ogg filter=lfs diff=lfs merge=lfs -text
47
+ *.wav filter=lfs diff=lfs merge=lfs -text
48
+ # Image files - uncompressed
49
+ *.bmp filter=lfs diff=lfs merge=lfs -text
50
+ *.gif filter=lfs diff=lfs merge=lfs -text
51
+ *.png filter=lfs diff=lfs merge=lfs -text
52
+ *.tiff filter=lfs diff=lfs merge=lfs -text
53
+ # Image files - compressed
54
+ *.jpg filter=lfs diff=lfs merge=lfs -text
55
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
56
+ *.webp filter=lfs diff=lfs merge=lfs -text
57
+ # Video files - compressed
58
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
59
+ *.webm filter=lfs diff=lfs merge=lfs -text
60
+ nvim-linux-x86_64/bin/nvim filter=lfs diff=lfs merge=lfs -text
61
+ nvim-linux-x86_64/lib/nvim/parser/c.so filter=lfs diff=lfs merge=lfs -text
62
+ nvim-linux-x86_64/lib/nvim/parser/markdown.so filter=lfs diff=lfs merge=lfs -text
63
+ nvim-linux-x86_64/lib/nvim/parser/markdown_inline.so filter=lfs diff=lfs merge=lfs -text
64
+ nvim-linux-x86_64/lib/nvim/parser/vim.so filter=lfs diff=lfs merge=lfs -text
65
+ nvim-linux-x86_64/lib/nvim/parser/vimdoc.so filter=lfs diff=lfs merge=lfs -text
66
+ nvim-linux-x86_64/share/nvim/runtime/neovim.ico filter=lfs diff=lfs merge=lfs -text
67
+ nvim-linux-x86_64/share/nvim/runtime/spell/en.utf-8.spl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ task_categories:
4
+ - robotics
5
+ tags:
6
+ - LeRobot
7
+ configs:
8
+ - config_name: default
9
+ data_files: data/*/*.parquet
10
+ ---
11
+
12
+ This dataset was created using [LeRobot](https://github.com/huggingface/lerobot).
13
+
14
+ ## Dataset Description
15
+
16
+
17
+
18
+ - **Homepage:** [More Information Needed]
19
+ - **Paper:** [More Information Needed]
20
+ - **License:** apache-2.0
21
+
22
+ ## Dataset Structure
23
+
24
+ [meta/info.json](meta/info.json):
25
+ ```json
26
+ {
27
+ "codebase_version": "v2.1",
28
+ "robot_type": null,
29
+ "total_episodes": 19,
30
+ "total_frames": 2285,
31
+ "total_tasks": 1,
32
+ "total_videos": 57,
33
+ "total_chunks": 1,
34
+ "chunks_size": 1000,
35
+ "fps": 30,
36
+ "splits": {
37
+ "train": "0:19"
38
+ },
39
+ "data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.parquet",
40
+ "video_path": "videos/chunk-{episode_chunk:03d}/{video_key}/episode_{episode_index:06d}.mp4",
41
+ "features": {
42
+ "observation.state": {
43
+ "dtype": "float32",
44
+ "shape": [
45
+ 32
46
+ ],
47
+ "names": [
48
+ "tcp_left_pos_x",
49
+ "tcp_left_pos_y",
50
+ "tcp_left_pos_z",
51
+ "tcp_left_quat_x",
52
+ "tcp_left_quat_y",
53
+ "tcp_left_quat_z",
54
+ "tcp_left_quat_w",
55
+ "tcp_right_pos_x",
56
+ "tcp_right_pos_y",
57
+ "tcp_right_pos_z",
58
+ "tcp_right_quat_x",
59
+ "tcp_right_quat_y",
60
+ "tcp_right_quat_z",
61
+ "tcp_right_quat_w",
62
+ "gripper_left_0",
63
+ "gripper_left_1",
64
+ "gripper_right_0",
65
+ "gripper_right_1",
66
+ "last_command_left_0",
67
+ "last_command_left_1",
68
+ "last_command_left_2",
69
+ "last_command_left_3",
70
+ "last_command_left_4",
71
+ "last_command_left_5",
72
+ "last_command_left_6",
73
+ "last_command_right_0",
74
+ "last_command_right_1",
75
+ "last_command_right_2",
76
+ "last_command_right_3",
77
+ "last_command_right_4",
78
+ "last_command_right_5",
79
+ "last_command_right_6"
80
+ ]
81
+ },
82
+ "action": {
83
+ "dtype": "float32",
84
+ "shape": [
85
+ 14
86
+ ],
87
+ "names": [
88
+ "delta_tcp_left_x",
89
+ "delta_tcp_left_y",
90
+ "delta_tcp_left_z",
91
+ "delta_tcp_left_rot_x",
92
+ "delta_tcp_left_rot_y",
93
+ "delta_tcp_left_rot_z",
94
+ "delta_tcp_right_x",
95
+ "delta_tcp_right_y",
96
+ "delta_tcp_right_z",
97
+ "delta_tcp_right_rot_x",
98
+ "delta_tcp_right_rot_y",
99
+ "delta_tcp_right_rot_z",
100
+ "gripper_left",
101
+ "gripper_right"
102
+ ]
103
+ },
104
+ "observation.images.rgb_static": {
105
+ "dtype": "video",
106
+ "shape": [
107
+ 640,
108
+ 640,
109
+ 3
110
+ ],
111
+ "names": [
112
+ "height",
113
+ "width",
114
+ "channel"
115
+ ],
116
+ "info": {
117
+ "video.height": 640,
118
+ "video.width": 640,
119
+ "video.codec": "av1",
120
+ "video.pix_fmt": "yuv420p",
121
+ "video.is_depth_map": false,
122
+ "video.fps": 30,
123
+ "video.channels": 3,
124
+ "has_audio": false
125
+ }
126
+ },
127
+ "observation.images.rgb_left": {
128
+ "dtype": "video",
129
+ "shape": [
130
+ 640,
131
+ 640,
132
+ 3
133
+ ],
134
+ "names": [
135
+ "height",
136
+ "width",
137
+ "channel"
138
+ ],
139
+ "info": {
140
+ "video.height": 640,
141
+ "video.width": 640,
142
+ "video.codec": "av1",
143
+ "video.pix_fmt": "yuv420p",
144
+ "video.is_depth_map": false,
145
+ "video.fps": 30,
146
+ "video.channels": 3,
147
+ "has_audio": false
148
+ }
149
+ },
150
+ "observation.images.rgb_right": {
151
+ "dtype": "video",
152
+ "shape": [
153
+ 640,
154
+ 640,
155
+ 3
156
+ ],
157
+ "names": [
158
+ "height",
159
+ "width",
160
+ "channel"
161
+ ],
162
+ "info": {
163
+ "video.height": 640,
164
+ "video.width": 640,
165
+ "video.codec": "av1",
166
+ "video.pix_fmt": "yuv420p",
167
+ "video.is_depth_map": false,
168
+ "video.fps": 30,
169
+ "video.channels": 3,
170
+ "has_audio": false
171
+ }
172
+ },
173
+ "timestamp": {
174
+ "dtype": "float32",
175
+ "shape": [
176
+ 1
177
+ ],
178
+ "names": null
179
+ },
180
+ "frame_index": {
181
+ "dtype": "int64",
182
+ "shape": [
183
+ 1
184
+ ],
185
+ "names": null
186
+ },
187
+ "episode_index": {
188
+ "dtype": "int64",
189
+ "shape": [
190
+ 1
191
+ ],
192
+ "names": null
193
+ },
194
+ "index": {
195
+ "dtype": "int64",
196
+ "shape": [
197
+ 1
198
+ ],
199
+ "names": null
200
+ },
201
+ "task_index": {
202
+ "dtype": "int64",
203
+ "shape": [
204
+ 1
205
+ ],
206
+ "names": null
207
+ }
208
+ }
209
+ }
210
+ ```
211
+
212
+
213
+ ## Citation
214
+
215
+ **BibTeX:**
216
+
217
+ ```bibtex
218
+ [More Information Needed]
219
+ ```
data/chunk-000/episode_000000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:865ceb83612598964001aa9dd31a2a21d08fc5a261e0c154a2c028cbc8b0bdcd
3
+ size 6359
data/chunk-000/episode_000001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:078aa7d8058c4ab7fdf1639bb9652b77a9e74b6db0bfa28a4fab4030202ef421
3
+ size 4442
data/chunk-000/episode_000002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3609a303c8846d715e58ec990ebb899bfa7e848ed9bb6cf95f552205a8b107c5
3
+ size 4371
data/chunk-000/episode_000003.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe0efde83df6970a3a5328995caea9d06dcc82bc9311c07cfe226ac110067faf
3
+ size 3892
data/chunk-000/episode_000004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e4654b436c674caf7a46723662020715c763537a84bb633c9d0521d747c9b5f
3
+ size 6745
data/chunk-000/episode_000005.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:74a1e62942657fc7a1a03b3911e9b601694f9f54b2fe05c8728b92ee8226d038
3
+ size 30045
data/chunk-000/episode_000006.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1dc4e6940504b0ab15433c1e60951cf96dbfe5ffd38fb8c11ca80a3e9b4285c
3
+ size 27142
data/chunk-000/episode_000007.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:383c3a9b3acf199118dba655e821dd81d4e142d2fafec958edde7ff320f6f5a9
3
+ size 5002
data/chunk-000/episode_000008.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3070837224785224e2f448681a4d915017fe2889ec29963a435903122475db56
3
+ size 31433
data/chunk-000/episode_000009.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9cdd4cb4472a30c3ab0f25ab04a240c63da7bbf3dd030097ac13803268a27fd1
3
+ size 30293
data/chunk-000/episode_000010.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91842990e67c94ff96356cc1ce2b0c9c6af1b678630ee48fc7270d77c0d620a3
3
+ size 31105
data/chunk-000/episode_000011.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69117774eda8e8b3bd980ab00b25b6c0250c66579d41bd2a67d090fc8af6f7c1
3
+ size 65377
data/chunk-000/episode_000012.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9530b1569a7920c77c5afd495006e0a7e4259491b67693939f187a6e9739048d
3
+ size 33836
data/chunk-000/episode_000013.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5a8dd38247bec383c3f16995bbb3ff22d0666e9a4ec0738684c51a32cbe1db7
3
+ size 71354
data/chunk-000/episode_000014.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05319ec57d00f10937f352bf0442bb0b4a564d924e6f6be0b57f351bd918b669
3
+ size 30783
data/chunk-000/episode_000015.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d192cb39318cd60b0c48288b0b8277eafbb428c424eadb7a9893128bc39f9f25
3
+ size 5806
data/chunk-000/episode_000016.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d73b8f1d61fb57b2ab4e30781a904403548db4d3cebb422a92b38f187388c4d
3
+ size 33754
data/chunk-000/episode_000017.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06811f7bd23efc2c0ef2d448cd17b4ab9539b7a370e349dafdad3bea93ecdc1e
3
+ size 44352
data/chunk-000/episode_000018.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9027936c1c052d4d1ffcfec7c9b65c692b59764e5005af52fbac9391e96e2a22
3
+ size 29908
meta/.ipynb_checkpoints/blacklist-checkpoint.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ 0,
3
+ 1,
4
+ 2,
5
+ 3,
6
+ 4,
7
+ 7,
8
+ 8,
9
+ 15
10
+ ]
meta/.ipynb_checkpoints/episode_mapping-checkpoint.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "0": "/data/20250915_061859/episodes/episodes_0.mcap",
3
+ "1": "/data/20250915_061859/episodes/episodes_1.mcap",
4
+ "2": "/data/20250915_061859/episodes/episodes_2.mcap",
5
+ "3": "/data/20250915_061859/episodes/episodes_3.mcap",
6
+ "4": "/data/20250915_061859/episodes/episodes_4.mcap",
7
+ "5": "/data/20250915_061859/episodes/episodes_5.mcap",
8
+ "6": "/data/20250915_061859/episodes/episodes_6.mcap",
9
+ "7": "/data/20250915_061859/episodes/episodes_7.mcap",
10
+ "8": "/data/20250915_061859/episodes/episodes_8.mcap",
11
+ "9": "/data/20250915_061859/episodes/episodes_9.mcap",
12
+ "10": "/data/20250915_061859/episodes/episodes_10.mcap",
13
+ "11": "/data/20250915_061859/episodes/episodes_11.mcap",
14
+ "12": "/data/20250915_061859/episodes/episodes_12.mcap",
15
+ "13": "/data/20250915_061859/episodes/episodes_13.mcap",
16
+ "14": "/data/20250915_061859/episodes/episodes_14.mcap",
17
+ "15": "/data/20250915_061859/episodes/episodes_15.mcap",
18
+ "16": "/data/20250915_061859/episodes/episodes_16.mcap",
19
+ "17": "/data/20250915_061859/episodes/episodes_17.mcap",
20
+ "18": "/data/20250915_061859/episodes/episodes_18.mcap"
21
+ }
meta/.ipynb_checkpoints/episodes-checkpoint.jsonl ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"episode_index": 0, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 37}
2
+ {"episode_index": 1, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 12}
3
+ {"episode_index": 2, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 10}
4
+ {"episode_index": 3, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 2}
5
+ {"episode_index": 4, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 40}
6
+ {"episode_index": 5, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 141}
7
+ {"episode_index": 6, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 122}
8
+ {"episode_index": 7, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 8}
9
+ {"episode_index": 8, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 142}
10
+ {"episode_index": 9, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 142}
11
+ {"episode_index": 10, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 142}
12
+ {"episode_index": 11, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 316}
13
+ {"episode_index": 12, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 158}
14
+ {"episode_index": 13, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 354}
15
+ {"episode_index": 14, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 141}
16
+ {"episode_index": 15, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 13}
17
+ {"episode_index": 16, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 156}
18
+ {"episode_index": 17, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 216}
19
+ {"episode_index": 18, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 133}
meta/.ipynb_checkpoints/episodes_stats-checkpoint.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
meta/.ipynb_checkpoints/info-checkpoint.json ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "codebase_version": "v2.1",
3
+ "robot_type": null,
4
+ "total_episodes": 19,
5
+ "total_frames": 2285,
6
+ "total_tasks": 1,
7
+ "total_videos": 57,
8
+ "total_chunks": 1,
9
+ "chunks_size": 1000,
10
+ "fps": 30,
11
+ "splits": {
12
+ "train": "0:19"
13
+ },
14
+ "data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.parquet",
15
+ "video_path": "videos/chunk-{episode_chunk:03d}/{video_key}/episode_{episode_index:06d}.mp4",
16
+ "features": {
17
+ "observation.state": {
18
+ "dtype": "float32",
19
+ "shape": [
20
+ 32
21
+ ],
22
+ "names": [
23
+ "tcp_left_pos_x",
24
+ "tcp_left_pos_y",
25
+ "tcp_left_pos_z",
26
+ "tcp_left_quat_x",
27
+ "tcp_left_quat_y",
28
+ "tcp_left_quat_z",
29
+ "tcp_left_quat_w",
30
+ "tcp_right_pos_x",
31
+ "tcp_right_pos_y",
32
+ "tcp_right_pos_z",
33
+ "tcp_right_quat_x",
34
+ "tcp_right_quat_y",
35
+ "tcp_right_quat_z",
36
+ "tcp_right_quat_w",
37
+ "gripper_left_0",
38
+ "gripper_left_1",
39
+ "gripper_right_0",
40
+ "gripper_right_1",
41
+ "last_command_left_0",
42
+ "last_command_left_1",
43
+ "last_command_left_2",
44
+ "last_command_left_3",
45
+ "last_command_left_4",
46
+ "last_command_left_5",
47
+ "last_command_left_6",
48
+ "last_command_right_0",
49
+ "last_command_right_1",
50
+ "last_command_right_2",
51
+ "last_command_right_3",
52
+ "last_command_right_4",
53
+ "last_command_right_5",
54
+ "last_command_right_6"
55
+ ]
56
+ },
57
+ "action": {
58
+ "dtype": "float32",
59
+ "shape": [
60
+ 14
61
+ ],
62
+ "names": [
63
+ "delta_tcp_left_x",
64
+ "delta_tcp_left_y",
65
+ "delta_tcp_left_z",
66
+ "delta_tcp_left_rot_x",
67
+ "delta_tcp_left_rot_y",
68
+ "delta_tcp_left_rot_z",
69
+ "delta_tcp_right_x",
70
+ "delta_tcp_right_y",
71
+ "delta_tcp_right_z",
72
+ "delta_tcp_right_rot_x",
73
+ "delta_tcp_right_rot_y",
74
+ "delta_tcp_right_rot_z",
75
+ "gripper_left",
76
+ "gripper_right"
77
+ ]
78
+ },
79
+ "observation.images.rgb_static": {
80
+ "dtype": "video",
81
+ "shape": [
82
+ 640,
83
+ 640,
84
+ 3
85
+ ],
86
+ "names": [
87
+ "height",
88
+ "width",
89
+ "channel"
90
+ ],
91
+ "info": {
92
+ "video.height": 640,
93
+ "video.width": 640,
94
+ "video.codec": "av1",
95
+ "video.pix_fmt": "yuv420p",
96
+ "video.is_depth_map": false,
97
+ "video.fps": 30,
98
+ "video.channels": 3,
99
+ "has_audio": false
100
+ }
101
+ },
102
+ "observation.images.rgb_left": {
103
+ "dtype": "video",
104
+ "shape": [
105
+ 640,
106
+ 640,
107
+ 3
108
+ ],
109
+ "names": [
110
+ "height",
111
+ "width",
112
+ "channel"
113
+ ],
114
+ "info": {
115
+ "video.height": 640,
116
+ "video.width": 640,
117
+ "video.codec": "av1",
118
+ "video.pix_fmt": "yuv420p",
119
+ "video.is_depth_map": false,
120
+ "video.fps": 30,
121
+ "video.channels": 3,
122
+ "has_audio": false
123
+ }
124
+ },
125
+ "observation.images.rgb_right": {
126
+ "dtype": "video",
127
+ "shape": [
128
+ 640,
129
+ 640,
130
+ 3
131
+ ],
132
+ "names": [
133
+ "height",
134
+ "width",
135
+ "channel"
136
+ ],
137
+ "info": {
138
+ "video.height": 640,
139
+ "video.width": 640,
140
+ "video.codec": "av1",
141
+ "video.pix_fmt": "yuv420p",
142
+ "video.is_depth_map": false,
143
+ "video.fps": 30,
144
+ "video.channels": 3,
145
+ "has_audio": false
146
+ }
147
+ },
148
+ "timestamp": {
149
+ "dtype": "float32",
150
+ "shape": [
151
+ 1
152
+ ],
153
+ "names": null
154
+ },
155
+ "frame_index": {
156
+ "dtype": "int64",
157
+ "shape": [
158
+ 1
159
+ ],
160
+ "names": null
161
+ },
162
+ "episode_index": {
163
+ "dtype": "int64",
164
+ "shape": [
165
+ 1
166
+ ],
167
+ "names": null
168
+ },
169
+ "index": {
170
+ "dtype": "int64",
171
+ "shape": [
172
+ 1
173
+ ],
174
+ "names": null
175
+ },
176
+ "task_index": {
177
+ "dtype": "int64",
178
+ "shape": [
179
+ 1
180
+ ],
181
+ "names": null
182
+ }
183
+ }
184
+ }
meta/blacklist.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ 0,
3
+ 1,
4
+ 2,
5
+ 3,
6
+ 4,
7
+ 7,
8
+ 8,
9
+ 15
10
+ ]
meta/episode_mapping.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "0": "/data/20250915_061859/episodes/episodes_0.mcap",
3
+ "1": "/data/20250915_061859/episodes/episodes_1.mcap",
4
+ "2": "/data/20250915_061859/episodes/episodes_2.mcap",
5
+ "3": "/data/20250915_061859/episodes/episodes_3.mcap",
6
+ "4": "/data/20250915_061859/episodes/episodes_4.mcap",
7
+ "5": "/data/20250915_061859/episodes/episodes_5.mcap",
8
+ "6": "/data/20250915_061859/episodes/episodes_6.mcap",
9
+ "7": "/data/20250915_061859/episodes/episodes_7.mcap",
10
+ "8": "/data/20250915_061859/episodes/episodes_8.mcap",
11
+ "9": "/data/20250915_061859/episodes/episodes_9.mcap",
12
+ "10": "/data/20250915_061859/episodes/episodes_10.mcap",
13
+ "11": "/data/20250915_061859/episodes/episodes_11.mcap",
14
+ "12": "/data/20250915_061859/episodes/episodes_12.mcap",
15
+ "13": "/data/20250915_061859/episodes/episodes_13.mcap",
16
+ "14": "/data/20250915_061859/episodes/episodes_14.mcap",
17
+ "15": "/data/20250915_061859/episodes/episodes_15.mcap",
18
+ "16": "/data/20250915_061859/episodes/episodes_16.mcap",
19
+ "17": "/data/20250915_061859/episodes/episodes_17.mcap",
20
+ "18": "/data/20250915_061859/episodes/episodes_18.mcap"
21
+ }
meta/episodes.jsonl ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"episode_index": 0, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 37}
2
+ {"episode_index": 1, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 12}
3
+ {"episode_index": 2, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 10}
4
+ {"episode_index": 3, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 2}
5
+ {"episode_index": 4, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 40}
6
+ {"episode_index": 5, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 141}
7
+ {"episode_index": 6, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 122}
8
+ {"episode_index": 7, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 8}
9
+ {"episode_index": 8, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 142}
10
+ {"episode_index": 9, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 142}
11
+ {"episode_index": 10, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 142}
12
+ {"episode_index": 11, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 316}
13
+ {"episode_index": 12, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 158}
14
+ {"episode_index": 13, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 354}
15
+ {"episode_index": 14, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 141}
16
+ {"episode_index": 15, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 13}
17
+ {"episode_index": 16, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 156}
18
+ {"episode_index": 17, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 216}
19
+ {"episode_index": 18, "tasks": ["pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."], "length": 133}
meta/episodes_stats.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
meta/info.json ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "codebase_version": "v2.1",
3
+ "robot_type": null,
4
+ "total_episodes": 19,
5
+ "total_frames": 2285,
6
+ "total_tasks": 1,
7
+ "total_videos": 57,
8
+ "total_chunks": 1,
9
+ "chunks_size": 1000,
10
+ "fps": 30,
11
+ "splits": {
12
+ "train": "0:19"
13
+ },
14
+ "data_path": "data/chunk-{episode_chunk:03d}/episode_{episode_index:06d}.parquet",
15
+ "video_path": "videos/chunk-{episode_chunk:03d}/{video_key}/episode_{episode_index:06d}.mp4",
16
+ "features": {
17
+ "observation.state": {
18
+ "dtype": "float32",
19
+ "shape": [
20
+ 32
21
+ ],
22
+ "names": [
23
+ "tcp_left_pos_x",
24
+ "tcp_left_pos_y",
25
+ "tcp_left_pos_z",
26
+ "tcp_left_quat_x",
27
+ "tcp_left_quat_y",
28
+ "tcp_left_quat_z",
29
+ "tcp_left_quat_w",
30
+ "tcp_right_pos_x",
31
+ "tcp_right_pos_y",
32
+ "tcp_right_pos_z",
33
+ "tcp_right_quat_x",
34
+ "tcp_right_quat_y",
35
+ "tcp_right_quat_z",
36
+ "tcp_right_quat_w",
37
+ "gripper_left_0",
38
+ "gripper_left_1",
39
+ "gripper_right_0",
40
+ "gripper_right_1",
41
+ "last_command_left_0",
42
+ "last_command_left_1",
43
+ "last_command_left_2",
44
+ "last_command_left_3",
45
+ "last_command_left_4",
46
+ "last_command_left_5",
47
+ "last_command_left_6",
48
+ "last_command_right_0",
49
+ "last_command_right_1",
50
+ "last_command_right_2",
51
+ "last_command_right_3",
52
+ "last_command_right_4",
53
+ "last_command_right_5",
54
+ "last_command_right_6"
55
+ ]
56
+ },
57
+ "action": {
58
+ "dtype": "float32",
59
+ "shape": [
60
+ 14
61
+ ],
62
+ "names": [
63
+ "delta_tcp_left_x",
64
+ "delta_tcp_left_y",
65
+ "delta_tcp_left_z",
66
+ "delta_tcp_left_rot_x",
67
+ "delta_tcp_left_rot_y",
68
+ "delta_tcp_left_rot_z",
69
+ "delta_tcp_right_x",
70
+ "delta_tcp_right_y",
71
+ "delta_tcp_right_z",
72
+ "delta_tcp_right_rot_x",
73
+ "delta_tcp_right_rot_y",
74
+ "delta_tcp_right_rot_z",
75
+ "gripper_left",
76
+ "gripper_right"
77
+ ]
78
+ },
79
+ "observation.images.rgb_static": {
80
+ "dtype": "video",
81
+ "shape": [
82
+ 640,
83
+ 640,
84
+ 3
85
+ ],
86
+ "names": [
87
+ "height",
88
+ "width",
89
+ "channel"
90
+ ],
91
+ "info": {
92
+ "video.height": 640,
93
+ "video.width": 640,
94
+ "video.codec": "av1",
95
+ "video.pix_fmt": "yuv420p",
96
+ "video.is_depth_map": false,
97
+ "video.fps": 30,
98
+ "video.channels": 3,
99
+ "has_audio": false
100
+ }
101
+ },
102
+ "observation.images.rgb_left": {
103
+ "dtype": "video",
104
+ "shape": [
105
+ 640,
106
+ 640,
107
+ 3
108
+ ],
109
+ "names": [
110
+ "height",
111
+ "width",
112
+ "channel"
113
+ ],
114
+ "info": {
115
+ "video.height": 640,
116
+ "video.width": 640,
117
+ "video.codec": "av1",
118
+ "video.pix_fmt": "yuv420p",
119
+ "video.is_depth_map": false,
120
+ "video.fps": 30,
121
+ "video.channels": 3,
122
+ "has_audio": false
123
+ }
124
+ },
125
+ "observation.images.rgb_right": {
126
+ "dtype": "video",
127
+ "shape": [
128
+ 640,
129
+ 640,
130
+ 3
131
+ ],
132
+ "names": [
133
+ "height",
134
+ "width",
135
+ "channel"
136
+ ],
137
+ "info": {
138
+ "video.height": 640,
139
+ "video.width": 640,
140
+ "video.codec": "av1",
141
+ "video.pix_fmt": "yuv420p",
142
+ "video.is_depth_map": false,
143
+ "video.fps": 30,
144
+ "video.channels": 3,
145
+ "has_audio": false
146
+ }
147
+ },
148
+ "timestamp": {
149
+ "dtype": "float32",
150
+ "shape": [
151
+ 1
152
+ ],
153
+ "names": null
154
+ },
155
+ "frame_index": {
156
+ "dtype": "int64",
157
+ "shape": [
158
+ 1
159
+ ],
160
+ "names": null
161
+ },
162
+ "episode_index": {
163
+ "dtype": "int64",
164
+ "shape": [
165
+ 1
166
+ ],
167
+ "names": null
168
+ },
169
+ "index": {
170
+ "dtype": "int64",
171
+ "shape": [
172
+ 1
173
+ ],
174
+ "names": null
175
+ },
176
+ "task_index": {
177
+ "dtype": "int64",
178
+ "shape": [
179
+ 1
180
+ ],
181
+ "names": null
182
+ }
183
+ }
184
+ }
meta/pipeline_config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "include_joint_positions": false,
3
+ "include_joint_velocities": false,
4
+ "include_joint_efforts": false,
5
+ "include_tcp_poses": true,
6
+ "include_last_command": true,
7
+ "include_rgb_images": true,
8
+ "include_depth_images": false,
9
+ "depth_scale_factor": 1000.0,
10
+ "action_level": "delta_tcp",
11
+ "left_gripper": "panda",
12
+ "right_gripper": "panda",
13
+ "task_name": "pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle.",
14
+ "max_pause_seconds": 0.2,
15
+ "pause_velocity": 0.03,
16
+ "save_pauses": false,
17
+ "gripper_active_speed": 0.05,
18
+ "boost_factor": 1,
19
+ "grace_period_seconds": 0.2,
20
+ "save_normal": false,
21
+ "recording_fps": 30,
22
+ "target_fps": 10,
23
+ "subsample_offset": 0,
24
+ "min_episode_seconds": 1
25
+ }
meta/tasks.jsonl ADDED
@@ -0,0 +1 @@
 
 
1
+ {"task_index": 0, "task": "pick the block with the right arm and put it in the middle, then use the left arm and put it in the middle."}
nvim-linux-x86_64/bin/nvim ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39410bdbffd527f98d69c2428a633910c3c785d32c7f163803c08da54fdc8539
3
+ size 10659000
nvim-linux-x86_64/lib/nvim/parser/c.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f927198b0fc8a2352bc939a164e0540ef571a356fb3b5324daa47a6fd61f6b78
3
+ size 627536
nvim-linux-x86_64/lib/nvim/parser/lua.so ADDED
Binary file (70.6 kB). View file
 
nvim-linux-x86_64/lib/nvim/parser/markdown.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2dd80e60cc23fa0b5448a35474ab6954d30f9772187a9b1b358f104b708bb0d6
3
+ size 371976
nvim-linux-x86_64/lib/nvim/parser/markdown_inline.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7bc9ef7f1dcc420b18ae82e287a12caed7baf18764c3bf7173203a4820f196af
3
+ size 359264
nvim-linux-x86_64/lib/nvim/parser/query.so ADDED
Binary file (36.7 kB). View file
 
nvim-linux-x86_64/lib/nvim/parser/vim.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:933573709615bc4eeaefa5b7d8d96dfb78edc085e59d029db829c2b66a93bfb9
3
+ size 1075872
nvim-linux-x86_64/lib/nvim/parser/vimdoc.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:714489521836716fe3c7410867163d50f8fd5fadfa8d975f8282c294e4990908
3
+ size 164272
nvim-linux-x86_64/share/applications/nvim.desktop ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [Desktop Entry]
2
+ Name=Neovim
3
+ GenericName=Text Editor
4
+ GenericName[ckb]=دەستکاریکەری دەق
5
+ GenericName[de]=Texteditor
6
+ GenericName[fr]=Éditeur de texte
7
+ GenericName[pl]=Edytor tekstu
8
+ GenericName[ru]=Текстовый редактор
9
+ GenericName[sr]=Едитор текст
10
+ GenericName[tr]=Metin Düzenleyici
11
+ Comment=Edit text files
12
+ Comment[af]=Redigeer tekslêers
13
+ Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
14
+ Comment[ar]=حرّر ملفات نصية
15
+ Comment[az]=Mətn fayllarını redaktə edin
16
+ Comment[be]=Рэдагаваньне тэкставых файлаў
17
+ Comment[bg]=Редактиране на текстови файлове
18
+ Comment[bn]=টেক্স্ট ফাইল এডিট করুন
19
+ Comment[bs]=Izmijeni tekstualne datoteke
20
+ Comment[ca]=Edita fitxers de text
21
+ Comment[ckb]=دەستکاریی فایلی دەق بکە
22
+ Comment[cs]=Úprava textových souborů
23
+ Comment[cy]=Golygu ffeiliau testun
24
+ Comment[da]=Redigér tekstfiler
25
+ Comment[de]=Textdateien bearbeiten
26
+ Comment[el]=Επεξεργασία αρχείων κειμένου
27
+ Comment[en_CA]=Edit text files
28
+ Comment[en_GB]=Edit text files
29
+ Comment[es]=Edita archivos de texto
30
+ Comment[et]=Redigeeri tekstifaile
31
+ Comment[eu]=Editatu testu-fitxategiak
32
+ Comment[fa]=ویرایش پرونده‌های متنی
33
+ Comment[fi]=Muokkaa tekstitiedostoja
34
+ Comment[fr]=Éditer des fichiers texte
35
+ Comment[ga]=Eagar comhad Téacs
36
+ Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
37
+ Comment[he]=ערוך קבצי טקסט
38
+ Comment[hi]=पाठ फ़ाइलें संपादित करें
39
+ Comment[hr]=Uređivanje tekstualne datoteke
40
+ Comment[hu]=Szövegfájlok szerkesztése
41
+ Comment[id]=Edit file teks
42
+ Comment[it]=Modifica file di testo
43
+ Comment[ja]=テキストファイルを編集します
44
+ Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
45
+ Comment[ko]=텍스트 파일을 편집합니다
46
+ Comment[lt]=Redaguoti tekstines bylas
47
+ Comment[lv]=Rediģēt teksta failus
48
+ Comment[mk]=Уреди текстуални фајлови
49
+ Comment[ml]=വാചക രചനകള് തിരുത്തുക
50
+ Comment[mn]=Текст файл боловсруулах
51
+ Comment[mr]=गद्य फाइल संपादित करा
52
+ Comment[ms]=Edit fail teks
53
+ Comment[nb]=Rediger tekstfiler
54
+ Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस्
55
+ Comment[nl]=Tekstbestanden bewerken
56
+ Comment[nn]=Rediger tekstfiler
57
+ Comment[no]=Rediger tekstfiler
58
+ Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
59
+ Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
60
+ Comment[pl]=Edytor plików tekstowych
61
+ Comment[pt]=Editar ficheiros de texto
62
+ Comment[pt_BR]=Edite arquivos de texto
63
+ Comment[ro]=Editare fişiere text
64
+ Comment[ru]=Редактирование текстовых файлов
65
+ Comment[sk]=Úprava textových súborov
66
+ Comment[sl]=Urejanje datotek z besedili
67
+ Comment[sq]=Përpuno files teksti
68
+ Comment[sr]=Уређујте текст фајлове
69
+ Comment[sr@Latn]=Izmeni tekstualne datoteke
70
+ Comment[sv]=Redigera textfiler
71
+ Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
72
+ Comment[th]=แก้ไขแฟ้มข้อความ
73
+ Comment[tk]=Metin faýllary editle
74
+ Comment[tr]=Metin dosyaları düzenleyin
75
+ Comment[uk]=Редактор текстових файлів
76
+ Comment[vi]=Soạn thảo tập tin văn bản
77
+ Comment[wa]=Asspougnî des fitchîs tecses
78
+ Comment[zh_CN]=编辑文本文件
79
+ Comment[zh_TW]=編輯文字檔
80
+ TryExec=nvim
81
+ Exec=nvim %F
82
+ Terminal=true
83
+ Type=Application
84
+ Keywords=Text;editor;
85
+ Keywords[ckb]=دەق;دەستکاریکەر;
86
+ Keywords[fr]=Texte;éditeur;
87
+ Keywords[ru]=текст;текстовый редактор;
88
+ Keywords[sr]=Текст;едитор;
89
+ Keywords[tr]=Metin;düzenleyici;
90
+ Icon=nvim
91
+ Categories=Utility;TextEditor;
92
+ StartupNotify=false
93
+ MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
nvim-linux-x86_64/share/icons/hicolor/128x128/apps/nvim.png ADDED

Git LFS Details

  • SHA256: e6e68a31327f67c24f5fcbea175b13862275363c2e7b0a5999781104c8658c16
  • Pointer size: 129 Bytes
  • Size of remote file: 5.89 kB
nvim-linux-x86_64/share/man/man1/nvim.1 ADDED
@@ -0,0 +1,420 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .Dd December 17, 2017
2
+ .Dt NVIM 1
3
+ .Os
4
+ .Sh NAME
5
+ .Nm nvim
6
+ .Nd edit text
7
+ .Sh SYNOPSIS
8
+ .Nm
9
+ .Op Ar options
10
+ .Op Ar file ...
11
+ .Nm
12
+ .Op Ar options
13
+ .Fl
14
+ .Nm
15
+ .Op Ar options
16
+ .Fl t Ar tag
17
+ .Nm
18
+ .Op Ar options
19
+ .Fl q Op Ar errorfile
20
+ .Sh DESCRIPTION
21
+ .Nm
22
+ is a text editor based on Vim.
23
+ Start
24
+ .Nm
25
+ followed by any number of options and/or files:
26
+ .Pp
27
+ .Dl nvim [options] [file ...]
28
+ .Pp
29
+ Commands in
30
+ .Nm
31
+ begin with colon
32
+ .Pq Sq \&: .
33
+ Type ":help subject" to get help on a specific subject.
34
+ Use <Tab> and CTRL-D to complete subjects (":help cmdline\-completion").
35
+ .Pp
36
+ The "quickref" help section is a condensed reference of editor features:
37
+ .Dl :help quickref
38
+ .Pp
39
+ If you are new to Vim/Nvim, start with the 30-minute tutorial:
40
+ .Dl :Tutor
41
+ .Pp
42
+ After installing/updating Nvim, it's a good idea to run the self-check:
43
+ .Dl :checkhealth
44
+ .Pp
45
+ .Bl -tag -width Fl
46
+ .It Ar file ...
47
+ File(s) to edit.
48
+ Opens one buffer per file.
49
+ To switch between buffers, use the
50
+ .Ic :next
51
+ and
52
+ .Ic :previous
53
+ commands.
54
+ .It Fl
55
+ Reads text from standard input until
56
+ .Dv EOF ,
57
+ then opens a buffer with that text.
58
+ User input is read from standard error, which should be a terminal.
59
+ .El
60
+ .Sh OPTIONS
61
+ .Bl -tag -width Fl
62
+ .It Fl t Ar tag
63
+ Finds
64
+ .Ar tag
65
+ in the tags file, the associated file becomes the current
66
+ file and the associated command is executed.
67
+ Cursor is positioned at the tag location in the file.
68
+ .Ic ":help tag-commands"
69
+ .It Fl q Op Ar errorfile
70
+ QuickFix mode.
71
+ Display the first error in
72
+ .Ar errorfile .
73
+ If
74
+ .Ar errorfile
75
+ is omitted, the value of the 'errorfile' option is used (defaults to
76
+ .Cm errors.err ) .
77
+ Further errors can be jumped to with the
78
+ .Ic :cnext
79
+ command.
80
+ .Ic ":help quickfix"
81
+ .It Fl -
82
+ End of options.
83
+ Remaining arguments are treated as literal file names, including filenames starting with hyphen
84
+ .Pq Sq - .
85
+ .It Fl e
86
+ Ex mode, reading stdin as Ex commands.
87
+ .Ic ":help Ex-mode"
88
+ .It Fl E
89
+ Ex mode, reading stdin as text.
90
+ .Ic :help Ex-mode
91
+ .It Fl es
92
+ Silent (non-interactive) Ex mode, reading stdin as Ex commands.
93
+ Useful for scripting because it does NOT start a UI, unlike
94
+ .Fl e .
95
+ .Ic :help silent-mode
96
+ .It Fl \&Es
97
+ Silent (non-interactive) Ex mode, reading stdin as text.
98
+ Useful for scripting because it does NOT start a UI, unlike
99
+ .Fl E .
100
+ .Ic :help silent-mode
101
+ .It Fl d
102
+ Diff mode.
103
+ Show the difference between two to eight files, similar to
104
+ .Xr sdiff 1 .
105
+ .Ic ":help diff"
106
+ .It Fl R
107
+ Read-only mode.
108
+ Sets the 'readonly' option.
109
+ Implies
110
+ .Fl n .
111
+ Buffers can still be edited, but cannot be written to disk if already
112
+ associated with a file.
113
+ To overwrite a file, add an exclamation mark to the relevant Ex command, such as
114
+ .Ic :w! .
115
+ .Ic ":help 'readonly'"
116
+ .It Fl m
117
+ Resets the 'write' option, to disable file modifications.
118
+ Writing to a file is disabled, but buffers can still be modified.
119
+ .It Fl M
120
+ Resets the 'write' and 'modifiable' options, to disable file and buffer
121
+ modifications.
122
+ .It Fl b
123
+ Binary mode.
124
+ .Ic ":help edit-binary"
125
+ .It Fl A
126
+ Arabic mode.
127
+ Sets the 'arabic' option.
128
+ .It Fl H
129
+ Hebrew mode.
130
+ Sets the 'hkmap' and 'rightleft' options.
131
+ .It Fl V Ns Oo Ar N Oc Ns Op Ar file
132
+ Verbose mode.
133
+ Prints debug messages.
134
+ .Ar N
135
+ is the 'verbose' level, defaults to
136
+ .Cm 10 .
137
+ If
138
+ .Ar file
139
+ is specified, append messages to
140
+ .Ar file
141
+ instead of printing them.
142
+ .Ic ":help 'verbose'"
143
+ .It Fl D
144
+ Vimscript debug mode.
145
+ Started when executing the first command from a script.
146
+ :help debug-mode
147
+ .It Fl n
148
+ Disable the use of swap files.
149
+ Sets the 'updatecount' option to
150
+ .Cm 0 .
151
+ Can be useful for editing files on a slow medium.
152
+ .It Fl r Op Ar file
153
+ Recovery mode.
154
+ If
155
+ .Ar file
156
+ is omitted
157
+ then list swap files with recovery information.
158
+ Otherwise the swap file
159
+ .Ar file
160
+ is used to recover a crashed session.
161
+ The swap file has the same name as the file it's associated with, but with
162
+ .Sq .swp
163
+ appended.
164
+ .Ic ":help recovery"
165
+ .It Fl L Op Ar file
166
+ Alias for
167
+ .Fl r .
168
+ .It Fl u Ar vimrc
169
+ Use
170
+ .Ar vimrc
171
+ instead of the default
172
+ .Pa ~/.config/nvim/init.vim .
173
+ If
174
+ .Ar vimrc
175
+ is
176
+ .Cm NORC ,
177
+ do not load any initialization files (except plugins).
178
+ If
179
+ .Ar vimrc
180
+ is
181
+ .Cm NONE ,
182
+ loading plugins is also skipped.
183
+ .Ic ":help initialization"
184
+ .It Fl i Ar shada
185
+ Use
186
+ .Ar shada
187
+ instead of the default
188
+ .Pa ~/.local/state/nvim/shada/main.shada .
189
+ If
190
+ .Ar shada
191
+ is
192
+ .Cm NONE ,
193
+ do not read or write a ShaDa file.
194
+ .Ic ":help shada"
195
+ .It Fl -noplugin
196
+ Skip loading plugins (by setting the 'noloadplugins' option).
197
+ Implied by
198
+ .Cm -u NONE .
199
+ .It Fl -clean
200
+ Start Nvim with "factory defaults" (no user config and plugins, no shada).
201
+ .Ic ":help --clean"
202
+ .It Fl o Ns Op Ar N
203
+ Open
204
+ .Ar N
205
+ windows stacked horizontally.
206
+ If
207
+ .Ar N
208
+ is omitted, open one window for each file.
209
+ If
210
+ .Ar N
211
+ is less than the number of file arguments, allocate windows for the first
212
+ .Ar N
213
+ files and hide the rest.
214
+ .It Fl O Ns Op Ar N
215
+ Like
216
+ .Fl o ,
217
+ but tile windows vertically.
218
+ .It Fl p Ns Op Ar N
219
+ Like
220
+ .Fl o ,
221
+ but for tab pages.
222
+ .It Cm + Ns Op Ar linenum
223
+ For the first file, position the cursor on line
224
+ .Ar linenum .
225
+ If
226
+ .Ar linenum
227
+ is omitted, position the cursor on the last line of the file.
228
+ .Cm +5
229
+ and
230
+ .Cm -c 5
231
+ on the command-line are equivalent to
232
+ .Ic :5
233
+ inside
234
+ .Nm .
235
+ .It Cm +/ Ns Op Ar pattern
236
+ For the first file, position the cursor on the first occurrence of
237
+ .Ar pattern .
238
+ If
239
+ .Ar pattern
240
+ is omitted, the most recent search pattern is used (if any).
241
+ .Cm +/foo
242
+ and
243
+ .Cm -c /foo
244
+ on the command-line are equivalent to
245
+ .Ic /foo
246
+ and
247
+ .Ic :/foo
248
+ inside
249
+ .Nm .
250
+ .Ic ":help search-pattern"
251
+ .It \fB\+\fR\fI\,command\/\fR , Fl c Ar command
252
+ Execute
253
+ .Ar command
254
+ after reading the first file.
255
+ Up to 10 instances allowed.
256
+ .Qq Cm +foo
257
+ and
258
+ .Cm -c \(dqfoo\(dq
259
+ are equivalent.
260
+ .It Fl -cmd Ar command
261
+ Like
262
+ .Fl c ,
263
+ but execute
264
+ .Ar command
265
+ before processing any vimrc.
266
+ Up to 10 instances of these can be used independently from instances of
267
+ .Fl c .
268
+ .It Fl l Ar script Op Ar args
269
+ Execute Lua
270
+ .Ar script
271
+ with optional
272
+ .Op Ar args
273
+ after processing any preceding Nvim startup arguments.
274
+ All
275
+ .Op Ar args
276
+ are treated as script arguments and are passed literally to Lua, that is,
277
+ .Fl l
278
+ stops processing of Nvim arguments.
279
+ .Ic ":help -l"
280
+ .It Fl S Op Ar session
281
+ Execute
282
+ .Ar session
283
+ after the first file argument has been read. If
284
+ .Ar session
285
+ filename ends with
286
+ .Pa .lua
287
+ it is executed as Lua instead of Vimscript.
288
+ Equivalent to
289
+ .Cm -c \(dqsource session\(dq .
290
+ .Ar session
291
+ cannot start with a hyphen
292
+ .Pq Sq - .
293
+ If
294
+ .Ar session
295
+ is omitted then
296
+ .Pa Session.vim
297
+ is used, if found.
298
+ .Ic ":help session-file"
299
+ .It Fl s Ar scriptin
300
+ Read normal mode commands from
301
+ .Ar scriptin .
302
+ The same can be done with the command
303
+ .Ic ":source! scriptin" .
304
+ If the end of the file is reached before
305
+ .Nm
306
+ exits, further characters are read from the keyboard.
307
+ .It Fl w Ar scriptout
308
+ Append all typed characters to
309
+ .Ar scriptout .
310
+ Can be used for creating a script to be used with
311
+ .Fl s
312
+ or
313
+ .Ic :source! .
314
+ .It Fl W Ar scriptout
315
+ Like
316
+ .Fl w ,
317
+ but truncate
318
+ .Ar scriptout .
319
+ .It Fl -startuptime Ar file
320
+ During startup, append timing messages to
321
+ .Ar file .
322
+ Can be used to diagnose slow startup times.
323
+ .It Fl -api-info
324
+ Dump API metadata serialized to msgpack and exit.
325
+ .It Fl -embed
326
+ Use standard input and standard output as a msgpack-rpc channel.
327
+ :help --embed
328
+ .It Fl -headless
329
+ Do not start a UI.
330
+ When supplied with --embed this implies that the embedding application does not intend to (immediately) start a UI.
331
+ Also useful for "scraping" messages in a pipe.
332
+ :help --headless
333
+ .It Fl -listen Ar address
334
+ Start RPC server on this pipe or TCP socket.
335
+ .It Fl h , -help
336
+ Print usage information and exit.
337
+ .It Fl v , -version
338
+ Print version information and exit.
339
+ .El
340
+ .Sh ENVIRONMENT
341
+ .Bl -tag -width Fl
342
+ .It Ev NVIM_APPNAME
343
+ The name of sub-directories used within each XDG user directory.
344
+ Defaults to
345
+ .Cm nvim .
346
+ :help $NVIM_APPNAME
347
+ .It Ev NVIM_LOG_FILE
348
+ Low-level log file, usually found at ~/.local/state/nvim/log.
349
+ :help $NVIM_LOG_FILE
350
+ .It Ev VIM
351
+ Used to locate user files, such as init.vim.
352
+ System-dependent.
353
+ :help $VIM
354
+ .It Ev VIMRUNTIME
355
+ Used to locate runtime files (documentation, syntax highlighting, etc.).
356
+ .It Ev XDG_CONFIG_HOME
357
+ Path to the user-local configuration directory, see
358
+ .Sx FILES .
359
+ Defaults to
360
+ .Pa ~/.config .
361
+ :help xdg
362
+ .It Ev XDG_STATE_HOME
363
+ Like
364
+ .Ev XDG_CONFIG_HOME ,
365
+ but used to store data not generally edited by the user,
366
+ namely swap, backup, and ShaDa files.
367
+ Defaults to
368
+ .Pa ~/.local/state .
369
+ :help xdg
370
+ .It Ev XDG_DATA_HOME
371
+ Like
372
+ .Ev XDG_CONFIG_HOME ,
373
+ but used to store data not generally edited by the user,
374
+ things like runtime files.
375
+ Defaults to
376
+ .Pa ~/.local/share .
377
+ :help xdg
378
+ .It Ev VIMINIT
379
+ Ex commands to be executed at startup.
380
+ .Ic ":help VIMINIT"
381
+ .It Ev SHELL
382
+ Used to initialize the 'shell' option, which decides the default shell used by
383
+ features like
384
+ .Ic :terminal ,
385
+ .Ic :! , and
386
+ .Ic system() .
387
+ .El
388
+ .Sh FILES
389
+ .Bl -tag -width "~/.config/nvim/init.vim"
390
+ .It Pa ~/.config/nvim/init.lua
391
+ User-local
392
+ .Nm
393
+ Lua configuration file.
394
+ .It Pa ~/.config/nvim
395
+ User-local
396
+ .Nm
397
+ configuration directory.
398
+ See also
399
+ .Ev XDG_CONFIG_HOME .
400
+ .It Pa $VIM/sysinit.vim
401
+ System-global
402
+ .Nm
403
+ configuration file.
404
+ .It Pa $VIM
405
+ System-global
406
+ .Nm
407
+ runtime directory.
408
+ .El
409
+ .Sh AUTHORS
410
+ Nvim was started by
411
+ .An Thiago de Arruda .
412
+ Most of Vim was written by
413
+ .An -nosplit
414
+ .An Bram Moolenaar .
415
+ Vim is based on Stevie, worked on by
416
+ .An Tim Thompson ,
417
+ .An Tony Andrews ,
418
+ and
419
+ .An G.R. (Fred) Walter .
420
+ .Ic ":help credits"
nvim-linux-x86_64/share/nvim/runtime/autoload/README.txt ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ The autoload directory is for standard Vim autoload scripts.
2
+
3
+ These are functions used by plugins and for general use. They will be loaded
4
+ automatically when the function is invoked. See ":help autoload".
5
+
6
+ gzip.vim for editing compressed files
7
+ netrw*.vim browsing (remote) directories and editing remote files
8
+ tar.vim browsing tar files
9
+ zip.vim browsing zip files
10
+ paste.vim common code for mswin.vim and menu.vim
11
+ spellfile.vim downloading of a missing spell file
12
+
13
+ Omni completion files:
14
+ ccomplete.vim C
15
+ csscomplete.vim HTML / CSS
16
+ htmlcomplete.vim HTML
17
+ javascriptcomplete.vim Javascript
18
+ phpcomplete.vim PHP
19
+ pythoncomplete.vim Python
20
+ rubycomplete.vim Ruby
21
+ syntaxcomplete.vim from syntax highlighting
22
+ xmlcomplete.vim XML (uses files in the xml directory)
nvim-linux-x86_64/share/nvim/runtime/autoload/RstFold.vim ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ " Author: Antony Lee <anntzer.lee@gmail.com>
2
+ " Description: Helper functions for reStructuredText syntax folding
3
+ " Last Modified: 2018-12-29
4
+
5
+ function s:CacheRstFold()
6
+ if !g:rst_fold_enabled
7
+ return
8
+ endif
9
+
10
+ let closure = {'header_types': {}, 'max_level': 0, 'levels': {}}
11
+ function closure.Process(match) dict
12
+ let curline = getcurpos()[1]
13
+ if has_key(self.levels, curline - 1)
14
+ " For over+under-lined headers, the regex will match both at the
15
+ " overline and at the title itself; in that case, skip the second match.
16
+ return
17
+ endif
18
+ let lines = split(a:match, '\n')
19
+ let key = repeat(lines[-1][0], len(lines))
20
+ if !has_key(self.header_types, key)
21
+ let self.max_level += 1
22
+ let self.header_types[key] = self.max_level
23
+ endif
24
+ let self.levels[curline] = self.header_types[key]
25
+ endfunction
26
+ let save_cursor = getcurpos()
27
+ let save_mark = getpos("'[")
28
+ silent keeppatterns %s/\v^%(%(([=`:.'"~^_*+#-])\1+\n)?.{1,2}\n([=`:.'"~^_*+#-])\2+)|%(%(([=`:.''"~^_*+#-])\3{2,}\n)?.{3,}\n([=`:.''"~^_*+#-])\4{2,})$/\=closure.Process(submatch(0))/gn
29
+ call setpos('.', save_cursor)
30
+ call setpos("'[", save_mark)
31
+ let b:RstFoldCache = closure.levels
32
+ endfunction
33
+
34
+ function RstFold#GetRstFold()
35
+ if !g:rst_fold_enabled
36
+ return
37
+ endif
38
+
39
+ if !has_key(b:, 'RstFoldCache')
40
+ call s:CacheRstFold()
41
+ endif
42
+ if has_key(b:RstFoldCache, v:lnum)
43
+ return '>' . b:RstFoldCache[v:lnum]
44
+ else
45
+ return '='
46
+ endif
47
+ endfunction
48
+
49
+ function RstFold#GetRstFoldText()
50
+ if !g:rst_fold_enabled
51
+ return
52
+ endif
53
+
54
+ if !has_key(b:, 'RstFoldCache')
55
+ call s:CacheRstFold()
56
+ endif
57
+ let indent = repeat(' ', b:RstFoldCache[v:foldstart] - 1)
58
+ let thisline = getline(v:foldstart)
59
+ " For over+under-lined headers, skip the overline.
60
+ let text = thisline =~ '^\([=`:.''"~^_*+#-]\)\1\+$' ? getline(v:foldstart + 1) : thisline
61
+ return indent . text
62
+ endfunction
nvim-linux-x86_64/share/nvim/runtime/autoload/ada.vim ADDED
@@ -0,0 +1,637 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "------------------------------------------------------------------------------
2
+ " Description: Perform Ada specific completion & tagging.
3
+ " Language: Ada (2005)
4
+ " $Id: ada.vim 887 2008-07-08 14:29:01Z krischik $
5
+ " Maintainer: Mathias Brousset <mathiasb17@gmail.com>
6
+ " Martin Krischik <krischik@users.sourceforge.net>
7
+ " Taylor Venable <taylor@metasyntax.net>
8
+ " Neil Bird <neil@fnxweb.com>
9
+ " Ned Okie <nokie@radford.edu>
10
+ " $Author: krischik $
11
+ " $Date: 2017-01-31 20:20:05 +0200 (Mon, 01 Jan 2017) $
12
+ " Version: 4.6
13
+ " $Revision: 887 $
14
+ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/ada.vim $
15
+ " History: 24.05.2006 MK Unified Headers
16
+ " 26.05.2006 MK ' should not be in iskeyword.
17
+ " 16.07.2006 MK Ada-Mode as vim-ball
18
+ " 02.10.2006 MK Better folding.
19
+ " 15.10.2006 MK Bram's suggestion for runtime integration
20
+ " 05.11.2006 MK Bram suggested not to use include protection for
21
+ " autoload
22
+ " 05.11.2006 MK Bram suggested to save on spaces
23
+ " 08.07.2007 TV fix mapleader problems.
24
+ " 09.05.2007 MK Session just won't work no matter how much
25
+ " tweaking is done
26
+ " 19.09.2007 NO still some mapleader problems
27
+ " 31.01.2017 MB fix more mapleader problems
28
+ " Help Page: ft-ada-functions
29
+ "------------------------------------------------------------------------------
30
+
31
+ if version < 700
32
+ finish
33
+ endif
34
+ let s:keepcpo= &cpo
35
+ set cpo&vim
36
+
37
+ " Section: Constants {{{1
38
+ "
39
+ let g:ada#DotWordRegex = '\a\w*\(\_s*\.\_s*\a\w*\)*'
40
+ let g:ada#WordRegex = '\a\w*'
41
+ let g:ada#Comment = "\\v^(\"[^\"]*\"|'.'|[^\"']){-}\\zs\\s*--.*"
42
+ let g:ada#Keywords = []
43
+
44
+ " Section: g:ada#Keywords {{{1
45
+ "
46
+ " Section: add Ada keywords {{{2
47
+ "
48
+ for Item in ['abort', 'else', 'new', 'return', 'abs', 'elsif', 'not', 'reverse', 'abstract', 'end', 'null', 'accept', 'entry', 'select', 'access', 'exception', 'of', 'separate', 'aliased', 'exit', 'or', 'subtype', 'all', 'others', 'synchronized', 'and', 'for', 'out', 'array', 'function', 'overriding', 'tagged', 'at', 'task', 'generic', 'package', 'terminate', 'begin', 'goto', 'pragma', 'then', 'body', 'private', 'type', 'if', 'procedure', 'case', 'in', 'protected', 'until', 'constant', 'interface', 'use', 'is', 'raise', 'declare', 'range', 'when', 'delay', 'limited', 'record', 'while', 'delta', 'loop', 'rem', 'with', 'digits', 'renames', 'do', 'mod', 'requeue', 'xor']
49
+ let g:ada#Keywords += [{
50
+ \ 'word': Item,
51
+ \ 'menu': 'keyword',
52
+ \ 'info': 'Ada keyword.',
53
+ \ 'kind': 'k',
54
+ \ 'icase': 1}]
55
+ endfor
56
+
57
+ " Section: GNAT Project Files {{{3
58
+ "
59
+ if exists ('g:ada_with_gnat_project_files')
60
+ for Item in ['project']
61
+ let g:ada#Keywords += [{
62
+ \ 'word': Item,
63
+ \ 'menu': 'keyword',
64
+ \ 'info': 'GNAT projectfile keyword.',
65
+ \ 'kind': 'k',
66
+ \ 'icase': 1}]
67
+ endfor
68
+ endif
69
+
70
+ " Section: add standard exception {{{2
71
+ "
72
+ for Item in ['Constraint_Error', 'Program_Error', 'Storage_Error', 'Tasking_Error', 'Status_Error', 'Mode_Error', 'Name_Error', 'Use_Error', 'Device_Error', 'End_Error', 'Data_Error', 'Layout_Error', 'Length_Error', 'Pattern_Error', 'Index_Error', 'Translation_Error', 'Time_Error', 'Argument_Error', 'Tag_Error', 'Picture_Error', 'Terminator_Error', 'Conversion_Error', 'Pointer_Error', 'Dereference_Error', 'Update_Error']
73
+ let g:ada#Keywords += [{
74
+ \ 'word': Item,
75
+ \ 'menu': 'exception',
76
+ \ 'info': 'Ada standard exception.',
77
+ \ 'kind': 'x',
78
+ \ 'icase': 1}]
79
+ endfor
80
+
81
+ " Section: add GNAT exception {{{3
82
+ "
83
+ if exists ('g:ada_gnat_extensions')
84
+ for Item in ['Assert_Failure']
85
+ let g:ada#Keywords += [{
86
+ \ 'word': Item,
87
+ \ 'menu': 'exception',
88
+ \ 'info': 'GNAT exception.',
89
+ \ 'kind': 'x',
90
+ \ 'icase': 1}]
91
+ endfor
92
+ endif
93
+
94
+ " Section: add Ada buildin types {{{2
95
+ "
96
+ for Item in ['Boolean', 'Integer', 'Natural', 'Positive', 'Float', 'Character', 'Wide_Character', 'Wide_Wide_Character', 'String', 'Wide_String', 'Wide_Wide_String', 'Duration']
97
+ let g:ada#Keywords += [{
98
+ \ 'word': Item,
99
+ \ 'menu': 'type',
100
+ \ 'info': 'Ada buildin type.',
101
+ \ 'kind': 't',
102
+ \ 'icase': 1}]
103
+ endfor
104
+
105
+ " Section: add GNAT buildin types {{{3
106
+ "
107
+ if exists ('g:ada_gnat_extensions')
108
+ for Item in ['Short_Integer', 'Short_Short_Integer', 'Long_Integer', 'Long_Long_Integer', 'Short_Float', 'Short_Short_Float', 'Long_Float', 'Long_Long_Float']
109
+ let g:ada#Keywords += [{
110
+ \ 'word': Item,
111
+ \ 'menu': 'type',
112
+ \ 'info': 'GNAT buildin type.',
113
+ \ 'kind': 't',
114
+ \ 'icase': 1}]
115
+ endfor
116
+ endif
117
+
118
+ " Section: add Ada Attributes {{{2
119
+ "
120
+ for Item in ['''Access', '''Address', '''Adjacent', '''Aft', '''Alignment', '''Base', '''Bit_Order', '''Body_Version', '''Callable', '''Caller', '''Ceiling', '''Class', '''Component_Size', '''Compose', '''Constrained', '''Copy_Sign', '''Count', '''Definite', '''Delta', '''Denorm', '''Digits', '''Emax', '''Exponent', '''External_Tag', '''Epsilon', '''First', '''First_Bit', '''Floor', '''Fore', '''Fraction', '''Identity', '''Image', '''Input', '''Large', '''Last', '''Last_Bit', '''Leading_Part', '''Length', '''Machine', '''Machine_Emax', '''Machine_Emin', '''Machine_Mantissa', '''Machine_Overflows', '''Machine_Radix', '''Machine_Rounding', '''Machine_Rounds', '''Mantissa', '''Max', '''Max_Size_In_Storage_Elements', '''Min', '''Mod', '''Model', '''Model_Emin', '''Model_Epsilon', '''Model_Mantissa', '''Model_Small', '''Modulus', '''Output', '''Partition_ID', '''Pos', '''Position', '''Pred', '''Priority', '''Range', '''Read', '''Remainder', '''Round', '''Rounding', '''Safe_Emax', '''Safe_First', '''Safe_Large', '''Safe_Last', '''Safe_Small', '''Scale', '''Scaling', '''Signed_Zeros', '''Size', '''Small', '''Storage_Pool', '''Storage_Size', '''Stream_Size', '''Succ', '''Tag', '''Terminated', '''Truncation', '''Unbiased_Rounding', '''Unchecked_Access', '''Val', '''Valid', '''Value', '''Version', '''Wide_Image', '''Wide_Value', '''Wide_Wide_Image', '''Wide_Wide_Value', '''Wide_Wide_Width', '''Wide_Width', '''Width', '''Write']
121
+ let g:ada#Keywords += [{
122
+ \ 'word': Item,
123
+ \ 'menu': 'attribute',
124
+ \ 'info': 'Ada attribute.',
125
+ \ 'kind': 'a',
126
+ \ 'icase': 1}]
127
+ endfor
128
+
129
+ " Section: add GNAT Attributes {{{3
130
+ "
131
+ if exists ('g:ada_gnat_extensions')
132
+ for Item in ['''Abort_Signal', '''Address_Size', '''Asm_Input', '''Asm_Output', '''AST_Entry', '''Bit', '''Bit_Position', '''Code_Address', '''Default_Bit_Order', '''Elaborated', '''Elab_Body', '''Elab_Spec', '''Emax', '''Enum_Rep', '''Epsilon', '''Fixed_Value', '''Has_Access_Values', '''Has_Discriminants', '''Img', '''Integer_Value', '''Machine_Size', '''Max_Interrupt_Priority', '''Max_Priority', '''Maximum_Alignment', '''Mechanism_Code', '''Null_Parameter', '''Object_Size', '''Passed_By_Reference', '''Range_Length', '''Storage_Unit', '''Target_Name', '''Tick', '''To_Address', '''Type_Class', '''UET_Address', '''Unconstrained_Array', '''Universal_Literal_String', '''Unrestricted_Access', '''VADS_Size', '''Value_Size', '''Wchar_T_Size', '''Word_Size']
133
+ let g:ada#Keywords += [{
134
+ \ 'word': Item,
135
+ \ 'menu': 'attribute',
136
+ \ 'info': 'GNAT attribute.',
137
+ \ 'kind': 'a',
138
+ \ 'icase': 1}]
139
+ endfor
140
+ endif
141
+
142
+ " Section: add Ada Pragmas {{{2
143
+ "
144
+ for Item in ['All_Calls_Remote', 'Assert', 'Assertion_Policy', 'Asynchronous', 'Atomic', 'Atomic_Components', 'Attach_Handler', 'Controlled', 'Convention', 'Detect_Blocking', 'Discard_Names', 'Elaborate', 'Elaborate_All', 'Elaborate_Body', 'Export', 'Import', 'Inline', 'Inspection_Point', 'Interface (Obsolescent)', 'Interrupt_Handler', 'Interrupt_Priority', 'Linker_Options', 'List', 'Locking_Policy', 'Memory_Size (Obsolescent)', 'No_Return', 'Normalize_Scalars', 'Optimize', 'Pack', 'Page', 'Partition_Elaboration_Policy', 'Preelaborable_Initialization', 'Preelaborate', 'Priority', 'Priority_Specific_Dispatching', 'Profile', 'Pure', 'Queueing_Policy', 'Relative_Deadline', 'Remote_Call_Interface', 'Remote_Types', 'Restrictions', 'Reviewable', 'Shared (Obsolescent)', 'Shared_Passive', 'Storage_Size', 'Storage_Unit (Obsolescent)', 'Suppress', 'System_Name (Obsolescent)', 'Task_Dispatching_Policy', 'Unchecked_Union', 'Unsuppress', 'Volatile', 'Volatile_Components']
145
+ let g:ada#Keywords += [{
146
+ \ 'word': Item,
147
+ \ 'menu': 'pragma',
148
+ \ 'info': 'Ada pragma.',
149
+ \ 'kind': 'p',
150
+ \ 'icase': 1}]
151
+ endfor
152
+
153
+ " Section: add GNAT Pragmas {{{3
154
+ "
155
+ if exists ('g:ada_gnat_extensions')
156
+ for Item in ['Abort_Defer', 'Ada_83', 'Ada_95', 'Ada_05', 'Annotate', 'Ast_Entry', 'C_Pass_By_Copy', 'Comment', 'Common_Object', 'Compile_Time_Warning', 'Complex_Representation', 'Component_Alignment', 'Convention_Identifier', 'CPP_Class', 'CPP_Constructor', 'CPP_Virtual', 'CPP_Vtable', 'Debug', 'Elaboration_Checks', 'Eliminate', 'Export_Exception', 'Export_Function', 'Export_Object', 'Export_Procedure', 'Export_Value', 'Export_Valued_Procedure', 'Extend_System', 'External', 'External_Name_Casing', 'Finalize_Storage_Only', 'Float_Representation', 'Ident', 'Import_Exception', 'Import_Function', 'Import_Object', 'Import_Procedure', 'Import_Valued_Procedure', 'Initialize_Scalars', 'Inline_Always', 'Inline_Generic', 'Interface_Name', 'Interrupt_State', 'Keep_Names', 'License', 'Link_With', 'Linker_Alias', 'Linker_Section', 'Long_Float', 'Machine_Attribute', 'Main_Storage', 'Obsolescent', 'Passive', 'Polling', 'Profile_Warnings', 'Propagate_Exceptions', 'Psect_Object', 'Pure_Function', 'Restriction_Warnings', 'Source_File_Name', 'Source_File_Name_Project', 'Source_Reference', 'Stream_Convert', 'Style_Checks', 'Subtitle', 'Suppress_All', 'Suppress_Exception_Locations', 'Suppress_Initialization', 'Task_Info', 'Task_Name', 'Task_Storage', 'Thread_Body', 'Time_Slice', 'Title', 'Unimplemented_Unit', 'Universal_Data', 'Unreferenced', 'Unreserve_All_Interrupts', 'Use_VADS_Size', 'Validity_Checks', 'Warnings', 'Weak_External']
157
+ let g:ada#Keywords += [{
158
+ \ 'word': Item,
159
+ \ 'menu': 'pragma',
160
+ \ 'info': 'GNAT pragma.',
161
+ \ 'kind': 'p',
162
+ \ 'icase': 1}]
163
+ endfor
164
+ endif
165
+ " 1}}}
166
+
167
+ " Section: g:ada#Ctags_Kinds {{{1
168
+ "
169
+ let g:ada#Ctags_Kinds = {
170
+ \ 'P': ["packspec", "package specifications"],
171
+ \ 'p': ["package", "packages"],
172
+ \ 'T': ["typespec", "type specifications"],
173
+ \ 't': ["type", "types"],
174
+ \ 'U': ["subspec", "subtype specifications"],
175
+ \ 'u': ["subtype", "subtypes"],
176
+ \ 'c': ["component", "record type components"],
177
+ \ 'l': ["literal", "enum type literals"],
178
+ \ 'V': ["varspec", "variable specifications"],
179
+ \ 'v': ["variable", "variables"],
180
+ \ 'f': ["formal", "generic formal parameters"],
181
+ \ 'n': ["constant", "constants"],
182
+ \ 'x': ["exception", "user defined exceptions"],
183
+ \ 'R': ["subprogspec", "subprogram specifications"],
184
+ \ 'r': ["subprogram", "subprograms"],
185
+ \ 'K': ["taskspec", "task specifications"],
186
+ \ 'k': ["task", "tasks"],
187
+ \ 'O': ["protectspec", "protected data specifications"],
188
+ \ 'o': ["protected", "protected data"],
189
+ \ 'E': ["entryspec", "task/protected data entry specifications"],
190
+ \ 'e': ["entry", "task/protected data entries"],
191
+ \ 'b': ["label", "labels"],
192
+ \ 'i': ["identifier", "loop/declare identifiers"],
193
+ \ 'a': ["autovar", "automatic variables"],
194
+ \ 'y': ["annon", "loops and blocks with no identifier"]}
195
+
196
+ " Section: ada#Word (...) {{{1
197
+ "
198
+ " Extract current Ada word across multiple lines
199
+ " AdaWord ([line, column])\
200
+ "
201
+ function ada#Word (...)
202
+ if a:0 > 1
203
+ let l:Line_Nr = a:1
204
+ let l:Column_Nr = a:2 - 1
205
+ else
206
+ let l:Line_Nr = line('.')
207
+ let l:Column_Nr = col('.') - 1
208
+ endif
209
+
210
+ let l:Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
211
+
212
+ " Cope with tag searching for items in comments; if we are, don't loop
213
+ " backwards looking for previous lines
214
+ if l:Column_Nr > strlen(l:Line)
215
+ " We were in a comment
216
+ let l:Line = getline(l:Line_Nr)
217
+ let l:Search_Prev_Lines = 0
218
+ else
219
+ let l:Search_Prev_Lines = 1
220
+ endif
221
+
222
+ " Go backwards until we find a match (Ada ID) that *doesn't* include our
223
+ " location - i.e., the previous ID. This is because the current 'correct'
224
+ " match will toggle matching/not matching as we traverse characters
225
+ " backwards. Thus, we have to find the previous unrelated match, exclude
226
+ " it, then use the next full match (ours).
227
+ " Remember to convert vim column 'l:Column_Nr' [1..n] to string offset [0..(n-1)]
228
+ " ... but start, here, one after the required char.
229
+ let l:New_Column = l:Column_Nr + 1
230
+ while 1
231
+ let l:New_Column = l:New_Column - 1
232
+ if l:New_Column < 0
233
+ " Have to include previous l:Line from file
234
+ let l:Line_Nr = l:Line_Nr - 1
235
+ if l:Line_Nr < 1 || !l:Search_Prev_Lines
236
+ " Start of file or matching in a comment
237
+ let l:Line_Nr = 1
238
+ let l:New_Column = 0
239
+ let l:Our_Match = match (l:Line, g:ada#WordRegex )
240
+ break
241
+ endif
242
+ " Get previous l:Line, and prepend it to our search string
243
+ let l:New_Line = substitute (getline (l:Line_Nr), g:ada#Comment, '', '' )
244
+ let l:New_Column = strlen (l:New_Line) - 1
245
+ let l:Column_Nr = l:Column_Nr + l:New_Column
246
+ let l:Line = l:New_Line . l:Line
247
+ endif
248
+ " Check to see if this is a match excluding 'us'
249
+ let l:Match_End = l:New_Column +
250
+ \ matchend (strpart (l:Line,l:New_Column), g:ada#WordRegex ) - 1
251
+ if l:Match_End >= l:New_Column &&
252
+ \ l:Match_End < l:Column_Nr
253
+ " Yes
254
+ let l:Our_Match = l:Match_End+1 +
255
+ \ match (strpart (l:Line,l:Match_End+1), g:ada#WordRegex )
256
+ break
257
+ endif
258
+ endwhile
259
+
260
+ " Got anything?
261
+ if l:Our_Match < 0
262
+ return ''
263
+ else
264
+ let l:Line = strpart (l:Line, l:Our_Match)
265
+ endif
266
+
267
+ " Now simply add further lines until the match gets no bigger
268
+ let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
269
+ let l:Last_Line = line ('$')
270
+ let l:Line_Nr = line ('.') + 1
271
+ while l:Line_Nr <= l:Last_Line
272
+ let l:Last_Match = l:Match_String
273
+ let l:Line = l:Line .
274
+ \ substitute (getline (l:Line_Nr), g:ada#Comment, '', '')
275
+ let l:Match_String = matchstr (l:Line, g:ada#WordRegex)
276
+ if l:Match_String == l:Last_Match
277
+ break
278
+ endif
279
+ endwhile
280
+
281
+ " Strip whitespace & return
282
+ return substitute (l:Match_String, '\s\+', '', 'g')
283
+ endfunction ada#Word
284
+
285
+ " Section: ada#List_Tag (...) {{{1
286
+ "
287
+ " List tags in quickfix window
288
+ "
289
+ function ada#List_Tag (...)
290
+ if a:0 > 1
291
+ let l:Tag_Word = ada#Word (a:1, a:2)
292
+ elseif a:0 > 0
293
+ let l:Tag_Word = a:1
294
+ else
295
+ let l:Tag_Word = ada#Word ()
296
+ endif
297
+
298
+ echo "Searching for" l:Tag_Word
299
+
300
+ let l:Pattern = '^' . l:Tag_Word . '$'
301
+ let l:Tag_List = taglist (l:Pattern)
302
+ let l:Error_List = []
303
+ "
304
+ " add symbols
305
+ "
306
+ for Tag_Item in l:Tag_List
307
+ if l:Tag_Item['kind'] == ''
308
+ let l:Tag_Item['kind'] = 's'
309
+ endif
310
+
311
+ let l:Error_List += [
312
+ \ l:Tag_Item['filename'] . '|' .
313
+ \ l:Tag_Item['cmd'] . '|' .
314
+ \ l:Tag_Item['kind'] . "\t" .
315
+ \ l:Tag_Item['name'] ]
316
+ endfor
317
+ set errorformat=%f\|%l\|%m
318
+ cexpr l:Error_List
319
+ cwindow
320
+ endfunction ada#List_Tag
321
+
322
+ " Section: ada#Jump_Tag (Word, Mode) {{{1
323
+ "
324
+ " Word tag - include '.' and if Ada make uppercase
325
+ "
326
+ function ada#Jump_Tag (Word, Mode)
327
+ if a:Word == ''
328
+ " Get current word
329
+ let l:Word = ada#Word()
330
+ if l:Word == ''
331
+ throw "NOT_FOUND: no identifier found."
332
+ endif
333
+ else
334
+ let l:Word = a:Word
335
+ endif
336
+
337
+ echo "Searching for " . l:Word
338
+
339
+ try
340
+ execute a:Mode l:Word
341
+ catch /.*:E426:.*/
342
+ let ignorecase = &ignorecase
343
+ set ignorecase
344
+ execute a:Mode l:Word
345
+ let &ignorecase = ignorecase
346
+ endtry
347
+
348
+ return
349
+ endfunction ada#Jump_Tag
350
+
351
+ " Section: ada#Insert_Backspace () {{{1
352
+ "
353
+ " Backspace at end of line after auto-inserted commentstring '-- ' wipes it
354
+ "
355
+ function ada#Insert_Backspace ()
356
+ let l:Line = getline ('.')
357
+ if col ('.') > strlen (l:Line) &&
358
+ \ match (l:Line, '-- $') != -1 &&
359
+ \ match (&comments,'--') != -1
360
+ return "\<bs>\<bs>\<bs>"
361
+ else
362
+ return "\<bs>"
363
+ endif
364
+
365
+ return
366
+ endfunction ada#InsertBackspace
367
+
368
+ " Section: Insert Completions {{{1
369
+ "
370
+ " Section: ada#User_Complete(findstart, base) {{{2
371
+ "
372
+ " This function is used for the 'complete' option.
373
+ "
374
+ function! ada#User_Complete(findstart, base)
375
+ if a:findstart == 1
376
+ "
377
+ " locate the start of the word
378
+ "
379
+ let line = getline ('.')
380
+ let start = col ('.') - 1
381
+ while start > 0 && line[start - 1] =~ '\i\|'''
382
+ let start -= 1
383
+ endwhile
384
+ return start
385
+ else
386
+ "
387
+ " look up matches
388
+ "
389
+ let l:Pattern = '^' . a:base . '.*$'
390
+ "
391
+ " add keywords
392
+ "
393
+ for Tag_Item in g:ada#Keywords
394
+ if l:Tag_Item['word'] =~? l:Pattern
395
+ if complete_add (l:Tag_Item) == 0
396
+ return []
397
+ endif
398
+ if complete_check ()
399
+ return []
400
+ endif
401
+ endif
402
+ endfor
403
+ return []
404
+ endif
405
+ endfunction ada#User_Complete
406
+
407
+ " Section: ada#Completion (cmd) {{{2
408
+ "
409
+ " Word completion (^N/^R/^X^]) - force '.' inclusion
410
+ function ada#Completion (cmd)
411
+ set iskeyword+=46
412
+ return a:cmd . "\<C-R>=ada#Completion_End ()\<CR>"
413
+ endfunction ada#Completion
414
+
415
+ " Section: ada#Completion_End () {{{2
416
+ "
417
+ function ada#Completion_End ()
418
+ set iskeyword-=46
419
+ return ''
420
+ endfunction ada#Completion_End
421
+
422
+ " Section: ada#Create_Tags {{{1
423
+ "
424
+ function ada#Create_Tags (option)
425
+ if a:option == 'file'
426
+ let l:Filename = fnamemodify (bufname ('%'), ':p')
427
+ elseif a:option == 'dir'
428
+ let l:Filename =
429
+ \ fnamemodify (bufname ('%'), ':p:h') . "*.ada " .
430
+ \ fnamemodify (bufname ('%'), ':p:h') . "*.adb " .
431
+ \ fnamemodify (bufname ('%'), ':p:h') . "*.ads"
432
+ else
433
+ let l:Filename = a:option
434
+ endif
435
+ execute '!ctags --excmd=number ' . l:Filename
436
+ endfunction ada#Create_Tags
437
+
438
+ " Section: ada#Switch_Session {{{1
439
+ "
440
+ function ada#Switch_Session (New_Session)
441
+ "
442
+ " you should not save to much date into the seession since they will
443
+ " be sourced
444
+ "
445
+ let l:sessionoptions=&sessionoptions
446
+
447
+ try
448
+ set sessionoptions=buffers,curdir,folds,globals,resize,slash,tabpages,tabpages,unix,winpos,winsize
449
+
450
+ if a:New_Session != v:this_session
451
+ "
452
+ " We actually got a new session - otherwise there
453
+ " is nothing to do.
454
+ "
455
+ if strlen (v:this_session) > 0
456
+ execute 'mksession! ' . v:this_session
457
+ endif
458
+
459
+ let v:this_session = a:New_Session
460
+
461
+ "if filereadable (v:this_session)
462
+ "execute 'source ' . v:this_session
463
+ "endif
464
+
465
+ augroup ada_session
466
+ autocmd!
467
+ autocmd VimLeavePre * execute 'mksession! ' . v:this_session
468
+ augroup END
469
+
470
+ "if exists ("g:Tlist_Auto_Open") && g:Tlist_Auto_Open
471
+ "TlistOpen
472
+ "endif
473
+
474
+ endif
475
+ finally
476
+ let &sessionoptions=l:sessionoptions
477
+ endtry
478
+
479
+ return
480
+ endfunction ada#Switch_Session
481
+
482
+ " Section: GNAT Pretty Printer folding {{{1
483
+ "
484
+ if exists('g:ada_folding') && g:ada_folding[0] == 'g'
485
+ "
486
+ " Lines consisting only of ')' ';' are due to a gnat pretty bug and
487
+ " have the same level as the line above (can't happen in the first
488
+ " line).
489
+ "
490
+ let s:Fold_Collate = '^\([;)]*$\|'
491
+
492
+ "
493
+ " some lone statements are folded with the line above
494
+ "
495
+ if stridx (g:ada_folding, 'i') >= 0
496
+ let s:Fold_Collate .= '\s\+\<is\>$\|'
497
+ endif
498
+ if stridx (g:ada_folding, 'b') >= 0
499
+ let s:Fold_Collate .= '\s\+\<begin\>$\|'
500
+ endif
501
+ if stridx (g:ada_folding, 'p') >= 0
502
+ let s:Fold_Collate .= '\s\+\<private\>$\|'
503
+ endif
504
+ if stridx (g:ada_folding, 'x') >= 0
505
+ let s:Fold_Collate .= '\s\+\<exception\>$\|'
506
+ endif
507
+
508
+ " We also handle empty lines and
509
+ " comments here.
510
+ let s:Fold_Collate .= '--\)'
511
+
512
+ function ada#Pretty_Print_Folding (Line) " {{{2
513
+ let l:Text = getline (a:Line)
514
+
515
+ if l:Text =~ s:Fold_Collate
516
+ "
517
+ " fold with line above
518
+ "
519
+ let l:Level = "="
520
+ elseif l:Text =~ '^\s\+('
521
+ "
522
+ " gnat outdents a line which stards with a ( by one characters so
523
+ " that parameters which follow are aligned.
524
+ "
525
+ let l:Level = (indent (a:Line) + 1) / &shiftwidth
526
+ else
527
+ let l:Level = indent (a:Line) / &shiftwidth
528
+ endif
529
+
530
+ return l:Level
531
+ endfunction ada#Pretty_Print_Folding " }}}2
532
+ endif
533
+
534
+ " Section: Options and Menus {{{1
535
+ "
536
+ " Section: ada#Switch_Syntax_Options {{{2
537
+ "
538
+ function ada#Switch_Syntax_Option (option)
539
+ syntax off
540
+ if exists ('g:ada_' . a:option)
541
+ unlet g:ada_{a:option}
542
+ echo a:option . 'now off'
543
+ else
544
+ let g:ada_{a:option}=1
545
+ echo a:option . 'now on'
546
+ endif
547
+ syntax on
548
+ endfunction ada#Switch_Syntax_Option
549
+
550
+ " Section: ada#Map_Menu {{{2
551
+ "
552
+ function ada#Map_Menu (Text, Keys, Command)
553
+ if a:Keys[0] == ':'
554
+ execute
555
+ \ "50amenu " .
556
+ \ "Ada." . escape(a:Text, ' ') .
557
+ \ "<Tab>" . a:Keys .
558
+ \ " :" . a:Command . "<CR>"
559
+ execute
560
+ \ "command -buffer " .
561
+ \ a:Keys[1:] .
562
+ \" :" . a:Command . "<CR>"
563
+ elseif a:Keys[0] == '<'
564
+ execute
565
+ \ "50amenu " .
566
+ \ "Ada." . escape(a:Text, ' ') .
567
+ \ "<Tab>" . a:Keys .
568
+ \ " :" . a:Command . "<CR>"
569
+ execute
570
+ \ "nnoremap <buffer> " .
571
+ \ a:Keys .
572
+ \" :" . a:Command . "<CR>"
573
+ execute
574
+ \ "inoremap <buffer> " .
575
+ \ a:Keys .
576
+ \" <C-O>:" . a:Command . "<CR>"
577
+ else
578
+ if exists("g:mapleader")
579
+ let l:leader = g:mapleader
580
+ else
581
+ let l:leader = '\'
582
+ endif
583
+ execute
584
+ \ "50amenu " .
585
+ \ "Ada." . escape(a:Text, ' ') .
586
+ \ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
587
+ \ " :" . a:Command . "<CR>"
588
+ execute
589
+ \ "nnoremap <buffer>" .
590
+ \ " <Leader>a" . a:Keys .
591
+ \" :" . a:Command
592
+ execute
593
+ \ "inoremap <buffer>" .
594
+ \ " <Leader>a" . a:Keys .
595
+ \" <C-O>:" . a:Command
596
+ endif
597
+ return
598
+ endfunction
599
+
600
+ " Section: ada#Map_Popup {{{2
601
+ "
602
+ function ada#Map_Popup (Text, Keys, Command)
603
+ if exists("g:mapleader")
604
+ let l:leader = g:mapleader
605
+ else
606
+ let l:leader = '\'
607
+ endif
608
+ execute
609
+ \ "50amenu " .
610
+ \ "PopUp." . escape(a:Text, ' ') .
611
+ \ "<Tab>" . escape(l:leader . "a" . a:Keys , '\') .
612
+ \ " :" . a:Command . "<CR>"
613
+
614
+ call ada#Map_Menu (a:Text, a:Keys, a:Command)
615
+ return
616
+ endfunction ada#Map_Popup
617
+
618
+ " }}}1
619
+
620
+ lockvar g:ada#WordRegex
621
+ lockvar g:ada#DotWordRegex
622
+ lockvar g:ada#Comment
623
+ lockvar! g:ada#Keywords
624
+ lockvar! g:ada#Ctags_Kinds
625
+
626
+ let &cpo = s:keepcpo
627
+ unlet s:keepcpo
628
+
629
+ finish " 1}}}
630
+
631
+ "------------------------------------------------------------------------------
632
+ " Copyright (C) 2006 Martin Krischik
633
+ "
634
+ " Vim is Charityware - see ":help license" or uganda.txt for licence details.
635
+ "------------------------------------------------------------------------------
636
+ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
637
+ " vim: foldmethod=marker
nvim-linux-x86_64/share/nvim/runtime/autoload/adacomplete.vim ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "------------------------------------------------------------------------------
2
+ " Description: Vim Ada omnicompletion file
3
+ " Language: Ada (2005)
4
+ " $Id: adacomplete.vim 887 2008-07-08 14:29:01Z krischik $
5
+ " Maintainer: Martin Krischik
6
+ " $Author: krischik $
7
+ " $Date: 2008-07-08 16:29:01 +0200 (Di, 08 Jul 2008) $
8
+ " Version: 4.6
9
+ " $Revision: 887 $
10
+ " $HeadURL: https://gnuada.svn.sourceforge.net/svnroot/gnuada/trunk/tools/vim/autoload/adacomplete.vim $
11
+ " History: 24.05.2006 MK Unified Headers
12
+ " 26.05.2006 MK improved search for begin of word.
13
+ " 16.07.2006 MK Ada-Mode as vim-ball
14
+ " 15.10.2006 MK Bram's suggestion for runtime integration
15
+ " 05.11.2006 MK Bram suggested not to use include protection for
16
+ " autoload
17
+ " 05.11.2006 MK Bram suggested against using setlocal omnifunc
18
+ " 05.11.2006 MK Bram suggested to save on spaces
19
+ " Help Page: ft-ada-omni
20
+ "------------------------------------------------------------------------------
21
+
22
+ if version < 700
23
+ finish
24
+ endif
25
+
26
+ " Section: adacomplete#Complete () {{{1
27
+ "
28
+ " This function is used for the 'omnifunc' option.
29
+ "
30
+ function! adacomplete#Complete (findstart, base)
31
+ if a:findstart == 1
32
+ return ada#User_Complete (a:findstart, a:base)
33
+ else
34
+ "
35
+ " look up matches
36
+ "
37
+ if exists ("g:ada_omni_with_keywords")
38
+ call ada#User_Complete (a:findstart, a:base)
39
+ endif
40
+ "
41
+ " search tag file for matches
42
+ "
43
+ let l:Pattern = '^' . a:base . '.*$'
44
+ let l:Tag_List = taglist (l:Pattern)
45
+ "
46
+ " add symbols
47
+ "
48
+ for Tag_Item in l:Tag_List
49
+ if l:Tag_Item['kind'] == ''
50
+ "
51
+ " Tag created by gnat xref
52
+ "
53
+ let l:Match_Item = {
54
+ \ 'word': l:Tag_Item['name'],
55
+ \ 'menu': l:Tag_Item['filename'],
56
+ \ 'info': "Symbol from file " . l:Tag_Item['filename'] . " line " . l:Tag_Item['cmd'],
57
+ \ 'kind': 's',
58
+ \ 'icase': 1}
59
+ else
60
+ "
61
+ " Tag created by ctags
62
+ "
63
+ let l:Info = 'Symbol : ' . l:Tag_Item['name'] . "\n"
64
+ let l:Info .= 'Of type : ' . g:ada#Ctags_Kinds[l:Tag_Item['kind']][1] . "\n"
65
+ let l:Info .= 'Defined in File : ' . l:Tag_Item['filename'] . "\n"
66
+
67
+ if has_key( l:Tag_Item, 'package')
68
+ let l:Info .= 'Package : ' . l:Tag_Item['package'] . "\n"
69
+ let l:Menu = l:Tag_Item['package']
70
+ elseif has_key( l:Tag_Item, 'separate')
71
+ let l:Info .= 'Separate from Package : ' . l:Tag_Item['separate'] . "\n"
72
+ let l:Menu = l:Tag_Item['separate']
73
+ elseif has_key( l:Tag_Item, 'packspec')
74
+ let l:Info .= 'Package Specification : ' . l:Tag_Item['packspec'] . "\n"
75
+ let l:Menu = l:Tag_Item['packspec']
76
+ elseif has_key( l:Tag_Item, 'type')
77
+ let l:Info .= 'Datetype : ' . l:Tag_Item['type'] . "\n"
78
+ let l:Menu = l:Tag_Item['type']
79
+ else
80
+ let l:Menu = l:Tag_Item['filename']
81
+ endif
82
+
83
+ let l:Match_Item = {
84
+ \ 'word': l:Tag_Item['name'],
85
+ \ 'menu': l:Menu,
86
+ \ 'info': l:Info,
87
+ \ 'kind': l:Tag_Item['kind'],
88
+ \ 'icase': 1}
89
+ endif
90
+ if complete_add (l:Match_Item) == 0
91
+ return []
92
+ endif
93
+ if complete_check ()
94
+ return []
95
+ endif
96
+ endfor
97
+ return []
98
+ endif
99
+ endfunction adacomplete#Complete
100
+
101
+ finish " 1}}}
102
+
103
+ "------------------------------------------------------------------------------
104
+ " Copyright (C) 2006 Martin Krischik
105
+ "
106
+ " Vim is Charityware - see ":help license" or uganda.txt for licence details.
107
+ "------------------------------------------------------------------------------
108
+ " vim: textwidth=78 wrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab
109
+ " vim: foldmethod=marker
nvim-linux-x86_64/share/nvim/runtime/autoload/bitbake.vim ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ " Support for bitbake indenting, see runtime/indent/bitbake.vim
2
+
3
+ function s:is_bb_python_func_def(lnum)
4
+ let stack = synstack(a:lnum, 1)
5
+ if len(stack) == 0
6
+ return 0
7
+ endif
8
+
9
+ return synIDattr(stack[0], "name") == "bbPyFuncDef"
10
+ endfunction
11
+
12
+ function bitbake#Indent(lnum)
13
+ if !has('syntax_items')
14
+ return -1
15
+ endif
16
+
17
+ let stack = synstack(a:lnum, 1)
18
+ if len(stack) == 0
19
+ return -1
20
+ endif
21
+
22
+ let name = synIDattr(stack[0], "name")
23
+
24
+ " TODO: support different styles of indentation for assignments. For now,
25
+ " we only support like this:
26
+ " VAR = " \
27
+ " value1 \
28
+ " value2 \
29
+ " "
30
+ "
31
+ " i.e. each value indented by shiftwidth(), with the final quote " completely unindented.
32
+ if name == "bbVarValue"
33
+ " Quote handling is tricky. kernel.bbclass has this line for instance:
34
+ " EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" " HOSTCPP="${BUILD_CPP}""
35
+ " Instead of trying to handle crazy cases like that, just assume that a
36
+ " double-quote on a line by itself (following an assignment) means the
37
+ " user is closing the assignment, and de-dent.
38
+ if getline(a:lnum) =~ '^\s*"$'
39
+ return 0
40
+ endif
41
+
42
+ let prevstack = synstack(a:lnum - 1, 1)
43
+ if len(prevstack) == 0
44
+ return -1
45
+ endif
46
+
47
+ let prevname = synIDattr(prevstack[0], "name")
48
+
49
+ " Only indent if there was actually a continuation character on
50
+ " the previous line, to avoid misleading indentation.
51
+ let prevlinelastchar = synIDattr(synID(a:lnum - 1, col([a:lnum - 1, "$"]) - 1, 1), "name")
52
+ let prev_continued = prevlinelastchar == "bbContinue"
53
+
54
+ " Did the previous line introduce an assignment?
55
+ if index(["bbVarDef", "bbVarFlagDef"], prevname) != -1
56
+ if prev_continued
57
+ return shiftwidth()
58
+ endif
59
+ endif
60
+
61
+ if !prev_continued
62
+ return 0
63
+ endif
64
+
65
+ " Autoindent can take it from here
66
+ return -1
67
+ endif
68
+
69
+ if index(["bbPyDefRegion", "bbPyFuncRegion"], name) != -1
70
+ let ret = python#GetIndent(a:lnum, function('s:is_bb_python_func_def'))
71
+ " Should normally always be indented by at least one shiftwidth; but allow
72
+ " return of -1 (defer to autoindent) or -2 (force indent to 0)
73
+ if ret == 0
74
+ return shiftwidth()
75
+ elseif ret == -2
76
+ return 0
77
+ endif
78
+ return ret
79
+ endif
80
+
81
+ " TODO: GetShIndent doesn't detect tasks prepended with 'fakeroot'
82
+ " Need to submit a patch upstream to Vim to provide an extension point.
83
+ " Unlike the Python indenter, the Sh indenter is way too large to copy and
84
+ " modify here.
85
+ if name == "bbShFuncRegion"
86
+ return GetShIndent()
87
+ endif
88
+
89
+ " TODO:
90
+ " + heuristics for de-denting out of a bbPyDefRegion? e.g. when the user
91
+ " types an obvious BB keyword like addhandler or addtask, or starts
92
+ " writing a shell task. Maybe too hard to implement...
93
+
94
+ return -1
95
+ endfunction
nvim-linux-x86_64/share/nvim/runtime/autoload/cargo.vim ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ " Last Modified: 2023-09-11
2
+
3
+ function! cargo#Load()
4
+ " Utility call to get this script loaded, for debugging
5
+ endfunction
6
+
7
+ function! cargo#cmd(args) abort
8
+ " Trim trailing spaces. This is necessary since :terminal command parses
9
+ " trailing spaces as an empty argument.
10
+ let args = substitute(a:args, '\s\+$', '', '')
11
+ if exists('g:cargo_shell_command_runner')
12
+ let cmd = g:cargo_shell_command_runner
13
+ elseif has('terminal')
14
+ let cmd = 'terminal'
15
+ elseif has('nvim')
16
+ let cmd = 'noautocmd new | terminal'
17
+ else
18
+ let cmd = '!'
19
+ endif
20
+ execute cmd 'cargo' args
21
+ endfunction
22
+
23
+ function! s:nearest_cargo(...) abort
24
+ " If the second argument is not specified, the first argument determines
25
+ " whether we will start from the current directory or the directory of the
26
+ " current buffer, otherwise, we start with the provided path on the
27
+ " second argument.
28
+
29
+ let l:is_getcwd = get(a:, 1, 0)
30
+ if l:is_getcwd
31
+ let l:starting_path = get(a:, 2, getcwd())
32
+ else
33
+ let l:starting_path = get(a:, 2, expand('%:p:h'))
34
+ endif
35
+
36
+ return findfile('Cargo.toml', l:starting_path . ';')
37
+ endfunction
38
+
39
+ function! cargo#nearestCargo(is_getcwd) abort
40
+ return s:nearest_cargo(a:is_getcwd)
41
+ endfunction
42
+
43
+ function! cargo#nearestWorkspaceCargo(is_getcwd) abort
44
+ let l:nearest = s:nearest_cargo(a:is_getcwd)
45
+ while l:nearest !=# ''
46
+ for l:line in readfile(l:nearest, '', 0x100)
47
+ if l:line =~# '\V[workspace]'
48
+ return l:nearest
49
+ endif
50
+ endfor
51
+ let l:next = fnamemodify(l:nearest, ':p:h:h')
52
+ let l:nearest = s:nearest_cargo(0, l:next)
53
+ endwhile
54
+ return ''
55
+ endfunction
56
+
57
+ function! cargo#nearestRootCargo(is_getcwd) abort
58
+ " Try to find a workspace Cargo.toml, and if not found, take the nearest
59
+ " regular Cargo.toml
60
+ let l:workspace_cargo = cargo#nearestWorkspaceCargo(a:is_getcwd)
61
+ if l:workspace_cargo !=# ''
62
+ return l:workspace_cargo
63
+ endif
64
+ return s:nearest_cargo(a:is_getcwd)
65
+ endfunction
66
+
67
+
68
+ function! cargo#build(args)
69
+ call cargo#cmd("build " . a:args)
70
+ endfunction
71
+
72
+ function! cargo#check(args)
73
+ call cargo#cmd("check " . a:args)
74
+ endfunction
75
+
76
+ function! cargo#clean(args)
77
+ call cargo#cmd("clean " . a:args)
78
+ endfunction
79
+
80
+ function! cargo#doc(args)
81
+ call cargo#cmd("doc " . a:args)
82
+ endfunction
83
+
84
+ function! cargo#new(args)
85
+ call cargo#cmd("new " . a:args)
86
+ cd `=a:args`
87
+ endfunction
88
+
89
+ function! cargo#init(args)
90
+ call cargo#cmd("init " . a:args)
91
+ endfunction
92
+
93
+ function! cargo#run(args)
94
+ call cargo#cmd("run " . a:args)
95
+ endfunction
96
+
97
+ function! cargo#test(args)
98
+ call cargo#cmd("test " . a:args)
99
+ endfunction
100
+
101
+ function! cargo#bench(args)
102
+ call cargo#cmd("bench " . a:args)
103
+ endfunction
104
+
105
+ function! cargo#update(args)
106
+ call cargo#cmd("update " . a:args)
107
+ endfunction
108
+
109
+ function! cargo#search(args)
110
+ call cargo#cmd("search " . a:args)
111
+ endfunction
112
+
113
+ function! cargo#publish(args)
114
+ call cargo#cmd("publish " . a:args)
115
+ endfunction
116
+
117
+ function! cargo#install(args)
118
+ call cargo#cmd("install " . a:args)
119
+ endfunction
120
+
121
+ function! cargo#runtarget(args)
122
+ let l:filename = expand('%:p')
123
+ let l:read_manifest = system('cargo read-manifest')
124
+ let l:metadata = json_decode(l:read_manifest)
125
+ let l:targets = get(l:metadata, 'targets', [])
126
+ let l:did_run = 0
127
+ for l:target in l:targets
128
+ let l:src_path = get(l:target, 'src_path', '')
129
+ let l:kinds = get(l:target, 'kind', [])
130
+ let l:name = get(l:target, 'name', '')
131
+ if l:src_path == l:filename
132
+ if index(l:kinds, 'example') != -1
133
+ let l:did_run = 1
134
+ call cargo#run("--example " . shellescape(l:name) . " " . a:args)
135
+ return
136
+ elseif index(l:kinds, 'bin') != -1
137
+ let l:did_run = 1
138
+ call cargo#run("--bin " . shellescape(l:name) . " " . a:args)
139
+ return
140
+ endif
141
+ endif
142
+ endfor
143
+ if l:did_run != 1
144
+ call cargo#run(a:args)
145
+ return
146
+ endif
147
+ endfunction
148
+
149
+ " vim: set et sw=4 sts=4 ts=8: