Skip to content
Salim Pamukcu edited this page Jun 29, 2023 · 8 revisions

Plugin TroubleShooting/Customizing

We will share here customizing or special problem solving know-hows related to plugins

Changing Illimunate highlighting

If you have followed the illimunate.lua to configure your "RRethy/vim-illuminate" plugin and also used the same autocommands including this

vim.api.nvim_create_autocmd({ "VimEnter" }, {
  callback = function()
    vim.cmd "hi link illuminatedWord LspReferenceText"
  end,
})

you might notice when your cursor is on a variable it highlights all references to that within the same buffer, if you want to disable highlight and have underlined instead then you can simply add those autocommand in your autocommand.lua file

vim.api.nvim_create_autocmd({ "VimEnter" }, {
	callback = function()
		vim.api.nvim_set_hl(0, "illuminatedWord", { fg = "", underline = true })
		vim.api.nvim_set_hl(0, "illuminatedWordRead", { fg = "", underline = true })
		vim.api.nvim_set_hl(0, "illuminatedWordWrite", { fg = "", underline = true })
		vim.api.nvim_set_hl(0, "IlluminatedWordText", { fg = "", underline = true })
	end,
})

image

Changing Indentline line coloring

If you have followed the indentline setup to configure your "lukas-reineke/indent-blankline.nvim" plugin and if you dont like the coloring when cursor is on of the variable/function names you can simply add this simple line in your config to adjust the color when it is selected as you like. Typically those colours are set by your colour theme;

    M.config()
        vim.api.nvim_set_hl(0, "IndentBlanklineContextChar", { fg = "#3b4261", nocombine = true })
        -- vim.api.nvim_set_hl(0, "IndentBlanklineChar", { fg = "#1d2228", nocombine = true })
        require("indent_blankline").setup {
           char = "",
           show_trailing_blankline_indent = false,
           show_first_indent_level = true,
           use_treesitter = true,
           show_current_context = true,
           buftype_exclude = { "terminal", "nofile" },
           filetype_exclude = {
             "help",
             "packer",
             "NvimTree",
        },
      }
    end

The second line effects unselected indent line colouring and in case you dont like it you can change it as well by commenting out and set the colours as you like

Before the change ; image

After the change; image

There are also more coloring options that can be set like different colors for each indent level..etc. For those you should refer to plugins page ; lukas-reineke/indent-blankline.nvim

Clone this wiki locally