Update to documentation, update with merging run and build commands, cleaned up and organized the project manager

This commit is contained in:
DarthMooMancer
2025-04-23 14:50:17 -04:00
parent 9db6059fb7
commit 534dc2819e
13 changed files with 278 additions and 137 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ Modern development often involves juggling multiple languages. Setting up simila
- 🌐 **Language Support**: Define custom settings per language including `project_root`, `keybinds`, and `build_attributes`.
- 🪟 **Floating Terminals**: Run builds and executions in a Neovim floating terminal.
- 🧱 **Scaffolding**: Automatically create the appropriate directory and file layout for new projects.
- 🎹 **Keybind Mapping**: Rebind keys to execute project-specific commands like `Build`, `Run`, or `Test`.
- 🎹 **Keybind Mapping**: Rebind keys to execute project-specific commands like `Run`, or `Test`.
- 🔌 **Pluggable**: Designed to easily integrate with other tools or extend with your own commands and language presets.
## 👥 Target Audience
@@ -46,7 +46,7 @@ Say you're a developer who works with Rust, Lua, and Python. Instead of remember
1. 🏗 Sets up your directory based on language conventions.
2. 📄 Generates boilerplate files.
3. 🎛 Maps `<leader>pr` to `Run`, `<leader>pb` to `Build`, and so on.
3. 🎛 Maps `<leader>pr` to `Run`, `<leader>po` to `Open Polydev Project Manager`, and so on.
4. 🖥 Opens a floating terminal to show your output.
## 🏷 Versioning
+6 -7
View File
@@ -3,22 +3,25 @@
Polydev can be installed using any plugin manager of your choice—or even manually. Below are some examples for popular managers to get you started.
> ⚠️ **Disclaimer**: The `opts` and configuration values shown below are simply examples. You can customize them based on your preferences or even omit them entirely if not needed.
> 💡 **Heads up!** Many language presets in Polydev require a file named `<project_name>.polydev` in your project root. If it's missing, Polydev will let you know (loudly 😅).
> **Note**: Languages that require to build just need to be run, building is builtin to the run command
---
## 🛌 Lazy.nvim
This is the **recommended** way if you're using [Lazy.nvim](https://github.com/folke/lazy.nvim):
> This is the **recommended** way if you're using [Lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
{
return {
"DarthMooMancer/Polydev",
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim"
},
opts = {
opts = { -- Below are just example values
lua = {
project_root = "~/Projects/Lua",
keybinds = {
@@ -33,8 +36,6 @@ This is the **recommended** way if you're using [Lazy.nvim](https://github.com/f
}
```
> ✅ Keep the `opts` key! It’s the modern way of setting up plugins in Lazy.
---
## 🧸 Mini.deps
@@ -54,7 +55,6 @@ require("Polydev").setup({
rust = {
project_root = "~/Projects/Rust",
keybinds = {
["<leader>pb"] = "RustBuild",
["<leader>pr"] = "RustRun",
},
},
@@ -111,7 +111,6 @@ require("Polydev").setup({
c = {
project_root = "~/Projects/C",
keybinds = {
["<leader>pb"] = "CBuild",
["<leader>pr"] = "CRun",
},
},
-2
View File
@@ -10,7 +10,6 @@ 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 |
@@ -19,7 +18,6 @@ You can customize keybinds for your C projects with Polydev.
```lua
require("Polydev").c.setup({
keybinds = {
["<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
}
-2
View File
@@ -10,7 +10,6 @@ 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 |
@@ -19,7 +18,6 @@ You can customize keybinds for your C projects with Polydev.
```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
}
-2
View File
@@ -5,7 +5,6 @@ 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 |
@@ -15,7 +14,6 @@ You can customize the keybinds for your Java projects in Polydev.
-- These are defaults, so no need to copy them
require("Polydev").java.setup({
keybinds = {
["<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
}
+20 -22
View File
@@ -1,7 +1,19 @@
# Setup and Customizing Polydev
## Project Manager
Follows the netrw keybinds and allows for project management all in one spot
> Note: The project manager closely follows the netrw keybinds and allows for project management all in one spot
| Binding | Description |
|------------------|-----------------|
| **Enter** | `Open file / Enter directory` |
| **../** | `Go to parent directory` |
| **/** | `Filter (fuzzy search)` |
| **a** | `Create new folder` |
| **%** | `Create new file` |
| **d** | `Create new project` |
| **R** | `Rename file/folder` |
| **D** | `Delete file/folder` |
| **q** | `Quit popup` |
## 🔧 Project Name Customization
You can easily customize the default directory for your project! The project can be created from any directory, and Polydev will automatically create the required project root directory for you.
@@ -37,8 +49,8 @@ Polydev allows you to easily manage keybinds, providing a uniform way to interac
### Keybind Categories
| Keybind Type | Description |
|-------------------|--------------------------------------------------|
| **Universal** | Cannot be changed through specific language settings (e.g., `<leader>nf` for a new file). |
| **Per-language** | Can be customized per language (e.g., `<leader>pb` for language build). |
| **Universal** | Cannot be changed through specific language settings (e.g., `<leader>po` for project manager). |
| **Per-language** | Can be customized per language (e.g., `<leader>pr` for language run). |
### LazyVim Example
@@ -47,10 +59,9 @@ return {
...
opts = {
<language> = {
["<leader>pb"] = "languageBuild", -- Per-language
["<leader>pr"] = "languageRun", -- Per-language
["<leader>nh"] = "NewLanguageSecondaryFile", -- Universal
["<leader>po"] = "OpenSmartTable", -- Universal
["<leader>po"] = "PolydevManager", -- Universal
}
}
...
@@ -62,10 +73,9 @@ return {
```lua
require("Polydev").language.setup({
keybinds = {
["<leader>pb"] = "languageBuild", -- Per-language
["<leader>pr"] = "languageRun", -- Per-language
["<leader>nh"] = "NewLanguageSecondaryFile", -- Universal
["<leader>po"] = "OpenSmartTable", -- Universal
["<leader>po"] = "PolydevManager", -- Universal
}
})
```
@@ -78,11 +88,7 @@ You can further tweak the terminal settings to suit your preferences! These opti
### Available Terminal Settings
| Setting | Default Value | Description |
|------------------|-----------------|---------------------------------------------------------|
| **presets** | `centered` | Presets for where the terminal is placed in the buffer |
| **right_padding** | `0` | Padding for the right width of the terminal. |
| **left_padding** | `0` | Padding for the left width of the terminal. |
| **top_padding** | `0` | Padding for the top height of the terminal. |
| **bottom_padding**| `0` | Padding for the bottom height of the terminal. |
| **presets** | `center` | Presets for where the terminal is placed in the buffer |
| **border** | `true` | Adds a rounded border to the window. |
| **number** | `true` | Displays line numbers in the terminal. |
| **relativenumber**| `true` | Displays relative numbers based on cursor position. |
@@ -106,11 +112,7 @@ return {
...
opts = {
terminal = {
presets = "centered"
right_padding = 0,
bottom_padding = 0,
left_padding = 0,
top_padding = 0,
presets = "center"
border = true,
number = true,
relativenumber = true,
@@ -126,11 +128,7 @@ return {
```lua
require("Polydev").setup({
terminal = {
presets = "centered"
right_padding = 0,
bottom_padding = 0,
left_padding = 0,
top_padding = 0,
presets = "center"
border = true,
number = true,
relativenumber = true,