Skip to content

Commit

Permalink
Use the old vim.diagnostic.diable fn in < nvim 0.10.0 #582
Browse files Browse the repository at this point in the history
  • Loading branch information
Olical committed Jun 19, 2024
1 parent 9346878 commit 914ef6a
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 77 deletions.
4 changes: 3 additions & 1 deletion fnl/conjure/log.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
(nvim.buf_set_extmark buf state.jump-to-latest.ns 0 0 {}))

(when (and vim.diagnostic (= false (config.get-in [:log :diagnostics])))
(vim.diagnostic.enable false {:bufnr buf}))
(if (= 1 (vim.fn.has "nvim-0.10"))
(vim.diagnostic.enable false {:bufnr buf})
(vim.diagnostic.disable buf)))

(when (and vim.treesitter (= false (config.get-in [:log :treesitter])))
(vim.treesitter.stop buf)
Expand Down
156 changes: 80 additions & 76 deletions lua/conjure/log.lua

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

0 comments on commit 914ef6a

Please sign in to comment.