Skip to content

Commit 1e878e1

Browse files
authored
Merge branch 'Mofiqul:main' into main
2 parents b594afe + cb9df08 commit 1e878e1

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ vscode.nvim (formerly `codedark.nvim`) is a Lua port of [vim-code-dark](https://
2525
- [nvim-dap-ui](https://github.com/rcarriga/nvim-dap-ui)
2626
- [vim-illuminate](https://github.com/RRethy/vim-illuminate)
2727
- [rainbow-delimiters](https://gitlab.com/HiPhish/rainbow-delimiters.nvim)
28+
- [which-key](https://github.com/folke/which-key.nvim)
29+
- [Snacks.indent](https://github.com/folke/snacks.nvim/blob/main/docs/indent.md)
2830

2931
## ⬇️ Installation
3032

@@ -84,6 +86,9 @@ require('vscode').setup({
8486
-- Enable italic comment
8587
italic_comments = true,
8688

89+
-- Enable italic inlay type hints
90+
italic_inlayhints = true,
91+
8792
-- Underline `@markup.link.*` variants
8893
underline_links = true,
8994

lua/vscode/config.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local config = {}
33
local defaults = {
44
transparent = false,
55
italic_comments = false,
6+
italic_inlayhints = false,
67
underline_links = false,
78
color_overrides = {},
89
group_overrides = {},
@@ -18,6 +19,7 @@ config.setup = function(user_opts)
1819
local global_settings_opts = vim.tbl_extend('force', defaults, {
1920
transparent = (vim.g.vscode_transparent == true or vim.g.vscode_transparent == 1),
2021
italic_comments = (vim.g.vscode_italic_comment == true or vim.g.vscode_italic_comment == 1),
22+
italic_inlayhints = (vim.g.vscode_italic_inlayhints == true or vim.g.vscode_italic_inlayhints == 1),
2123
underline_links = (vim.g.vscode_underline_links == true or vim.g.vscode_underline_links == 1),
2224
disable_nvimtree_bg = (vim.g.vscode_disable_nvim_tree_bg == true or vim.g.vscode_disable_nvim_tree_bg == 1),
2325
})

lua/vscode/theme.lua

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ theme.set_highlights = function(opts)
4848
hl(0, 'Title', { fg = c.vscNone, bg = c.vscNone, bold = true })
4949
hl(0, 'Visual', { fg = c.vscNone, bg = c.vscSelection })
5050
hl(0, 'VisualNOS', { fg = c.vscNone, bg = c.vscSelection })
51-
hl(0, 'WarningMsg', { fg = c.vscRed, bg = c.vscBack, bold = true })
51+
hl(0, 'WarningMsg', { fg = c.vscYellow, bg = c.vscBack })
5252
hl(0, 'WildMenu', { fg = c.vscNone, bg = c.vscSelection })
5353
hl(0, 'Comment', { fg = c.vscGreen, bg = 'NONE', italic = opts.italic_comments })
5454
hl(0, 'Constant', { fg = c.vscBlue, bg = 'NONE' })
@@ -151,6 +151,12 @@ theme.set_highlights = function(opts)
151151
hl(0, '@markup.underline', { fg = c.vscYellowOrange, bg = 'NONE', underline = true })
152152
hl(0, '@markup.strikethrough', { fg = c.vscFront, bg = 'NONE', strikethrough = true })
153153
hl(0, '@markup.heading', { fg = isDark and c.vscBlue or c.vscYellowOrange, bold = true })
154+
hl(0, '@markup.heading.1.markdown', { fg = c.vscBlue, bg = "NONE", bold = true })
155+
hl(0, '@markup.heading.2.markdown', { fg = c.vscOrange, bg = "NONE", bold = true })
156+
hl(0, '@markup.heading.3.markdown', { fg = c.vscYellow, bg = "NONE", bold = true })
157+
hl(0, '@markup.heading.4.markdown', { fg = c.vscGreen, bg = "NONE", bold = true })
158+
hl(0, '@markup.heading.5.markdown', { fg = c.vscBlue, bg = "NONE", bold = true })
159+
hl(0, '@markup.heading.6.markdown', { fg = c.vscPink, bg = "NONE", bold = true })
154160
hl(0, '@markup.raw', { fg = c.vscFront, bg = 'NONE' })
155161
hl(0, '@markup.raw.markdown', { fg = c.vscOrange, bg = 'NONE' })
156162
hl(0, '@markup.raw.markdown_inline', { fg = c.vscOrange, bg = 'NONE' })
@@ -197,6 +203,18 @@ theme.set_highlights = function(opts)
197203
hl(0, 'markdownUrl', { fg = c.vscFront, bg = 'NONE', underline = true })
198204
hl(0, 'markdownLinkText', { fg = isDark and c.vscOrange or c.vscYellowOrange })
199205
hl(0, 'markdownEscape', { fg = isDark and c.vscOrange or c.vscYellowOrange })
206+
hl(0, 'RenderMarkdownH1', { fg = c.vscBlue, bold = true })
207+
hl(0, 'RenderMarkdownH2', { fg = c.vscOrange, bold = true })
208+
hl(0, 'RenderMarkdownH3', { fg = c.vscYellow, bold = true })
209+
hl(0, 'RenderMarkdownH4', { fg = c.vscGreen, bold = true })
210+
hl(0, 'RenderMarkdownH5', { fg = c.vscBlue, bold = true })
211+
hl(0, 'RenderMarkdownH6', { fg = c.vscPink, bold = true })
212+
hl(0, 'RenderMarkdownH1Bg', { bg = c.vscPopupHighlightGray, bold = true })
213+
hl(0, 'RenderMarkdownH2Bg', { bg = c.vscPopupHighlightGray, bold = true })
214+
hl(0, 'RenderMarkdownH3Bg', { bg = c.vscPopupHighlightGray, bold = true })
215+
hl(0, 'RenderMarkdownH4Bg', { bg = c.vscPopupHighlightGray, bold = true })
216+
hl(0, 'RenderMarkdownH5Bg', { bg = c.vscPopupHighlightGray, bold = true })
217+
hl(0, 'RenderMarkdownH6Bg', { bg = c.vscPopupHighlightGray, bold = true })
200218

201219
-- Asciidoc
202220
hl(0, 'asciidocAttributeEntry', { fg = c.vscYellowOrange })
@@ -520,6 +538,10 @@ theme.set_highlights = function(opts)
520538
hl(0, 'IblWhitespace', { fg = c.vscContext, bg = 'NONE', nocombine = true })
521539
hl(0, 'IblScope', { fg = c.vscContextCurrent, bg = 'NONE', nocombine = true })
522540

541+
-- Snacks.indent
542+
hl(0, 'SnacksIndent', { fg = c.vscContext, bg = 'NONE', nocombine = true })
543+
hl(0, 'SnacksIndentScope', { fg = c.vscContextCurrent, bg = 'NONE', nocombine = true })
544+
523545
-- Neotest
524546
hl(0, 'NeotestAdapterName', { fg = c.vscFront, bold = true })
525547
hl(0, 'NeotestDir', { fg = c.vscBlue })
@@ -551,6 +573,7 @@ theme.set_highlights = function(opts)
551573
hl(0, 'LspReferenceText', { fg = 'NONE', bg = isDark and c.vscPopupHighlightGray or c.vscPopupHighlightLightBlue })
552574
hl(0, 'LspReferenceRead', { fg = 'NONE', bg = isDark and c.vscPopupHighlightGray or c.vscPopupHighlightLightBlue })
553575
hl(0, 'LspReferenceWrite', { fg = 'NONE', bg = isDark and c.vscPopupHighlightGray or c.vscPopupHighlightLightBlue })
576+
hl(0, 'LspInlayHint', { fg = c.vscSuggestion, bg = 'NONE', italic = opts.italic_inlayhints })
554577

555578
-- Trouble
556579
hl(0, 'TroubleNormal', { link = 'Normal' })
@@ -792,6 +815,23 @@ theme.set_highlights = function(opts)
792815
hl(0, 'NeogitDiffDeleteCursor', { link = 'NeogitDiffDeleteHighlight' })
793816
hl(0, 'NeogitHunkHeaderCursor', { link = 'NeogitHunkHeaderHighlight' })
794817

818+
-- Which key
819+
hl(0, 'WhichKeyIconAzure', { fg = c.vscBlueGreen, bg = "NONE" })
820+
hl(0, 'WhichKeyIconBlue', { fg = c.vscBlue, bg = 'NONE' })
821+
hl(0, 'WhichKeyIconGreen', { fg = c.vscGreen, bg = 'NONE' })
822+
hl(0, 'WhichKeyIconGrey', { fg = c.vscGray, bg = 'NONE' })
823+
hl(0, 'WhichKeyIconOrange', { fg = c.vscYellowOrange, bg = 'NONE' })
824+
hl(0, 'WhichKeyIconPurple', { fg = c.vscPink, bg = 'NONE' })
825+
hl(0, 'WhichKeyIconRed', { fg = c.vscRed, bg = 'NONE' })
826+
hl(0, 'WhichKeyIconYellow', { fg = c.vscYellow, bg = 'NONE' })
827+
hl(0, 'WhichKeySeparator', { link = 'Normal' })
828+
hl(0, 'WhichKeyValue', { link = 'Normal' })
829+
if isDark then
830+
hl(0, 'WhichKeyBorder', { fg = c.vscLineNumber, bg = 'NONE' })
831+
else
832+
hl(0, 'WhichKeyBorder', { fg = c.vscTabOther, bg = 'NONE' })
833+
end
834+
795835
if isDark then
796836
hl(0, 'NvimTreeFolderIcon', { fg = c.vscBlue, bg = 'NONE' })
797837
hl(0, 'NvimTreeIndentMarker', { fg = c.vscLineNumber, bg = 'NONE' })

0 commit comments

Comments
 (0)