diff --git a/docs/installation.md b/docs/installation.md index 3a4f1f5..0b45f9b 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -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 .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 `.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 = { - = { - ... - }, - terminal = { - ... - } - } +{ + "DarthMooMancer/Polydev", + opts = { + lua = { + project_root = "~/Projects/Lua", + keybinds = { + ["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({ - = { - ... + rust = { + project_root = "~/Projects/Rust", + keybinds = { + ["pb"] = "RustBuild", + ["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 = { + ["pb"] = "PythonPip", + ["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 = { + ["pb"] = "CBuild", + ["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, + }, +}) +``` +--- diff --git a/docs/setup.md b/docs/setup.md index 7b7945c..9b50681 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -84,17 +84,15 @@ require("Polydev"}.language.setup({ return { ... opts = { - = { - terminal = { - right_padding = 0, - bottom_padding = 0, - left_padding = 0, - top_padding = 0, - border = true, - number = true, - relativenumber = true, - scroll = true, - } + terminal = { + right_padding = 0, + bottom_padding = 0, + left_padding = 0, + top_padding = 0, + border = true, + number = true, + relativenumber = true, + 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,