Skip to content

Commit

Permalink
chore: update to nvim 0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-reineke committed May 17, 2024
1 parent 3d08501 commit 0f46219
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
uses: ./.github/workflows/tests.yml
with:
neovim_versions: |
[ "nightly", "v0.9.4" ]
[ "nightly", "v0.10.0" ]
lua-language-server:
uses: ./.github/workflows/lua_language_server.yml
with:
lua_ls_version: 3.7.0
lua_ls_version: 3.9.1
neovim_versions: |
[ "nightly", "v0.9.4" ]
[ "nightly", "v0.10.0" ]
stylua:
name: stylua
Expand Down
8 changes: 1 addition & 7 deletions lua/ibl/highlights.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,7 @@ local M = {

---@param name string
local get = function(name)
-- TODO [Lukas]: remove this when AstroNvim drops support for 0.8
if not vim.api.nvim_get_hl then
---@diagnostic disable-next-line
return (vim.fn.hlexists(name) == 1 and vim.api.nvim_get_hl_by_name(name, true)) or vim.empty_dict() --[[@as table]]
end

return vim.api.nvim_get_hl(0, { name = name })
return vim.api.nvim_get_hl(0, { name = name }) --[[@as vim.api.keyset.highlight]]
end

---@param hl table
Expand Down
1 change: 0 additions & 1 deletion lua/ibl/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ local namespace = vim.api.nvim_create_namespace "indent_blankline"

local M = {}

---@package
M.initialized = false

---@type table<number, { scope: TSNode?, left_offset: number, top_offset: number, tick: number }>
Expand Down
2 changes: 1 addition & 1 deletion lua/ibl/scope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ end

--- Takes a language tree and a range, and returns the child language tree for that range
---
---@param language_tree LanguageTree
---@param language_tree vim.treesitter.LanguageTree
---@param range table<number, number>
---@param config ibl.config.full
M.language_for_range = function(language_tree, range, config)
Expand Down
7 changes: 2 additions & 5 deletions lua/ibl/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ end
---@return ibl.listchars
M.get_listchars = function(bufnr)
local listchars
---@diagnostic disable-next-line
local list = vim.opt.list:get()
if list then
listchars = vim.opt.listchars:get()
Expand Down Expand Up @@ -424,11 +425,7 @@ end
---@vararg T
---@return T
M.tbl_join = function(...)
local result = {}
for i, v in ipairs(vim.tbl_flatten { ... }) do
result[i] = v
end
return result
return vim.iter({ ... }):flatten():totable()
end

---@generic T
Expand Down

0 comments on commit 0f46219

Please sign in to comment.