diff --git a/docs/examples.md b/docs/examples.md index df57fb7..f02bf81 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -1,29 +1,29 @@ -### Lazyvim and Config +### Lazy and Config ```lua --- There is no need to copy this. This is an example and it consists of the defaults. This is a java example -require { - "DarthMooMancer/Polydev", - config = function() - require("Polydev").java.setup({ - project_root = "~/projects", - keybinds = { - [""] = "CloseTerminal", - ["jb"] = "JavaBuild", - ["jr"] = "JavaRun", - ["nf"] = "NewJavaFile", - ["np"] = "NewJavaProject", - }, - terminal = { - right_padding = 0, - bottom_padding = 0, - left_padding = 0, - top_padding = 0, - border = true, - number = true, - relativenumber = true, - scroll = true, - } - }) - end +-- There is no need to copy this. This is an example and it consists of the defaults. This is a c example +return { + 'DarthMooMancer/Polydev', + opts = { + c = { + build_attributes = "-DBUILD_SHARED_LIBS=OFF" + project_root = "~/Projects/C", + keybinds = { + [""] = "CloseTerminal", + ["pb"] = "CBuild", + ["pr"] = "CRun", + ["nh"] = "NewCHeaderFile", + }, + terminal = { + right_padding = 0, + bottom_padding = 0, + left_padding = 0, + top_padding = 0, + border = true, + number = true, + relativenumber = true, + scroll = true, + }, + } + } } ``` diff --git a/docs/setup.md b/docs/setup.md index 9053e80..61a6939 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -2,12 +2,27 @@ ## Project Name +### Without Lazy ```lua require("Polydev").language.setup({ - project_root = "~/Home/..." -- Default: ~/Projects/Language + project_root = "~/Home/..." -- Default: ~/Projects/Language }) ``` +### With Lazy +```lua +return { + ... + opts = { + = { + project_root = "~/Home/..." -- Default: ~/Projects/Language + + } + } + ... +} + +``` * You can change the default directory for the project. The project can be made from anywhere you want. * It will automatically make the new Root Directory, so you don't have to worry about making it. @@ -16,13 +31,13 @@ require("Polydev").language.setup({ * 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 = [ - [""] = "CloseTerminal", - ["pb"] = "languageBuild", - ["pr"] = "languageRun", - ["nf"] = "NewlanguageFile", -- such as .c files - ["nh"] = "Newlanguage_secondaryFile", -- such as .h files - } + keybinds = [ + [""] = "CloseTerminal", + ["pb"] = "languageBuild", + ["pr"] = "languageRun", + ["nf"] = "NewlanguageFile", -- such as .c files + ["nh"] = "Newlanguage_secondaryFile", -- such as .h files +} }) ``` @@ -42,15 +57,15 @@ require("Polydev"}.language.setup({ ```lua -- These are just defaults, so no need to copy them require("Polydev").language.setup({ - 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, + } }) ```