Skip to content

Commit

Permalink
Disable diagnostics in the log by default #571
Browse files Browse the repository at this point in the history
  • Loading branch information
Olical committed May 19, 2024
1 parent 3717d7a commit 9eea36c
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 76 deletions.
8 changes: 8 additions & 0 deletions doc/conjure.txt
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,14 @@ configure the ones you care about one at a time you can set:
editor, taking up the full width or height respectively.
Default: `false`


*g:conjure#log#disable_diagnostics*
`g:conjure#log#disable_diagnostics`
Disable the diagnostics in the log buffer since the output
normally isn't valid input for most clients. This should disable
the warnings you would normally see from your LSP setup.
Default: `true`

*g:conjure#log#break_length*
`g:conjure#log#break_length`
Length of the break comment (`; ---------...`) between log results
Expand Down
1 change: 1 addition & 0 deletions fnl/conjure/config.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@

:log
{:wrap false
:disable_diagnostics true
:hud {:width 0.42
:height 0.3
:zindex 1
Expand Down
3 changes: 3 additions & 0 deletions fnl/conjure/log.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
(set state.jump-to-latest.mark
(nvim.buf_set_extmark buf state.jump-to-latest.ns 0 0 {}))

(when (and vim.diagnostic (= true (config.get-in [:log :disable_diagnostics])))
(vim.diagnostic.disable buf))

(nvim.buf_set_lines
buf 0 -1 false
[(str.join [(client.get :comment-prefix)
Expand Down
2 changes: 1 addition & 1 deletion lua/conjure/config.lua

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9eea36c

Please sign in to comment.