aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/deprecated.txt3
-rw-r--r--runtime/doc/diagnostic.txt26
-rw-r--r--runtime/doc/news.txt3
3 files changed, 25 insertions, 7 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt
index 0a07f06c75..b0d4b41a98 100644
--- a/runtime/doc/deprecated.txt
+++ b/runtime/doc/deprecated.txt
@@ -116,6 +116,9 @@ internally and are no longer exposed as part of the API. Instead, use
- *vim.lsp.diagnostic.set_underline()*
- *vim.lsp.diagnostic.set_virtual_text()*
+Configuring |diagnostic-signs| with |:sign-define| or |sign_define()| is no
+longer supported. Use the "signs" key of |vim.diagnostic.config()| instead.
+
LSP FUNCTIONS
- *vim.lsp.buf.server_ready()*
Use |LspAttach| instead, depending on your use-case. "Server ready" is not
diff --git a/runtime/doc/diagnostic.txt b/runtime/doc/diagnostic.txt
index 94ed578823..fa5ef22e37 100644
--- a/runtime/doc/diagnostic.txt
+++ b/runtime/doc/diagnostic.txt
@@ -317,12 +317,24 @@ SIGNS *diagnostic-signs*
Signs are defined for each diagnostic severity. The default text for each sign
is the first letter of the severity name (for example, "E" for ERROR). Signs
-can be customized using the following: >vim
+can be customized with |vim.diagnostic.config()|. Example: >lua
- sign define DiagnosticSignError text=E texthl=DiagnosticSignError linehl= numhl=
- sign define DiagnosticSignWarn text=W texthl=DiagnosticSignWarn linehl= numhl=
- sign define DiagnosticSignInfo text=I texthl=DiagnosticSignInfo linehl= numhl=
- sign define DiagnosticSignHint text=H texthl=DiagnosticSignHint linehl= numhl=
+ -- Highlight entire line for errors
+ -- Highlight the line number for warnings
+ vim.diagnostic.config({
+ signs = {
+ text = {
+ [vim.diagnostic.severity.ERROR] = '',
+ [vim.diagnostic.severity.WARN] = '',
+ },
+ linehl = {
+ [vim.diagnostic.severity.ERROR] = 'ErrorMsg',
+ },
+ numhl = {
+ [vim.diagnostic.severity.WARN] = 'WarningMsg',
+ },
+ },
+ })
When the "severity_sort" option is set (see |vim.diagnostic.config()|) the
priority of each sign depends on the severity of the associated diagnostic.
@@ -427,8 +439,8 @@ config({opts}, {namespace}) *vim.diagnostic.config()*
end
<
- • signs: (default true) Use signs for diagnostics.
- Options:
+ • signs: (default true) Use signs for diagnostics
+ |diagnostic-signs|. Options:
• severity: Only show signs for diagnostics matching
the given severity |diagnostic-severity|
• priority: (number, default 10) Base priority to use
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 925c63f259..7def21941b 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -387,6 +387,9 @@ DEPRECATIONS *news-deprecations*
The following functions are now deprecated and will be removed in a future
release.
+• Configuring |diagnostic-signs| using |:sign-define| or |sign_define()|. Use
+ the "signs" key of |vim.diagnostic.config()| instead.
+
• Checkhealth functions:
- |health#report_error|, |vim.health.report_error()| Use |vim.health.error()| instead.
- |health#report_info|, |vim.health.report_info()| Use |vim.health.info()| instead.