Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update to nvim 0.10 #867

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ stylua:
lua-language-server: dependencies
rm -rf .ci/lua-language-server-log
lua-language-server --configpath .luarc.$(version).json --logpath .ci/lua-language-server-log --check .
[ -f .ci/lua-language-server-log/check.json ] && { cat .ci/lua-language-server-log/check.json 2>/dev/null; exit 1; } || true
@if jq -e 'if . | length > 0 then true else false end' .ci/lua-language-server-log/check.json > /dev/null; then \
cat .ci/lua-language-server-log/check.json; \
exit 1; \
fi

dependencies:
if [ ! -d .ci/vendor ]; then \
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
Loading