Skip to content

Commit

Permalink
feat: Add opts for highlight comment in italics
Browse files Browse the repository at this point in the history
  • Loading branch information
judaew committed Sep 16, 2023
1 parent 6ccaf0d commit 73a8625
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ require("ronny").setup({
hi_unfocus_window = false,
-- Highlight formatted @text (e.g., italic, strong) in yellow
-- in addition to font attributes to make the text more visible
hi_formatted_text = true
hi_formatted_text = true,
-- Highlight comment in italics
hi_comment_italic = true
}
})
```
Expand Down
6 changes: 6 additions & 0 deletions lua/ronny/colors.lua
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ monokai_original.LineNr = { fg="#8F908A", bg="#272822" }
monokai_original.NonText = { fg="#75715E", bg="NONE" }
monokai_original.SpecialKey = { fg="#75715E", bg="NONE" }

-- if: config.display.comment_italic
-- Highlight comment in italics
M.hi_comment_italic = {
Comment = { fg=syntax.Comment.fg, bg="NONE", italic=true }
}

-- if: config.display.only_CursorLineNr
-- Highlight only CursorLineNr
M.only_CursorLineNr = {
Expand Down
4 changes: 2 additions & 2 deletions lua/ronny/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ local M = {}

M = {
colors = colors,
-- TODO: italic comments
display = {
monokai_original = false,
only_CursorLineNr = true,
hi_relativenumber = false,
hi_unfocus_window = false,
hi_formatted_text = true
hi_formatted_text = true,
hi_comment_italic = true
},
plugins = {
treesitter = true,
Expand Down
1 change: 1 addition & 0 deletions lua/ronny/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function M.setup(user_config)
{ display.hi_formatted_text, colors.hi_formatted_text },
{ display.only_CursorLineNr, colors.only_CursorLineNr, { vim_options={"cursorline"}}},
{ display.hi_relativenumber, colors.hi_relativenumber, { vim_options={"relativenumber"}}},
{ display.hi_comment_italic, colors.hi_comment_italic },

{ plugins.treesitter, colors.treesitter },
{ plugins.telescope, colors.telescope },
Expand Down

0 comments on commit 73a8625

Please sign in to comment.