nvim-lua / diagnostic-nvim

A wrapper for neovim built in LSP diagnosis config
Apache License 2.0
219 stars 15 forks source link

Regression: custom signs no longer work #19

Closed gbrlsnchs closed 4 years ago

gbrlsnchs commented 4 years ago

It seems commit f88b35a5808c6e3817b5d7059f2c1857ade296b3 has introduced a bug which disables setting custom diagnostic ~symbols~ signs. I checked out every commit between my last version and the regression, and that commit is the culprit.

haorenW1025 commented 4 years ago

If you means the sign of the diagnostic, that's because I've followed the master branch and they don't use global variables to set up anymore. Instead you can use

call sign_define("LspDiagnosticsErrorSign", {"text" : " ", "texthl" : "LspDiagnosticsError"})
call sign_define("LspDiagnosticsWarningSign", {"text" : "⚡", "texthl" : "LspDiagnosticsWarning"})

see :h vim.lsp.util.buf_diagnostics_signs(), there's a document of how it works(but maybe require a newer branch).

ckipp01 commented 4 years ago

Ahh, I commented here before seeing this issue. Didn't know they changed this. I'll change this locally.

ckipp01 commented 4 years ago

Related to the above, do you have any idea how to give this priority over GitGutter signs? Currently for me they aren't being shown if there is a GitGutter sign present.

haorenW1025 commented 4 years ago

@ckipp01 I think you can't give priority through built-in method. I can create an option and enable it in diagnostic-nvim though.

ckipp01 commented 4 years ago

That's sort of a bummer. I think it'd be a good idea to enable that then. If not, I'm assuming users that use GitGutter are going to be confused why their custom signs aren't showing.

haorenW1025 commented 4 years ago

I've added an option to customize sign priority. It's already bigger than gitgutter by default so you should see the fix once you update.

ckipp01 commented 4 years ago

That was fast 😆 .

Yes, it works perfectly. 🙏

gbrlsnchs commented 4 years ago

@haorenW1025 That's it, then, thank you for your attention again! And, yes, sorry, I meant signs, not symbols. :grimacing: