This commit is contained in:
DarthMooMancer
2025-03-14 01:27:42 -04:00
6 changed files with 33 additions and 17 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
### Lazyvim and Config ### Lazyvim and Config
```lua ```lua
-- There is no need to copy this. This is an example and it consists of the defaults. This is a Java example. -- There is no need to copy this. This is an example and it consists of the defaults. This is a java example
require { require {
"DarthMooMancer/Polydev", "DarthMooMancer/Polydev",
config = function() config = function()
require("Polydev").language.setup({ require("Polydev").java.setup({
project_root = "~/projects", project_root = "~/projects",
keybinds = { keybinds = {
["<Esc>"] = "CloseTerminal", ["<Esc>"] = "CloseTerminal",
+2 -1
View File
@@ -3,9 +3,10 @@
![Polydev](https://github.com/user-attachments/assets/46921f55-39f6-453a-8020-d556f44a10c6) ![Polydev](https://github.com/user-attachments/assets/46921f55-39f6-453a-8020-d556f44a10c6)
---- ----
### What is Polydev? ### What is Polydev?
Polydev is a simple plugin that gives neovim some nice functions while being extremely extensible for developers. Are there better plugins? Most likely, however this has simple functions for: Polydev is a simple plugin that gives neovim some nice functions while being extremely extensible for developers. It automatically detects your language and enables the module for that language. It is a standalone plugin that has no dependencies aside from getting file types. Below are a few features that are currently implemented:
* Creating New Projects * Creating New Projects
* Creating New Files * Creating New Files
* Building Files * Building Files
* Running Files * Running Files
* Builtin Terminal
+8 -2
View File
@@ -8,7 +8,10 @@
require { require {
"DarthMooMancer/Polydev", "DarthMooMancer/Polydev",
config = function() config = function()
require("Polydev").language.setup() require("Polydev").setup()
--require("Polydev").language.setup({
-- configs
--})
end end
} }
``` ```
@@ -20,5 +23,8 @@ MiniDeps.add({
source = 'DarthMooMancer/Polydev', source = 'DarthMooMancer/Polydev',
}) })
require("Polydev").language.setup() require("Polydev").setup()
--require("Polydev").language.setup({
-- configs
--})
``` ```
+4 -6
View File
@@ -6,11 +6,9 @@
require("Polydev").c.setup({ require("Polydev").c.setup({
keybinds = { keybinds = {
["<Esc>"] = "CloseTerminal" -- Closes terminal, esc by default. ["<Esc>"] = "CloseTerminal" -- Closes terminal, esc by default.
["<leader>cb"] = "CBuild", -- Building all C Files in src directory in. ["<leader>pb"] = "CBuild", -- Building all C Files in src directory in.
["<leader>cr"] = "CRun", -- Runs <Project_name> in your build directory ["<leader>pr"] = "CRun", -- Runs <Project_name> in your build directory
["<leader>cnf"] = "NewCFile", -- Creates a new c file in the current project src folder ["<leader>nf"] = "NewCFile", -- Creates a new c file in the current project src folder
["<leader>cnp"] = "NewCHeaderFile", -- Creates a new header file in the current project src folder ["<leader>nh"] = "NewCHeaderFile", -- Creates a new header file in the current project src folder
["<leader>cnh"] = "NewCProject", -- Creates a new project in the project directory in the config, defaults to ~/Projects/C unless project_root is set
},
}) })
``` ```
+4 -5
View File
@@ -3,11 +3,10 @@
-- These are defaults, so no need to copy them -- These are defaults, so no need to copy them
require("Polydev").java.setup({ require("Polydev").java.setup({
keybinds = { keybinds = {
["<leader>jb"] = "JavaBuild" -- Building all Java Files in src directory in. ["<Esc>"] = "CloseTerminal" -- Closes terminal, esc by default.
["<leader>jr"] = "JavaRun" -- Runs Main.java in the out folder in your project_root ["<leader>pb"] = "JavaBuild" -- Building all Java Files in src directory in.
["<leader>jnf"] = "NewJavaFile" -- Creates a new Java file in the current project src folder ["<leader>pr"] = "JavaRun" -- Runs Main.java in the out folder in your project_root
["<leader>jnp"] = "NewJavaProject" -- Creates a new project in the project directory in the config, defaults to ~/Projects unless project_root is set ["<leader>nf"] = "NewJavaFile" -- Creates a new Java file in the current project src folder
["<Esc>"] = "CloseTerminal" -- Closes terminal, esc by default.
} }
}) })
``` ```
+13 -1
View File
@@ -12,7 +12,19 @@ require("Polydev").language.setup({
* It will automatically make the new Root Directory, so you don't have to worry about making it. * It will automatically make the new Root Directory, so you don't have to worry about making it.
## Keybinds ## Keybinds
* Keybinds are different for each language, but each one can be changed. Look at the language you want to change for keybind documentation. * Every language has the same keybinds so it is easy to remember keybinds and not have to remember thousands of keybinds.
* The only keybind that doesnt change no matter what happens is creating a new project. Enter the language you want, then enter the project name and boom! new project.
```lua
require("Polydev"}.language.setup({
keybinds = [
["<Esc>"] = "CloseTerminal",
["<leader>pb"] = "languageBuild",
["<leader>pr"] = "languageRun",
["<leader>nf"] = "NewlanguageFile", -- such as .c files
["<leader>nh"] = "Newlanguage_secondaryFile", -- such as .h files
}
})
```
## Terminal ## Terminal
* The terminal has a couple of options that can be customized and with more to come * The terminal has a couple of options that can be customized and with more to come