dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.49k stars 1.43k forks source link

highlight linenr without enabling signs? #2752

Open JeanMertz opened 5 years ago

JeanMertz commented 5 years ago

This request is similar to https://github.com/dense-analysis/ale/issues/741, except that I'd like to use line number highlighting (g:ale_sign_highlight_linenrs), but not have Ale touch the signcolumn(s).

The reason being:

  1. highlighting an entire line is too obtrusive
  2. I'd like to keep the sign columns reserved for other plugins, and use line number coloring for Ale specifically.

I can create a PR when I find some time, but wanted to make sure this is something you're willing to entertain.

JeanMertz commented 5 years ago

I should clarify: I can set g:ale_sign_error etc to '' and remove any highlighting, but I suspect that would still make ALE potentially override other signs being shown at that line.

However, thinking some more about this, I guess that plus setting g:ale_sign_offset to 0 might actually be enough to make this work?

I'll leave this open in case that's not true, or you'd like to make this a bit easier to use, but feel free to close this if what I propose is what you think is the best approach without changing Ale.

JeanMertz commented 5 years ago

Ah never mind, it's priority that I'd need to change, not offset (which is just an ID that has to be unique). So this would still require changes to Ale as far as I know, either allowing changing the priority of the signs, or supporting the original request.

w0rp commented 5 years ago

You might be able to implement this by only setting text= if the sign text is !empty.

hsanson commented 4 years ago

@JeanMertz support for sign-priority was added recently to ALE (see #2786 ). By setting g:ale_sign_priority to a low value (< 10) you can ensure ALE signs will be hid by other plugin signs.

Would be great if you can test this and close this issue.