Update setup.md to use proper lazy config and update proper configs
This commit is contained in:
+65
-18
@@ -1,15 +1,10 @@
|
|||||||
# Setup and Customizing
|
# Setup and Customizing
|
||||||
|
|
||||||
## Project Name
|
## Project Name
|
||||||
|
* 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.
|
||||||
|
|
||||||
### Without Lazy
|
### Lazy
|
||||||
```lua
|
|
||||||
require("Polydev").language.setup({
|
|
||||||
project_root = "~/Home/..." -- Default: ~/Projects/Language
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
### With Lazy
|
|
||||||
```lua
|
```lua
|
||||||
return {
|
return {
|
||||||
...
|
...
|
||||||
@@ -21,27 +16,55 @@ return {
|
|||||||
}
|
}
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
* 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.
|
### Others
|
||||||
|
```lua
|
||||||
|
require("Polydev").language.setup({
|
||||||
|
project_root = "~/Home/..." -- Default: ~/Projects/Language
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
## Keybinds
|
## Keybinds
|
||||||
* Every language has the same keybinds so it is easy to remember keybinds and not have to remember thousands of keybinds.
|
* Every language has the almost 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.
|
* Some languages have separate functions (python has a pip keybind for example) adding more keybinds
|
||||||
|
|
||||||
|
Key/
|
||||||
|
├── *Universal, cannot be changed through specific language settings
|
||||||
|
└── *Per-language, can be changed separately by language if wanted
|
||||||
|
|
||||||
|
### Lazy
|
||||||
|
```lua
|
||||||
|
return {
|
||||||
|
...
|
||||||
|
opts = {
|
||||||
|
<language> = {
|
||||||
|
["<Esc>"] = "CloseTerminal", -- Planned to be *Universal -- However can be changed per language for now
|
||||||
|
["<leader>pb"] = "languageBuild", -- *Per-language
|
||||||
|
["<leader>pr"] = "languageRun", -- *Per-language
|
||||||
|
["<leader>nf"] = "NewLanguageFile", --*Universal -- such as .c files
|
||||||
|
["<leader>nh"] = "NewLanguageSecondaryFile", --*Universal -- such as .h files
|
||||||
|
}
|
||||||
|
}
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Others
|
||||||
```lua
|
```lua
|
||||||
require("Polydev"}.language.setup({
|
require("Polydev"}.language.setup({
|
||||||
keybinds = [
|
keybinds = [
|
||||||
["<Esc>"] = "CloseTerminal",
|
["<Esc>"] = "CloseTerminal", -- Planned to be *Universal -- However can be changed per language for now
|
||||||
["<leader>pb"] = "languageBuild",
|
["<leader>pb"] = "languageBuild", -- *Per-language
|
||||||
["<leader>pr"] = "languageRun",
|
["<leader>pr"] = "languageRun", -- *Per-language
|
||||||
["<leader>nf"] = "NewlanguageFile", -- such as .c files
|
["<leader>nf"] = "NewLanguageFile", --*Universal -- such as .c files
|
||||||
["<leader>nh"] = "Newlanguage_secondaryFile", -- such as .h files
|
["<leader>nh"] = "NewLanguageSecondaryFile", --*Universal -- such as .h files
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
## Terminal
|
## Terminal
|
||||||
|
!!! I plan on making the terminal settings a global setting instead of language specific, just need to figure out how
|
||||||
* 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
|
||||||
- Each is set to 0 by default
|
- Each is set to 0 by default
|
||||||
* **_right_padding:_** Padding for the right width of the terminal
|
* **_right_padding:_** Padding for the right width of the terminal
|
||||||
@@ -54,6 +77,30 @@ require("Polydev"}.language.setup({
|
|||||||
* **_relativenumber:_** Relative numbers indicate distances from the cursor, only works if number is enabled
|
* **_relativenumber:_** Relative numbers indicate distances from the cursor, only works if number is enabled
|
||||||
* **_scroll:_** Allows scrolling in terminal
|
* **_scroll:_** Allows scrolling in terminal
|
||||||
|
|
||||||
|
### Lazy
|
||||||
|
```lua
|
||||||
|
return {
|
||||||
|
...
|
||||||
|
opts = {
|
||||||
|
<language> = {
|
||||||
|
terminal = {
|
||||||
|
right_padding = 0,
|
||||||
|
bottom_padding = 0,
|
||||||
|
left_padding = 0,
|
||||||
|
top_padding = 0,
|
||||||
|
border = true,
|
||||||
|
number = true,
|
||||||
|
relativenumber = true,
|
||||||
|
scroll = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Others
|
||||||
|
|
||||||
```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").language.setup({
|
||||||
|
|||||||
Reference in New Issue
Block a user