Skip to content

Inline diagnostics not always readable #280

Answered by ckipp01
reidrac asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @reidrac! Thanks for the kind words! I'm glad you're enjoying it so far!

So I personally just turn the virtual text off for Scala. I find that it doesn't work great since our error messages are so long. There is a couple different things you can do I guess to get around this.

I've done this before and it works alright. The vim.diagnostic takes a table where you can pass in a function to do whatever you want to the diagnostic. So for example if you wanted to just display the first line via virtual text you could do this:

local function split_on(s, delimiter)
  local result = {}
  local from = 1
  local delim_from, delim_to = string.find(s, delimiter, from)
  while delim_from do
    tab…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@reidrac
Comment options

@ckipp01
Comment options

Answer selected by reidrac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants