add paren-hint.nvim plugin
This commit is contained in:
parent
16de4fce5a
commit
1f1673571b
2 changed files with 41 additions and 11 deletions
29
lua/custom/plugins/paren-hint.lua
Normal file
29
lua/custom/plugins/paren-hint.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
local M = {
|
||||
'briangwaltney/paren-hint.nvim',
|
||||
lazy = false,
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
},
|
||||
}
|
||||
|
||||
function M.config()
|
||||
-- you can create a custom highlight group for the ghost text with the below command.
|
||||
-- change the `highlight` option to `parenhint` if you use this method.
|
||||
vim.api.nvim_exec([[ highlight parenhint guifg='#495659' ]], false)
|
||||
require('paren-hint').setup({
|
||||
-- Include the opening paren in the ghost text
|
||||
include_paren = true,
|
||||
|
||||
-- Show ghost text when cursor is anywhere on the line that includes the close paren rather than just when the cursor is on the close paren
|
||||
anywhere_on_line = true,
|
||||
|
||||
-- show the ghost text when the opening paren is on the same line as the close paren
|
||||
show_same_line_opening = false,
|
||||
|
||||
-- style of the ghost text using highlight group
|
||||
-- :Telescope highlights to see the available highlight groups if you have telescope installed
|
||||
highlight = 'parenhint',
|
||||
})
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue