Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: user can custom the format of diagnostic rendering #252

Closed
wants to merge 1 commit into from

Conversation

adoyle-h
Copy link

No description provided.

adoyle-h added a commit to adoyle-h/one.nvim that referenced this pull request Jan 23, 2023
adoyle-h added a commit to adoyle-h/one.nvim that referenced this pull request Jan 24, 2023
@adoyle-h
Copy link
Author

@folke Could you review this PR? It has been waiting for one month.

adoyle-h added a commit to adoyle-h/one.nvim that referenced this pull request Feb 25, 2023
- Change trouble.nvim source code to my fork.
- Wait this PR to be merged: folke/trouble.nvim#252
@folke
Copy link
Owner

folke commented Feb 28, 2023

Thank you for the suggestion, but I'm not a fan of this. You can always just override the method yourself.

local renderer = require("trouble.renderer")

function renderer.render_diagnostics(view, text, items)
  -- add your custom code here
end

@folke folke closed this Feb 28, 2023
@adoyle-h
Copy link
Author

@folke But the signs variable is unexported.
How to local sign = diag.sign or signs[string.lower(diag.type)] in my override function renderer.render_diagnostics?

folke added a commit that referenced this pull request Feb 28, 2023
@folke
Copy link
Owner

folke commented Feb 28, 2023

I just pushed a change that exposes renderer.signs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants