Skip to content

Commit

Permalink
refactor: move vim.lsp.diagnostic to vim.diagnostic
Browse files Browse the repository at this point in the history
This generalizes diagnostic handling outside of just the scope of LSP.
LSP clients are now a specific case of a diagnostic producer, but the
diagnostic subsystem is decoupled from the LSP subsystem (or will be,
eventually).

More discussion at [1].

[1]: #15585
  • Loading branch information
gpanders committed Sep 15, 2021
1 parent 6188926 commit a5bbb93
Show file tree
Hide file tree
Showing 15 changed files with 3,054 additions and 1,798 deletions.
44 changes: 44 additions & 0 deletions runtime/doc/deprecated.txt
Expand Up @@ -55,6 +55,50 @@ Functions ~
without stopping the job. Use chanclose(id) to close
any socket.

LSP Diagnostics ~

For each of the functions below, use the corresponding function in
|vim.diagnostic| instead (unless otherwise noted). For example, use
|vim.diagnostic.get()| instead of |vim.lsp.diagnostic.get()|.

*vim.lsp.diagnostic.clear()* Use |vim.diagnostic.hide()| instead.
*vim.lsp.diagnostic.disable()*
*vim.lsp.diagnostic.display()* Use |vim.diagnostic.show()| instead.
*vim.lsp.diagnostic.enable()*
*vim.lsp.diagnostic.get()*
*vim.lsp.diagnostic.get_all()* Use |vim.diagnostic.get()| instead.
*vim.lsp.diagnostic.get_count()* Use |vim.diagnostic.get()| instead.
*vim.lsp.diagnostic.get_line_diagnostics()*
Use |vim.diagnostic.get()| instead.
*vim.lsp.diagnostic.get_next()*
*vim.lsp.diagnostic.get_next_pos()*
*vim.lsp.diagnostic.get_prev()*
*vim.lsp.diagnostic.get_prev_pos()*
*vim.lsp.diagnostic.get_virtual_text_chunks_for_line()*
Use |vim.diagnostic.get_virt_text_chunks()| instead.
*vim.lsp.diagnostic.goto_next()*
*vim.lsp.diagnostic.goto_prev()*
*vim.lsp.diagnostic.redraw()* Use |vim.diagnostic.show()| instead.
*vim.lsp.diagnostic.reset()*
*vim.lsp.diagnostic.save()* Use |vim.diagnostic.set()| instead.
*vim.lsp.diagnostic.set_loclist()* Use |vim.diagnostic.setloclist()| instead.
*vim.lsp.diagnostic.set_qflist()* Use |vim.diagnostic.setqflist()| instead.
*vim.lsp.diagnostic.show_line_diagnostics()*
*vim.lsp.diagnostic.show_position_diagnostics()*

The following are deprecated without replacement. These functions are moved
internally and are no longer exposed as part of the API. Instead, use
|vim.diagnostic.config()| and |vim.diagnostic.show()|.

*vim.lsp.diagnostic.set_signs()*
*vim.lsp.diagnostic.set_underline()*
*vim.lsp.diagnostic.set_virtual_text()*

LSP Utility Functions ~

*vim.lsp.util.set_qflist()* Use |setqflist()| instead.
*vim.lsp.util.set_loclist()* Use |setloclist()| instead.

Lua ~
*vim.register_keystroke_callback()* Use |vim.on_key()| instead.

Expand Down

0 comments on commit a5bbb93

Please sign in to comment.