Update to installation
This commit is contained in:
+114
-25
@@ -1,39 +1,128 @@
|
|||||||
# Installation
|
# 📦 Installation
|
||||||
!!! Polydev can be installed with any plugin installer or manually. These are just examples.
|
|
||||||
|
|
||||||
* Side note: A lot of the languages require a <project_name>.polydev file. If you dont have it in a language that needs it, it will error out and yell at you.
|
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.
|
||||||
|
|
||||||
## Lazyvim
|
> ⚠️ **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 😅).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🛌 Lazy.nvim
|
||||||
|
|
||||||
|
This is the **recommended** way if you're using [Lazy.nvim](https://github.com/folke/lazy.nvim):
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
return {
|
{
|
||||||
"DarthMooMancer/Polydev",
|
"DarthMooMancer/Polydev",
|
||||||
opts = {
|
opts = {
|
||||||
<language> = {
|
lua = {
|
||||||
...
|
project_root = "~/Projects/Lua",
|
||||||
},
|
keybinds = {
|
||||||
terminal = {
|
["<leader>pr"] = "LuaRun",
|
||||||
...
|
},
|
||||||
}
|
},
|
||||||
}
|
terminal = {
|
||||||
|
border = true,
|
||||||
|
number = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Mini.Deps
|
> ✅ Keep the `opts` key! It’s the modern way of setting up plugins in Lazy.
|
||||||
------------
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🧸 Mini.deps
|
||||||
|
|
||||||
|
For users of [mini.nvim](https://github.com/echasnovski/mini.nvim)'s dependency manager:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
MiniDeps.add({
|
MiniDeps.add({ source = "DarthMooMancer/Polydev" })
|
||||||
source = 'DarthMooMancer/Polydev',
|
|
||||||
})
|
|
||||||
|
|
||||||
require("Polydev").setup({
|
require("Polydev").setup({
|
||||||
<language> = {
|
rust = {
|
||||||
...
|
project_root = "~/Projects/Rust",
|
||||||
|
keybinds = {
|
||||||
|
["<leader>pb"] = "RustBuild",
|
||||||
|
["<leader>pr"] = "RustRun",
|
||||||
},
|
},
|
||||||
terminal = {
|
},
|
||||||
...
|
terminal = {
|
||||||
}
|
border = true,
|
||||||
|
number = true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📁 Packer.nvim
|
||||||
|
|
||||||
|
For fans of [Packer.nvim](https://github.com/wbthomason/packer.nvim):
|
||||||
|
|
||||||
|
```lua
|
||||||
|
use({
|
||||||
|
"DarthMooMancer/Polydev",
|
||||||
|
config = function()
|
||||||
|
require("Polydev").setup({
|
||||||
|
python = {
|
||||||
|
project_root = "~/Projects/Python",
|
||||||
|
keybinds = {
|
||||||
|
["<leader>pb"] = "PythonPip",
|
||||||
|
["<leader>pr"] = "PythonRun",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
terminal = {
|
||||||
|
relativenumber = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🔐 Vim-Plug (Classic)
|
||||||
|
|
||||||
|
Even if you're still using [vim-plug](https://github.com/junegunn/vim-plug), you’re covered:
|
||||||
|
|
||||||
|
```vim
|
||||||
|
Plug 'DarthMooMancer/Polydev'
|
||||||
|
|
||||||
|
lua << EOF
|
||||||
|
require("Polydev").setup({
|
||||||
|
c = {
|
||||||
|
project_root = "~/Projects/C",
|
||||||
|
keybinds = {
|
||||||
|
["<leader>pb"] = "CBuild",
|
||||||
|
["<leader>pr"] = "CRun",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
terminal = {
|
||||||
|
number = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
EOF
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🛠 Manual Install
|
||||||
|
|
||||||
|
Clone the repo into your `~/.config/nvim/lua` or any runtime path:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/DarthMooMancer/Polydev ~/.config/nvim/lua/Polydev
|
||||||
|
```
|
||||||
|
|
||||||
|
Then in your config:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
require("Polydev").setup({
|
||||||
|
terminal = {
|
||||||
|
border = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
```
|
||||||
|
---
|
||||||
|
|||||||
+10
-12
@@ -84,17 +84,15 @@ require("Polydev"}.language.setup({
|
|||||||
return {
|
return {
|
||||||
...
|
...
|
||||||
opts = {
|
opts = {
|
||||||
<language> = {
|
terminal = {
|
||||||
terminal = {
|
right_padding = 0,
|
||||||
right_padding = 0,
|
bottom_padding = 0,
|
||||||
bottom_padding = 0,
|
left_padding = 0,
|
||||||
left_padding = 0,
|
top_padding = 0,
|
||||||
top_padding = 0,
|
border = true,
|
||||||
border = true,
|
number = true,
|
||||||
number = true,
|
relativenumber = true,
|
||||||
relativenumber = true,
|
scroll = true,
|
||||||
scroll = true,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
...
|
...
|
||||||
@@ -105,7 +103,7 @@ return {
|
|||||||
|
|
||||||
```lua
|
```lua
|
||||||
-- These are just defaults, so no need to copy them
|
-- These are just defaults, so no need to copy them
|
||||||
require("Polydev").language.setup({
|
require("Polydev").setup({
|
||||||
terminal = {
|
terminal = {
|
||||||
right_padding = 0,
|
right_padding = 0,
|
||||||
bottom_padding = 0,
|
bottom_padding = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user