indentLine icon indicating copy to clipboard operation
indentLine copied to clipboard

Request for an addition to the documentation - plugin is not compatible with... And

Open EdmundsEcho opened this issue 7 years ago • 9 comments

First of all, thank you for this plugin that greatly improves my workflow. I have a tall screen; the visual queue helps a lot.

While obvious in hindsight, it took me a while to figure out why my Haskell operators (ligatures) were barely visible. What I want to be subtle in indentLine needs to be visually distinctive in vim-haskellConcealPlus (and similar plugins). It would be great if you had a list of plugins that also rely on the conceal setting and highlight group to remind users what to consider when installing the plugin.

The AND in the title: Is there a way to create a separate highlight group for the visual markers the indentLine inserts into the buffer? Right now it uses Conceal. If the name were ConcealIndentLine, I could use both plugins. As of now, I have to disable indentLine in my Haskell work where the visual queue for alignment is less a priority when compared to the code proper.

Update with a solution

Adjust indentLine's color settings to change the display when the objective changes. For instance, going from indentLine used in JS to another file format that uses Conceal to display ligatures. In other words, use indentLine to control the hi color scheme for Conceal for indentLine and any other plugin that also use Conceal. Do not attempt to set hi for Conceal directly to "dynamically" change Conceal - it just does not work if you are using indentLine.

Default configuration Note how I disable indentLine BUT continue to use indentLine settings to control Conceal's behavior (e.g., below for Haskell).

let g:indentLine_fileTypeExclude = ['haskell','json','yaml','markdown','text','sh','vim']
let g:indentLine_conceallevel=1    " may or may not be required
let g:indentLine_setConceal=1

" color - subtle low contrast display
" Note: I also include hi Conceal =NONE near the end of my config
let g:indentLine_color_term=236
let g:indentLine_bgcolor_term='NONE'

" required if termguicolors is set
let g:indentLine_color_gui='#1E1E1E'  " #303030
let g:indentLine_bgcolor_gui='NONE'

Haskell specific settings for indentLine Note: I use ConcealPlus to display ligatures for my Haskell work. I use indentLine to control how ligatures are displayed despite what seems like disabling the plugin for haskell (see indentLine_fileTypeExclude).

  "... within an augroup
  au FileType haskell let g:indentLine_color_term=192
  au FileType haskell let g:indentLine_color_gui='#CAE982'

- E

EdmundsEcho avatar Dec 16 '17 15:12 EdmundsEcho

First, I don't know what plugins have used conceal. Second, there is only one way to customize the color, i.e., hi Conceal.

Yggdroot avatar Dec 18 '17 04:12 Yggdroot

Good point. How about collecting a list from users, and/or giving examples of a few plugins that might conflict? Generally, it's a plugin that relies on Conceal. There is a perfect setting to exclude certain files types and thus provide a way to help us figure out which ones to exclude e.g., json if you want to see quotes, haskellConcealPlus to show -> as a single looking char without changing the underlying code.

EdmundsEcho avatar Dec 18 '17 17:12 EdmundsEcho

Second, there is only one way to customize the color, i.e., hi Conceal.

@Yggdroot Any reason why is hi Conceal the only way & not create a custom group for the plugin only as @EdmundsEcho something like hi ConcealIndentLine or hi IndentLine?

Because I'm also having the same issue but with https://github.com/pangloss/vim-javascript#concealing-characters I like to conceal the function keyword.

ahmedelgabri avatar Jan 14 '18 20:01 ahmedelgabri

@ahmedelgabri It's vim's ability.

Yggdroot avatar Jan 15 '18 02:01 Yggdroot

@Yggdroot that's because the plugin depends on conceal right? is there is anyway else?

ahmedelgabri avatar Jan 15 '18 09:01 ahmedelgabri

yes. no.

Yggdroot avatar Jan 15 '18 09:01 Yggdroot

Having same issue with vim-javascript's conceal. vim-indentline override vim-javascript's conceal, but if I use this version (it's the version before @Yggdroot refactor the code) they both went well.

ferrwan avatar Jan 23 '18 07:01 ferrwan

same as @ferrwan

Saul-Mirone avatar Dec 11 '18 14:12 Saul-Mirone

ref https://github.com/Yggdroot/indentLine/issues/155

ygrek avatar Mar 26 '19 18:03 ygrek