Skip to content

Commit

Permalink
feat: no_underline option (#489)
Browse files Browse the repository at this point in the history
* feat: `no_underline` option

* docs: auto generate vimdoc

---------

Co-authored-by: mrtnvgr <[email protected]>
  • Loading branch information
mrtnvgr and mrtnvgr authored May 18, 2023
1 parent 57b421e commit 8338b02
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ require("catppuccin").setup({
},
no_italic = false, -- Force no italic
no_bold = false, -- Force no bold
no_underline = false, -- Force no underline
styles = {
comments = { "italic" },
conditionals = { "italic" },
Expand Down
8 changes: 1 addition & 7 deletions doc/catppuccin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Table of Contents *catppuccin-table-of-contents*
==============================================================================
1. Features *catppuccin-features*


- Supports both vim and neovim (Requires neovim <https://github.com/neovim/neovim/> >= 0.8 or vim <https://github.com/vim/vim> >= 9 compiled with lua <https://github.com/lua/lua> >= 5.1)
- Highly configurable with 4 different flavours and ability to create your own! <https://github.com/catppuccin/nvim/discussions/323>
- Compile <https://github.com/catppuccin/nvim#Compile> user config for fastest startuptime <https://www.reddit.com/r/neovim/comments/xxfpt3/catppuccinnvim_now_startup_in_1ms/>
Expand Down Expand Up @@ -95,6 +94,7 @@ options and settings.
},
no_italic = false, -- Force no italic
no_bold = false, -- Force no bold
no_underline = false, -- Force no underline
styles = {
comments = { "italic" },
conditionals = { "italic" },
Expand Down Expand Up @@ -134,7 +134,6 @@ GENERAL *catppuccin-configuration-general*

This settings are unrelated to any group and are independent.


- `background`: (Table) Match :set background=light/dark with :Catppuccin background.light/dark
- `term_colors`: (Boolean) if true, sets terminal colors (e.g. `g:terminal_color_0`).
- `transparent_background`: (Boolean) if true, disables setting the background color.
Expand All @@ -145,7 +144,6 @@ DIM INACTIVE *catppuccin-configuration-dim-inactive*
This setting manages the ability to dim the inactive splits/windows/buffers
displayed.


- `enabled`: (Boolean) if true, dims the background color of inactive window or buffer or split.
- `shade`: (string) sets the shade to apply to the inactive split or window or buffer.
- `percentage`: (number 0 < x < 1) percentage of the shade to apply to the inactive window, split or buffer.
Expand All @@ -155,7 +153,6 @@ STYLES *catppuccin-configuration-styles*

Handles the style of general hi groups (see `:h highlight-args`):


- `comments`: (Table) changed the style of the comments.
- `functions`: (Table) changed the style of the functions.
- `keywords`: (Table) changed the style of the keywords.
Expand Down Expand Up @@ -1033,13 +1030,11 @@ COLORS DOESN’T MATCH PREVIEW SCREENSHOTS*catppuccin-faq-colors-doesn’t-match
Catppuccin requires true color support AKA terminals support the full range of
16 million colors


- Supported: iterm2 (macOS), kitty, wezterm, alacritty, tmux, …

Full list of support terminals can be found here:
<https://github.com/termstandard/colors#truecolor-support-in-output-devices>


- Unsupported terminal: Terminal.app (macOS), Terminus, Terminology, …

Full list of Unsupported terminals can be found here:
Expand All @@ -1049,7 +1044,6 @@ Full list of Unsupported terminals can be found here:
==============================================================================
9. Thanks to *catppuccin-thanks-to*


- Pocco81 <https://github.com/Pocco81>
- nullchilly <https://github.com/nullchilly>

Expand Down
1 change: 1 addition & 0 deletions lua/catppuccin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ local M = {
},
no_italic = false,
no_bold = false,
no_underline = false,
styles = {
comments = { "italic" },
conditionals = { "italic" },
Expand Down
1 change: 1 addition & 0 deletions lua/catppuccin/lib/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ local h = vim.api.nvim_set_hl]],
color[style] = true
if O.no_italic and style == "italic" then color[style] = false end
if O.no_bold and style == "bold" then color[style] = false end
if O.no_underline and style == "underline" then color[style] = false end
end
end
color.style = nil
Expand Down
1 change: 1 addition & 0 deletions lua/catppuccin/lib/vim/compiler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ let g:colors_name = "catppuccin-%s"]],
for _, style in pairs(color.style) do
if O.no_italic and style == "italic" then style = nil end
if O.no_bold and style == "bold" then style = nil end
if O.no_underline and style == "underline" then style = nil end
if style then rstyle[#rstyle + 1] = style end
end
color.style = table.concat(rstyle, ",")
Expand Down
3 changes: 3 additions & 0 deletions vim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ globals:
O.no_bold:
type: bool
property: read-only
O.no_underline:
type: bool
property: read-only

O.styles.comments:
type: table
Expand Down

0 comments on commit 8338b02

Please sign in to comment.