You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -234,37 +226,37 @@ It is important that you know that configuration is given priority in pure lua,
234
226
require('code_runner').setup {
235
227
mode="term",
236
228
startinsert=true,
237
-
term= {
238
-
position="vert",
239
-
size=15,
240
-
},
241
-
filetype= {
242
-
java= {
243
-
"cd $dir &&",
244
-
"javac $fileName &&",
245
-
"java $fileNameWithoutExt"
246
-
},
247
-
python="python3 -u",
248
-
typescript="deno run",
249
-
rust= {
250
-
"cd $dir &&",
251
-
"rustc $fileName &&",
252
-
"$dir$fileNameWithoutExt"
253
-
},
254
-
},
255
-
project= {
256
-
["~/deno/example"] = {
257
-
name="ExapleDeno",
258
-
description="Project with deno using other command",
259
-
file_name="http/main.ts",
260
-
command="deno run --allow-net"
261
-
},
262
-
["~/cpp/example"] = {
263
-
name="ExapleCpp",
264
-
description="Project with make file",
265
-
command="make buid && cd buid/ && ./compiled_file"
266
-
}
267
-
},
229
+
term= {
230
+
position="vert",
231
+
size=15,
232
+
},
233
+
filetype= {
234
+
java= {
235
+
"cd $dir &&",
236
+
"javac $fileName &&",
237
+
"java $fileNameWithoutExt"
238
+
},
239
+
python="python3 -u",
240
+
typescript="deno run",
241
+
rust= {
242
+
"cd $dir &&",
243
+
"rustc $fileName &&",
244
+
"$dir$fileNameWithoutExt"
245
+
},
246
+
},
247
+
project= {
248
+
["~/deno/example"] = {
249
+
name="ExapleDeno",
250
+
description="Project with deno using other command",
251
+
file_name="http/main.ts",
252
+
command="deno run --allow-net"
253
+
},
254
+
["~/cpp/example"] = {
255
+
name="ExapleCpp",
256
+
description="Project with make file",
257
+
command="make buid && cd buid/ && ./compiled_file"
258
+
}
259
+
},
268
260
}
269
261
```
270
262
@@ -288,26 +280,26 @@ The file should look like this(the default file does not exist create it with th
288
280
#### Configure with lua files
289
281
290
282
```lua
291
-
..... moreconfig .....
292
-
filetype= {
283
+
--..... more config .....
284
+
filetype= {
293
285
java= {
294
286
"cd $dir &&",
295
287
"javac $fileName &&",
296
288
"java $fileNameWithoutExt"
297
289
},
298
-
python="python3 -u",
299
-
typescript="deno run",
290
+
python="python3 -u",
291
+
typescript="deno run",
300
292
rust= {
301
293
"cd $dir &&",
302
294
"rustc $fileName &&",
303
295
"$dir$fileNameWithoutExt"
304
296
},
305
297
},
306
-
..... moreconfig .....
298
+
--..... more config .....
307
299
}
308
300
```
309
301
310
-
if you want to add some other language or some other command follow this structure "key": "commans"
302
+
if you want to add some other language or some other command follow this structure `key`: `commans`
311
303
312
304
#### Variables
313
305
@@ -321,12 +313,12 @@ The available variables are the following:
321
313
322
314
Below is an example of an absolute path and how it behaves depending on the variable:
323
315
324
-
absolute path: /home/anyuser/current/file.py
316
+
absolute path: `/home/anyuser/current/file.py`
325
317
326
-
-`file` = /home/anyuser/current/file.py
327
-
-`fileName` = file.py
328
-
-`fileNameWithoutExt` = file
329
-
-`dir` = /home/anyuser/current
318
+
-`file` = `/home/anyuser/current/file.py`
319
+
-`fileName` = `file.py`
320
+
-`fileNameWithoutExt` = `file`
321
+
-`dir` = `/home/anyuser/current`
330
322
331
323
Remember that if you don't want to use variables you can use vim [filename-modifiers](http://vimdoc.sourceforge.net/htmldoc/cmdline.html#filename-modifiers)
@@ -388,47 +380,46 @@ The file should look like this(the default file does not exist create it with th
388
380
#### Configure with lua files
389
381
390
382
```lua
391
-
..... moreconfig .....
392
-
project= {
393
-
["~/python/intel_2021_1"] = {
394
-
name="Intel Course 2021",
395
-
description="Simple python project",
396
-
file_name="POO/main.py"
397
-
},
398
-
["~/deno/example"] = {
399
-
name="ExapleDeno",
400
-
description="Project with deno using other command",
401
-
file_name="http/main.ts",
402
-
command="deno run --allow-net"
403
-
},
404
-
["~/cpp/example"] = {
405
-
name="ExapleCpp",
406
-
description="Project with make file",
407
-
command="make buid && cd buid/ && ./compiled_file"
408
-
}
383
+
--..... more config .....
384
+
project= {
385
+
["~/python/intel_2021_1"] = {
386
+
name="Intel Course 2021",
387
+
description="Simple python project",
388
+
file_name="POO/main.py"
389
+
},
390
+
["~/deno/example"] = {
391
+
name="ExapleDeno",
392
+
description="Project with deno using other command",
393
+
file_name="http/main.ts",
394
+
command="deno run --allow-net"
395
+
},
396
+
["~/cpp/example"] = {
397
+
name="ExapleCpp",
398
+
description="Project with make file",
399
+
command="make buid && cd buid/ && ./compiled_file"
400
+
}
409
401
},
410
-
..... moreconfig .....
411
-
}
402
+
-- ..... more config .....
412
403
```
413
404
414
405
There are 3 main ways to configure the execution of a project (found in the example.)
415
406
416
407
1. Use the default command defined in the filetypes file (see `:CRFiletype`or check your confi lua). In order to do that it is necessary to define file_name.
417
-
418
408
2. Use a different command than the one set in `CRFiletype` or your config lua. In this case, the file_name and command must be provided.
419
-
420
409
3. Use a command to run the project. It is only necessary to define command(You do not need to write navigate to the root of the project, because automatically the plugin is located in the root of the project).
421
410
422
411
Note: Don't forget to name your projects because if you don't do so code runner will fail as it uses the name for the buffer name
423
412
424
413
#### Projects parameters
425
414
415
+
> **Warning**
416
+
> Avoid using all the parameters at the same time. The correct way to use them is shown in the example and described above.
417
+
426
418
-`name`: Project name
427
419
-`description`: Project description
428
420
-`file_name`: Filename relative to root path
429
421
-`command`: Command to run the project. It is possible to use variables exactly the same as we would in `CRFiletype`
430
422
431
-
warning! : Avoid using all the parameters at the same time. The correct way to use them is shown in the example and described above.
432
423
433
424
### Queries
434
425
@@ -466,9 +457,7 @@ For unknown reasons, leaving a comma in the trailing element in any json file ca
466
457
# Inspirations and thanks
467
458
468
459
- The idea of this project comes from the vscode plugin [code_runner](https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner) You can even copy your configuration and pass it to this plugin, as they are the same in the way of defining commands associated with [filetypes](https://github.com/CRAG666/code_runner.nvim#add-support-for-more-file-types)
469
-
470
460
-[jaq-nvim](https://github.com/is0n/jaq-nvim) some ideas of how to execute commands were taken from this plugin, thank you very much.
471
-
472
461
-[FTerm.nvim](https://github.com/numToStr/FTerm.nvim) Much of how this README.md is structured was blatantly stolen from this plugin, thank you very much
473
462
474
463
- Thanks to all current and future collaborators, without their contributions this plugin would not be what it is today
@@ -485,9 +474,8 @@ For unknown reasons, leaving a comma in the trailing element in any json file ca
485
474
486
475
Your help is needed to make this plugin the best of its kind, be free to contribute, criticize (don't be soft) or contribute ideas. All PR's are welcome.
487
476
488
-
## :warning: Important!
489
-
490
-
If you have any ideas to improve this project, do not hesitate to make a request, if problems arise, try to solve them and publish them. Don't be so picky I did this in one afternoon
477
+
> **Note**
478
+
> If you have any ideas to improve this project, do not hesitate to make a request, if problems arise, try to solve them and publish them. Don't be so picky I did this in one afternoon
0 commit comments