GithubHelp home page GithubHelp logo

Comments (5)

horga83 avatar horga83 commented on June 2, 2024

I figured this out, here is the answer:

return {
	"lukas-reineke/indent-blankline.nvim",
	main = "ibl",
	lazy = false,
	opts = {
    indent = { highlight = "VertSplit", char = "│" },
  },
}

And here is the stuff nobody seems to mention, "VertSpit" is a Vim code for character attributes. At the Vim or Nvim command line if you type ":highlight", you will see a list of all the character attributes and colors. Substitute "VertSplit" for whatever you like.
The char="|" by the way is a unicode character, go into insert mode, hit u2502 to insert it, if you want to see what code a unicode character is in Nvim, put your cursor on the character and hit ga.

I figured this out by fluke by looking at this code which gives a alternating space and shade for indent lines.

local highlight = {
    "CursorColumn",
     "Whitespace",
}

return {
  "lukas-reineke/indent-blankline.nvim",
  main = "ibl",
  lazy = false,

  opts = {
  indent = { highlight = highlight, char = "" },
     whitespace = {
        highlight = highlight,
        remove_blankline_trail = true,
     },
    scope = { enabled = true },
}

I discovered by chance that :highlight allowed one to look at the highlight attributes and I recalled seeing "CursorColumn" in the list.
Hope this helps everyone with some solid information. Too much assumption these days in docs.

from indent-blankline.nvim.

lukas-reineke avatar lukas-reineke commented on June 2, 2024

There is an example in the readme that shows how to set custom highlight groups

Too much assumption these days in docs.

Did you read :help ibl? Everything is explained there in a lot more detail.

from indent-blankline.nvim.

horga83 avatar horga83 commented on June 2, 2024

from indent-blankline.nvim.

lukas-reineke avatar lukas-reineke commented on June 2, 2024

I don't believe anywhere in :help ibl does it explain that if you type
:highlight in nvim it will display all the vars and their current
setting.

True, that is because :highlight is not a command of IBL. It is a built-in Neovim command.
It's not possible to explain every built-in command in the plugin doc again. They are already documented by Neovim itself.

:help ibl.config.indent.highlight tells you it expects a highlight group, or a list of highlight groups. If you don't know what that is, you can just do :help highlight-group, or :help highlight.

You can also use :help CTRL-] on underlined text in the docs and jump to the definition.

There is also :help :helpgrep that lets you grep for documentation. And there are plugins that let you fuzzy search documentation with previews, like FZF and telescope.

The Neovim help docs are very good. It pays off getting good at using them.

I'm a firm believer in the math textbook principle, a complete example
goes a long way.

I don't disagree. That's why there are multiple ready-made config examples in the README. And a lot of the settings have examples in the documentation.

I'm not saying IBLs documentation is perfect, it can always be better. I will add an explicit link to the highlight group docs from ibl.config.whitespace.highlight.
But other than that, I'm not really sure what else I can realisticly improve.

from indent-blankline.nvim.

horga83 avatar horga83 commented on June 2, 2024

from indent-blankline.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.