diff options
author | Gregory Anders <greg@gpanders.com> | 2021-09-18 15:00:32 -0600 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2021-09-21 18:54:26 -0600 |
commit | d43151ea0bb194f7463cc8762919cd38546973c2 (patch) | |
tree | 090c7246572f6d75e9cdc6b0c6d02f0be882808a /runtime/lua/vim/lsp/diagnostic.lua | |
parent | 17b7968f02bca309bb2e7b00752667baa6b4d765 (diff) | |
download | rneovim-d43151ea0bb194f7463cc8762919cd38546973c2.tar.gz rneovim-d43151ea0bb194f7463cc8762919cd38546973c2.tar.bz2 rneovim-d43151ea0bb194f7463cc8762919cd38546973c2.zip |
feat(diagnostic): add option to include diagnostic source
Add an option to virtual text display and floating window previews to
include diagnostic source in the diagnostic message.
Diffstat (limited to 'runtime/lua/vim/lsp/diagnostic.lua')
-rw-r--r-- | runtime/lua/vim/lsp/diagnostic.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/diagnostic.lua b/runtime/lua/vim/lsp/diagnostic.lua index a9d93ae65f..b4557b0e26 100644 --- a/runtime/lua/vim/lsp/diagnostic.lua +++ b/runtime/lua/vim/lsp/diagnostic.lua @@ -103,6 +103,7 @@ local function diagnostic_lsp_to_vim(diagnostics, bufnr, client_id) end_col = line_byte_from_position(buf_lines, _end.line, _end.character, offset_encoding), severity = severity_lsp_to_vim(diagnostic.severity), message = diagnostic.message, + source = diagnostic.source, user_data = { lsp = { code = diagnostic.code, @@ -132,6 +133,7 @@ local function diagnostic_vim_to_lsp(diagnostics) }, severity = severity_vim_to_lsp(diagnostic.severity), message = diagnostic.message, + source = diagnostic.source, }, diagnostic.user_data and (diagnostic.user_data.lsp or {}) or {}) end, diagnostics) end |