Update to installation
This commit is contained in:
+109
-20
@@ -1,39 +1,128 @@
|
||||
# Installation
|
||||
!!! Polydev can be installed with any plugin installer or manually. These are just examples.
|
||||
# 📦 Installation
|
||||
|
||||
* 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
|
||||
return {
|
||||
{
|
||||
"DarthMooMancer/Polydev",
|
||||
opts = {
|
||||
<language> = {
|
||||
...
|
||||
lua = {
|
||||
project_root = "~/Projects/Lua",
|
||||
keybinds = {
|
||||
["<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
|
||||
MiniDeps.add({
|
||||
source = 'DarthMooMancer/Polydev',
|
||||
})
|
||||
MiniDeps.add({ source = "DarthMooMancer/Polydev" })
|
||||
|
||||
require("Polydev").setup({
|
||||
<language> = {
|
||||
...
|
||||
rust = {
|
||||
project_root = "~/Projects/Rust",
|
||||
keybinds = {
|
||||
["<leader>pb"] = "RustBuild",
|
||||
["<leader>pr"] = "RustRun",
|
||||
},
|
||||
},
|
||||
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,
|
||||
},
|
||||
})
|
||||
```
|
||||
---
|
||||
|
||||
+1
-3
@@ -84,7 +84,6 @@ require("Polydev"}.language.setup({
|
||||
return {
|
||||
...
|
||||
opts = {
|
||||
<language> = {
|
||||
terminal = {
|
||||
right_padding = 0,
|
||||
bottom_padding = 0,
|
||||
@@ -96,7 +95,6 @@ return {
|
||||
scroll = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
...
|
||||
}
|
||||
```
|
||||
@@ -105,7 +103,7 @@ return {
|
||||
|
||||
```lua
|
||||
-- These are just defaults, so no need to copy them
|
||||
require("Polydev").language.setup({
|
||||
require("Polydev").setup({
|
||||
terminal = {
|
||||
right_padding = 0,
|
||||
bottom_padding = 0,
|
||||
|
||||
Reference in New Issue
Block a user