Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit f6e1c74

Browse files
committed
feat: add option to disable underline(#33)
1 parent 37e0c40 commit f6e1c74

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

lua/diagnostic.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ function M.publish_diagnostics(bufnr)
7777
vim.lsp.util.buf_clear_diagnostics(bufnr)
7878
vim.lsp.util.buf_diagnostics_save_positions(bufnr, result.diagnostics)
7979
util.buf_diagnostics_save_positions(bufnr, result.diagnostics)
80-
vim.lsp.util.buf_diagnostics_underline(bufnr, result.diagnostics)
80+
if vim.api.nvim_get_var('diagnostic_enable_underline') == 1 then
81+
vim.lsp.util.buf_diagnostics_underline(bufnr, result.diagnostics)
82+
end
8183
if vim.api.nvim_get_var('diagnostic_show_sign') == 1 then
8284
util.buf_diagnostics_signs(bufnr, result.diagnostics)
8385
end

plugin/diagnostic.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ if ! exists('g:diagnostic_show_sign')
3333
let g:diagnostic_show_sign = 1
3434
endif
3535

36+
if ! exists('g:diagnostic_enable_underline')
37+
let g:diagnostic_enable_underline = 1
38+
endif
39+
3640
if ! exists('g:diagnostic_sign_priority')
3741
let g:diagnostic_sign_priority = 20
3842
endif

0 commit comments

Comments
 (0)