jellydn / jellydn/quick-code-runner.nvim
Feature Request: ability to add prepend/append code
- Dominant language
- Lua
- Stars
- 25
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
I.e for running C or C++ or D code i'd have to prepend and append some code before running it
For C it'd be something like
```c
#include
int main() {
// SELECTED CODE GOES HERE
return 0;
}
```
For C++ it'd be something like
```cpp
#include
int main() {
// SELECTED CODE GOES HERE
return 0;
}
```
For D it'd be something like
```d
/+ dub.sdl:
name "test"
+/
import std;
void main() {
// SELECTED CODE GOES HERE
}
```
So possibly allow in file_types to have definition of something like file_template, i.e
```lua
opts = {
file_types = {
d = {
cmd = "dub run --single",
file_template = '/+ dub.sdl:\nname "test"\n+/\nimport std;\nvoid main() {\n${CODE}\n}\n'
}
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.