Updated language docs

This commit is contained in:
DarthMooMancer
2025-04-16 03:38:34 -04:00
parent 068a650e85
commit 29643fe1d5
5 changed files with 238 additions and 33 deletions
+41 -9
View File
@@ -1,19 +1,49 @@
## Key Notes
* Currently with the way I have it work, the first time you build a project, it will error out no matter what. Just rerun the build and then if there are errors it is most likely a you issue more than a me issue.
### C Setup for Polydev 🛠️
#### Key Notes ⚠️
> **Important**: The first time you build a project, it might throw an error. This is expected behavior. Simply rerun the build, and if errors persist, it may be an issue with your project setup rather than the plugin.
---
#### Keybinds 🎮
You can customize keybinds for your C projects with Polydev.
| Keybind | Action |
|---------------------|--------------------------------------------------|
| `<leader>pb` | Build all C files in the `src` directory |
| `<leader>pr` | Run `<Project_name>` in your build directory |
| `<leader>nh` | Create a new header file in the current project’s `src` folder |
#### Configuration Example:
## Keybinds
```lua
require("Polydev").c.setup({
keybinds = {
["<Esc>"] = "CloseTerminal" -- Closes terminal, esc by default.
["<leader>pb"] = "CBuild", -- Building all C Files in src directory in.
["<leader>pr"] = "CRun", -- Runs <Project_name> in your build directory
["<leader>nf"] = "NewCFile", -- Creates a new c file in the current project src folder
["<leader>nh"] = "NewCHeaderFile", -- Creates a new header file in the current project src folder
["<leader>pb"] = "CBuild", -- Build all C files in the src directory
["<leader>pr"] = "CRun", -- Run <Project_name> in your build directory
["<leader>nh"] = "NewCHeaderFile" -- Create a new header file in the current project’s src folder
}
})
```
## File Structure
---
#### File Structure 📂
This is the recommended file structure for your C projects using Polydev:
| Directory/File Path | Description |
|----------------------------|------------------------------------------------------|
| `CMakeLists.txt` | Configuration file for your project build |
| `src/` | Folder containing source files for the project |
| `main.c` | Main C file for the project |
| `*.c` | Additional C source files |
| `build/` | Folder where the build artifacts will be generated |
| `<project_name>.polydev` | Polydev metadata file (generated during build) |
| `include/` | Folder for header files |
| `*.h` | C header files |
#### Example Structure:
```md
Projects/
└── C/
@@ -27,3 +57,5 @@ Projects/
└── include/
└── *.h
```
---
+61
View File
@@ -0,0 +1,61 @@
### C Setup for Polydev 🛠️
#### Key Notes ⚠️
> **Important**: The first time you build a project, it might throw an error. This is expected behavior. Simply rerun the build, and if errors persist, it may be an issue with your project setup rather than the plugin.
---
#### Keybinds 🎮
You can customize keybinds for your C projects with Polydev.
| Keybind | Action |
|---------------------|--------------------------------------------------|
| `<leader>pb` | Build all C files in the `src` directory |
| `<leader>pr` | Run `<Project_name>` in your build directory |
| `<leader>nh` | Create a new header file in the current project’s `src` folder |
#### Configuration Example:
```lua
require("Polydev").c.setup({
keybinds = {
["<leader>pb"] = "CppBuild", -- Build all C files in the src directory
["<leader>pr"] = "CppRun", -- Run <Project_name> in your build directory
["<leader>nh"] = "NewCppHeaderFile" -- Create a new header file in the current project’s src folder
}
})
```
---
#### File Structure 📂
This is the recommended file structure for your C projects using Polydev:
| Directory/File Path | Description |
|----------------------------|------------------------------------------------------|
| `CMakeLists.txt` | Configuration file for your project build |
| `src/` | Folder containing source files for the project |
| `main.cpp` | Main Cpp file for the project |
| `*.cpp` | Additional Cpp source files |
| `build/` | Folder where the build artifacts will be generated |
| `<project_name>.polydev` | Polydev metadata file (generated during build) |
| `include/` | Folder for header files |
| `*.hpp` | Cpp header files |
#### Example Structure:
```md
Projects/
└── Cpp/
└── Project_Name/
├── CMakeLists.txt
├── src/
│ ├── main.cpp
│ └── *.cpp
├── build/
│ └── <project_name>.polydev
└── include/
└── *.hpp
```
---
+41 -6
View File
@@ -1,16 +1,49 @@
## Keybinds
### Java Setup for Polydev ☕️
#### Keybinds 🎮
You can customize the keybinds for your Java projects in Polydev.
| Keybind | Action |
|---------------------|-----------------------------------------------------|
| `<leader>pb` | Build all Java files in the `src` directory |
| `<leader>pr` | Run `Main.java` from the `out` folder in your project |
| `<leader>nf` | Create a new Java file in the `src` folder |
#### Configuration Example:
```lua
-- These are defaults, so no need to copy them
require("Polydev").java.setup({
keybinds = {
["<Esc>"] = "CloseTerminal" -- Closes terminal, esc by default.
["<leader>pb"] = "JavaBuild" -- Building all Java Files in src directory in.
["<leader>pr"] = "JavaRun" -- Runs Main.java in the out folder in your project_root
["<leader>nf"] = "NewJavaFile" -- Creates a new Java file in the current project src folder
["<leader>pb"] = "JavaBuild", -- Build all Java files in the src directory
["<leader>pr"] = "JavaRun", -- Run Main.java in the out folder
["<leader>nf"] = "NewJavaFile" -- Create a new Java file in the src folder
}
})
```
## File Structure
---
#### Java Features ✨
* **Java Build and Run**:
Polydev allows you to build all Java files in the `src` directory with the press of a keybind. Once built, you can run the project from the `out` folder, with the `Main.java` file executed automatically.
* **Project File Management**:
The plugin manages your Java project files efficiently, helping you quickly add new Java files to the `src` directory. It also ensures that your build and run processes are streamlined.
---
#### File Structure 📂
Here’s the recommended structure for your Java projects using Polydev:
| Directory/File Path | Description |
|----------------------------|------------------------------------------------------|
| `src/` | Contains the source code files, including `Main.java` |
| `build/` | Contains compiled `.class` files |
| `Main.java` | The main entry point of your Java project |
#### Example Structure:
```md
Projects/
@@ -21,3 +54,5 @@ Projects/
└── build/
└── *.class
```
---
+50 -8
View File
@@ -1,22 +1,64 @@
## Keybinds
### Lua Setup for Polydev 🐢
#### Key Notes ⚠️
* Polydev provides seamless integration with Lua projects, allowing you to easily run and manage Lua code.
* You must include a `<Project_name>.polydev` file in your project root directory for Polydev to recognize the project. Missing this file will lead to errors.
* The file structure should be organized to ensure smooth execution and functionality.
---
#### Keybinds 🎮
Below are the default keybinds for Lua projects using Polydev. You can adjust them to suit your personal preferences.
| Keybind | Action |
|---------------------|-------------------------------------------------|
| `<leader>pr` | Run the Lua project |
##### Configuration Example:
```lua
-- These are the defaults for lua
-- These are the defaults for Lua, adjust as needed
require("Polydev").lua.setup({
keybinds = {
["<Esc>"] = "CloseTerminal",
["<leader>pr"] = "LuaRun",
["<leader>nf"] = "NewLuaFile",
["<leader>pr"] = "LuaRun", -- Run the Lua project
}
})
```
## File Structure
---
#### Lua Features ✨
* **Run Lua Projects**:
Easily run your Lua project from within your terminal using the `<leader>pr` keybind. This automatically runs your `init.lua` or the entry point of your Lua code.
* **Create New Lua Files**:
With the `<leader>nf` keybind, you can quickly create new Lua files in the `src` directory, maintaining an organized project structure.
---
#### File Structure 📂
Here’s the suggested directory structure for your Lua projects with Polydev:
| Directory/File Path | Description |
|----------------------------|-----------------------------------------------------|
| `<Project_name>.polydev` | Project metadata file that Polydev uses for configuration |
| `lua/` | Directory containing the main Lua project files |
| `lua/<Project_name>/init.lua` | The main entry point for your Lua project |
##### Example File Structure:
```md
Projects/
└── Lua/
└── Project_Name/
├── <Project_name>.polydev
├── <Project_name>.polydev -- Polydev configuration file
└── lua/
└── Project_name/
└── init.lua
└── init.lua -- Main Lua file
```
---
+45 -10
View File
@@ -1,20 +1,54 @@
## Keybinds
### Python Setup for Polydev 🐍
#### Keybinds 🎮
You can easily customize the keybinds for your Python projects using Polydev.
| Keybind | Action |
|---------------------|---------------------------------------------------|
| `<leader>pr` | Run the Python project in your active terminal |
| `<leader>pb` | Install dependencies using pip |
#### Configuration Example:
```lua
require("Polydev").python.setup({
keybinds = {
["<Esc>"] = "CloseTerminal",
["<leader>pr"] = "PythonRun",
["<leader>nf"] = "NewPythonFile",
["<leader>pb"] = "PythonPip"
["<leader>pr"] = "PythonRun", -- Run the Python project
["<leader>pb"] = "PythonPip" -- Install dependencies using pip
}
})
```
## Python Features
* A feature that is added to the python language for this plugin is to be able to install dependencies with pip within the terminal. You can even update pip. Just type your dependency you want and boom it is installed or not depending on if python likes you.
* Each project with python creates a new virtual environment and automatically uses it so you dont have to worry, just install modules as you like.
---
#### Python Features 🚀
Here are some cool features available for Python projects using Polydev:
- **Automatic Virtual Environment Creation** 🔧
Each Python project automatically sets up and uses a new virtual environment. You don’t need to worry about environment management. Just install your dependencies with `pip` as needed.
- **Dependency Management with Pip** 📦
Need to install Python modules? Simply type the name of the module in the terminal, and Polydev will take care of the installation using `pip`. You can even update `pip` if required, ensuring smooth installation.
- **Effortless Dependency Handling** ⚡
You no longer need to manually activate or deactivate virtual environments. With Polydev, the environment is set up and activated automatically, simplifying your workflow.
---
#### File Structure 📂
Here’s the recommended structure for your Python projects using Polydev:
| Directory/File Path | Description |
|----------------------------|------------------------------------------------------|
| `requirements.txt` | File for listing project dependencies |
| `setup.py` | Python project setup file |
| `tests/` | Folder containing test files |
| `venv/` | Virtual environment folder |
| `main.py` | Main Python file for your project |
#### Example Structure:
## File Structure
```md
Projects/
└── Python/
@@ -24,5 +58,6 @@ Projects/
├── setup.py
├── tests/
└── venv/
```
---