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

Commit

Permalink
feat: add option to disable underline(#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
haorenW1025 committed Jun 11, 2020
1 parent 37e0c40 commit f6e1c74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lua/diagnostic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ function M.publish_diagnostics(bufnr)
vim.lsp.util.buf_clear_diagnostics(bufnr)
vim.lsp.util.buf_diagnostics_save_positions(bufnr, result.diagnostics)
util.buf_diagnostics_save_positions(bufnr, result.diagnostics)
vim.lsp.util.buf_diagnostics_underline(bufnr, result.diagnostics)
if vim.api.nvim_get_var('diagnostic_enable_underline') == 1 then
vim.lsp.util.buf_diagnostics_underline(bufnr, result.diagnostics)
end
if vim.api.nvim_get_var('diagnostic_show_sign') == 1 then
util.buf_diagnostics_signs(bufnr, result.diagnostics)
end
Expand Down
4 changes: 4 additions & 0 deletions plugin/diagnostic.vim
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ if ! exists('g:diagnostic_show_sign')
let g:diagnostic_show_sign = 1
endif

if ! exists('g:diagnostic_enable_underline')
let g:diagnostic_enable_underline = 1
endif

if ! exists('g:diagnostic_sign_priority')
let g:diagnostic_sign_priority = 20
endif
Expand Down

0 comments on commit f6e1c74

Please sign in to comment.