update README.md (#14)
This commit is contained in:
parent
08d2879f9b
commit
dfaf37d560
|
@ -0,0 +1,141 @@
|
|||
# Contributing to lualine.nvim
|
||||
|
||||
|
||||
### General
|
||||
|
||||
* 2 spaces
|
||||
* camelCase
|
||||
|
||||
### All contributions are very welcome but themes/ extensions require a lot of work on my part if not done properly so here's a guide on how to do them.
|
||||
|
||||
### Adding a theme
|
||||
|
||||
* refer to example below to see how themes are defined
|
||||
* take 4 screenshots showing a different vim modes (normal, insert, visual, replace)
|
||||
* add your theme with screenshots attached to [THEMES.md](./THEMES.md) while maintaining alphabetical order
|
||||
|
||||
<details>
|
||||
<summary><b>theme example</b></summary>
|
||||
|
||||
To create a custom theme you need to define a colorscheme for each of vim's modes. Each mode has a `fg` and `bg` field for every lualine section.
|
||||
This is really easy in lua. Here is and example of a gruvbox theme.
|
||||
|
||||
```lua
|
||||
local gruvbox = { }
|
||||
|
||||
local colors = {
|
||||
black = "#282828",
|
||||
white = '#ebdbb2',
|
||||
red = '#fb4934',
|
||||
green = '#b8bb26',
|
||||
blue = '#83a598',
|
||||
yellow = '#fe8019',
|
||||
|
||||
gray = '#a89984',
|
||||
darkgray = '#3c3836',
|
||||
|
||||
lightgray = '#504945',
|
||||
inactivegray = '#7c6f64',
|
||||
}
|
||||
|
||||
gruvbox.normal = {
|
||||
a = {
|
||||
bg = colors.gray,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.darkgray,
|
||||
fg = colors.gray
|
||||
}
|
||||
}
|
||||
|
||||
gruvbox.insert = {
|
||||
a = {
|
||||
bg = colors.blue,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gruvbox.visual = {
|
||||
a = {
|
||||
bg = colors.yellow,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.inactivegray,
|
||||
fg = colors.black
|
||||
},
|
||||
}
|
||||
|
||||
gruvbox.replace = {
|
||||
a = {
|
||||
bg = colors.red,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.black,
|
||||
fg = colors.white
|
||||
},
|
||||
}
|
||||
|
||||
gruvbox.command = {
|
||||
a = {
|
||||
bg = colors.green,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.inactivegray,
|
||||
fg = colors.black
|
||||
},
|
||||
}
|
||||
|
||||
gruvbox.terminal = gruvbox.normal
|
||||
|
||||
gruvbox.inactive = {
|
||||
a = {
|
||||
bg = colors.darkgray,
|
||||
fg = colors.gray,
|
||||
},
|
||||
b = {
|
||||
bg = colors.darkgray,
|
||||
fg = colors.gray,
|
||||
},
|
||||
c = {
|
||||
bg = colors.darkgray,
|
||||
fg = colors.gray
|
||||
},
|
||||
}
|
||||
|
||||
lualine.theme = gruvbox
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Adding an extension
|
||||
|
||||
* add your extension with screenshots attached to [EXTENSIONS.md](./EXTENSIONS.md) while maintaining alphabetical order
|
|
@ -0,0 +1,5 @@
|
|||
# Available extensions
|
||||
|
||||
### [fzf.vim](https://github.com/junegunn/fzf.vim)
|
||||
|
||||
![fzf](https://user-images.githubusercontent.com/41551030/103468293-e7b7ad80-4d57-11eb-9d16-a150f9dac4b7.png)
|
158
README.md
158
README.md
|
@ -2,14 +2,20 @@
|
|||
A blazing fast and easy to configure neovim statusline written in pure lua.
|
||||
|
||||
`lualine.nvim` requires neovim 0.5
|
||||
|
||||
## Contributing
|
||||
Please read [CONTRIBUTING.md](./CONTRIBUTING.md) before contributing.
|
||||
|
||||
## Screenshots
|
||||
Here is a preview of how lualine can look like.
|
||||
|
||||
![normal](./screenshots/normal.png)
|
||||
![normal](./screenshots/insert.png)
|
||||
![normal](./screenshots/visual.png)
|
||||
![normal](./screenshots/command.png)
|
||||
![normal](./screenshots/replace.png)
|
||||
![normal](https://user-images.githubusercontent.com/41551030/103467902-06b44080-4d54-11eb-89db-6d3bebf449fa.png)
|
||||
![insert](https://user-images.githubusercontent.com/41551030/103467914-1764b680-4d54-11eb-9e3d-528d3568dce7.png)
|
||||
![visual](https://user-images.githubusercontent.com/41551030/103467916-23507880-4d54-11eb-804e-5b1c4d6e3db3.png)
|
||||
![command](https://user-images.githubusercontent.com/41551030/103467919-2ba8b380-4d54-11eb-8585-6c667fd5082e.png)
|
||||
![replace](https://user-images.githubusercontent.com/41551030/103467925-32372b00-4d54-11eb-88d6-6d39c46854d8.png)
|
||||
|
||||
Screenshots of all available themes are listed in [THEMES.md](./THEMES.md)
|
||||
|
||||
## Performance compared to other plugins
|
||||
Unlike other statusline plugins lualine loads only defined components, nothing else.
|
||||
|
@ -61,15 +67,9 @@ lualine.status()
|
|||
lualine.theme = 'gruvbox'
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><b>Available themes</b></summary>
|
||||
All available themes are listed in [THEMES.md](./THEMES.md)
|
||||
|
||||
* gruvbox
|
||||
* dracula
|
||||
* onedark
|
||||
|
||||
Please create a pr if you managed to port a popular theme before me
|
||||
</details>
|
||||
Please create a pr if you managed to port a popular theme before me, [here is how to do it](./CONTRIBUTING.md).
|
||||
|
||||
### Changing separator in section
|
||||
Lualine defines a separator between components in given section, the default
|
||||
|
@ -149,13 +149,7 @@ By default no plugin extension are loaded to improve performance. If you are usi
|
|||
lualine.extensions = { 'fzf' }
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary><b>Available extensions</b></summary>
|
||||
|
||||
* fzf
|
||||
|
||||
Please create a pr if you managed to create an extension before me
|
||||
</details>
|
||||
All available extensions are listed in [EXTENSIONS.md](./EXTENSIONS.md)
|
||||
|
||||
### Full config example using [packer.nvim](https://github.com/wbthomason/packer.nvim)
|
||||
|
||||
|
@ -228,130 +222,6 @@ EOF
|
|||
```
|
||||
</details>
|
||||
|
||||
### Defining custom themes
|
||||
|
||||
|
||||
<details>
|
||||
<summary><b>Theme example</b></summary>
|
||||
|
||||
To create a custom theme you need to define a colorscheme for each of vim's modes. Each mode has a `fg` and `bg` field for every lualine section.
|
||||
This is really easy in lua. Here is and example of a gruvbox theme.
|
||||
|
||||
```lua
|
||||
local gruvbox = { }
|
||||
|
||||
local colors = {
|
||||
black = "#282828",
|
||||
white = '#ebdbb2',
|
||||
red = '#fb4934',
|
||||
green = '#b8bb26',
|
||||
blue = '#83a598',
|
||||
yellow = '#fe8019',
|
||||
|
||||
gray = '#a89984',
|
||||
darkgray = '#3c3836',
|
||||
|
||||
lightgray = '#504945',
|
||||
inactivegray = '#7c6f64',
|
||||
}
|
||||
|
||||
gruvbox.normal = {
|
||||
a = {
|
||||
bg = colors.gray,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.darkgray,
|
||||
fg = colors.gray
|
||||
}
|
||||
}
|
||||
|
||||
gruvbox.insert = {
|
||||
a = {
|
||||
bg = colors.blue,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
gruvbox.visual = {
|
||||
a = {
|
||||
bg = colors.yellow,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.inactivegray,
|
||||
fg = colors.black
|
||||
},
|
||||
}
|
||||
|
||||
gruvbox.replace = {
|
||||
a = {
|
||||
bg = colors.red,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.black,
|
||||
fg = colors.white
|
||||
},
|
||||
}
|
||||
|
||||
gruvbox.command = {
|
||||
a = {
|
||||
bg = colors.green,
|
||||
fg = colors.black,
|
||||
},
|
||||
b = {
|
||||
bg = colors.lightgray,
|
||||
fg = colors.white,
|
||||
},
|
||||
c = {
|
||||
bg = colors.inactivegray,
|
||||
fg = colors.black
|
||||
},
|
||||
}
|
||||
|
||||
gruvbox.terminal = gruvbox.normal
|
||||
|
||||
gruvbox.inactive = {
|
||||
a = {
|
||||
bg = colors.darkgray,
|
||||
fg = colors.gray,
|
||||
},
|
||||
b = {
|
||||
bg = colors.darkgray,
|
||||
fg = colors.gray,
|
||||
},
|
||||
c = {
|
||||
bg = colors.darkgray,
|
||||
fg = colors.gray
|
||||
},
|
||||
}
|
||||
|
||||
lualine.theme = gruvbox
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## TODO's
|
||||
Please create an issue/ pr if you want to see more functionality implemented
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
# Available themes
|
||||
|
||||
All available themes are only best effort ports by myself/ other users. If you find a theme to be weird/ wrong please open an issue/ pr.
|
||||
|
||||
### dracula
|
||||
![normal](https://user-images.githubusercontent.com/41551030/103468233-2d27ab00-4d57-11eb-8f3c-36426dd2f053.png)
|
||||
![insert](https://user-images.githubusercontent.com/41551030/103468255-49c3e300-4d57-11eb-9e7a-2df1bf047465.png)
|
||||
![visual](https://user-images.githubusercontent.com/41551030/103468264-652eee00-4d57-11eb-8ec8-e433cb396a63.png)
|
||||
![replace](https://user-images.githubusercontent.com/41551030/103468272-88f23400-4d57-11eb-93fe-c3715f1bc335.png)
|
||||
|
||||
### gruvbox
|
||||
![normal](https://user-images.githubusercontent.com/41551030/103467902-06b44080-4d54-11eb-89db-6d3bebf449fa.png)
|
||||
![insert](https://user-images.githubusercontent.com/41551030/103467914-1764b680-4d54-11eb-9e3d-528d3568dce7.png)
|
||||
![visual](https://user-images.githubusercontent.com/41551030/103467916-23507880-4d54-11eb-804e-5b1c4d6e3db3.png)
|
||||
![command](https://user-images.githubusercontent.com/41551030/103467919-2ba8b380-4d54-11eb-8585-6c667fd5082e.png)
|
||||
![replace](https://user-images.githubusercontent.com/41551030/103467925-32372b00-4d54-11eb-88d6-6d39c46854d8.png)
|
||||
|
||||
### onedark
|
||||
![normal](https://user-images.githubusercontent.com/41551030/103468158-a83c9180-4d56-11eb-89cb-28d802f02341.png)
|
||||
![insert](https://user-images.githubusercontent.com/41551030/103468174-cdc99b00-4d56-11eb-8723-fd817ff06404.png)
|
||||
![visual](https://user-images.githubusercontent.com/41551030/103468184-ea65d300-4d56-11eb-99e2-73cb649ab679.png)
|
||||
![replace](https://user-images.githubusercontent.com/41551030/103468213-07020b00-4d57-11eb-9b66-5061de556f44.png)
|
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Loading…
Reference in New Issue