Skip to content

Commit

Permalink
fix: require Neovim >= 0.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Mar 27, 2024
1 parent cf1d270 commit bcccf9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ A pretty list for showing diagnostics, references, telescope results, quickfix a

## 鈿★笍 Requirements

- Neovim >= 0.7.2
- Neovim >= 0.9.2
- Properly configured Neovim LSP client
- [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons) is optional to enable file icons
- a theme with properly configured highlight groups for Neovim Diagnostics
- or install 馃寛 [lsp-colors](https://github.com/folke/lsp-colors.nvim) to automatically create the missing highlight groups
- a [patched font](https://www.nerdfonts.com/) for the default severity and fold icons

## 馃摝 Installation
Expand Down
6 changes: 6 additions & 0 deletions lua/trouble/config/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@ local options

---@param opts? trouble.Config
function M.setup(opts)
if vim.fn.has("nvim-0.9.2") == 0 then
local msg = "trouble.nvim requires Neovim >= 0.9.2"
vim.notify_once(msg, vim.log.levels.ERROR, { title = "trouble.nvim" })
error(msg)
return
end
opts = opts or {}
opts.mode = nil
options = {}
Expand Down

0 comments on commit bcccf9b

Please sign in to comment.