Skip to content

Commit

Permalink
changing the highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Badragan committed May 4, 2024
1 parent bf3b4e5 commit 07adeca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
16 changes: 8 additions & 8 deletions lua/grug-far/render.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ local function render(params, context)
lineNr = 1,
extmarkName = "search",
label_virt_lines = {
{ { "  Search", 'DiagnosticInfo' } },
{ { "  Search", 'Identifier' } },
},
placeholder_virt_text = {
{ "ex: foo foo([a-z0-9]*) fun\\(", 'SpecialComment' }
{ "ex: foo foo([a-z0-9]*) fun\\(", 'Comment' }
},
}, context)

Expand All @@ -25,10 +25,10 @@ local function render(params, context)
lineNr = 2,
extmarkName = "replace",
label_virt_lines = {
{ { "  Replace ", 'DiagnosticInfo' } },
{ { "  Replace ", 'Identifier' } },
},
placeholder_virt_text = {
{ "ex: bar ${1}_foo $$MY_ENV_VAR ", 'SpecialComment' },
{ "ex: bar ${1}_foo $$MY_ENV_VAR ", 'Comment' },
},
}, context)

Expand All @@ -37,10 +37,10 @@ local function render(params, context)
lineNr = 3,
extmarkName = "files_glob",
label_virt_lines = {
{ { " 󱪣 Files Filter ", 'DiagnosticInfo' } },
{ { " 󱪣 Files Filter ", 'Identifier' } },
},
placeholder_virt_text = {
{ "ex: *.lua *.{css,js} **/docs/*.md", 'SpecialComment' }
{ "ex: *.lua *.{css,js} **/docs/*.md", 'Comment' }
},
}, context))

Expand All @@ -49,10 +49,10 @@ local function render(params, context)
lineNr = 4,
extmarkName = "flags",
label_virt_lines = {
{ { "  Flags ", 'DiagnosticInfo' } },
{ { "  Flags ", 'Identifier' } },
},
placeholder_virt_text = {
{ "ex: --hidden (-.) --ignore-case (-i) --multiline (-U)", 'SpecialComment' }
{ "ex: --hidden (-.) --ignore-case (-i) --multiline (-U)", 'Comment' }
},
}, context))

Expand Down
5 changes: 3 additions & 2 deletions lua/grug-far/render/help.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-- TODO (sbadragan): implemment g?
-- TODO (sbadragan): implemment g? or simply do a header with mappings like lazygit:
-- Replace: <c-enter> | Help: g? | To Quickfix List: <c-q>
local function renderHelp(params, context)
local buf = params.buf
local helpLine = unpack(vim.api.nvim_buf_get_lines(buf, 0, 1, false))
Expand All @@ -14,7 +15,7 @@ local function renderHelp(params, context)
end_row = 0,
end_col = 0,
virt_text = {
{ "Press g? for help", 'Comment' }
{ "Apply Replace: <c-enter> | To Quickfix List: <c-q> | Help: g?", 'WarningMsg' }
},
virt_text_pos = 'overlay'
})
Expand Down

0 comments on commit 07adeca

Please sign in to comment.