Skip to content

Commit

Permalink
refactor!: require Neovim v0.10+
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Sep 19, 2024
1 parent 06a309a commit f850c39
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ AstroLSP provides a simple API for configuring and setting up language servers i

## ⚡️ Requirements

- Neovim >= 0.9
- Neovim >= 0.10

## 📦 Installation

Expand Down
3 changes: 1 addition & 2 deletions lua/astrolsp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ function M.setup(opts)
and not (vim.tbl_contains(disabled, client.name) or (type(filter) == "function" and not filter(client)))
end

-- TODO: remove check when dropping support for Neovim v0.9
if vim.lsp.inlay_hint then vim.lsp.inlay_hint.enable(M.config.features.inlay_hints ~= false) end
vim.lsp.inlay_hint.enable(M.config.features.inlay_hints ~= false)

-- Set up tracking of signature help trigger characters
local augroup = vim.api.nvim_create_augroup("track_signature_help_triggers", { clear = true })
Expand Down
4 changes: 1 addition & 3 deletions lua/astrolsp/toggles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ function M.buffer_semantic_tokens(bufnr, silent)
bufnr = bufnr or 0
vim.b[bufnr].semantic_tokens = not vim.b[bufnr].semantic_tokens
local toggled = false
-- TODO: remove check after dropping support for Neovim v0.9
---@diagnostic disable-next-line: deprecated
for _, client in ipairs((vim.lsp.get_clients or vim.lsp.get_active_clients) { bufnr = bufnr }) do
for _, client in ipairs(vim.lsp.get_clients { bufnr = bufnr }) do
if client.supports_method "textDocument/semanticTokens/full" then
-- HACK: `semantic_tokens.start/stop` don't support 0 for current buffer
local real_bufnr = bufnr == 0 and vim.api.nvim_get_current_buf() or bufnr
Expand Down

0 comments on commit f850c39

Please sign in to comment.