mirror of
https://github.com/neovim/neovim.git
synced 2026-09-11 08:31:03 +00:00
build: replace LuaLS with EmmyLua
Problem: LuaLS struggles with the generics used in Nvim's runtime, requiring broad diagnostic suppressions. Indexing is also slow. Solution: Use EmmyLua for type checks in the build and CI. It offers more sophisticated type checking, substantially better support for generics, and much better flow analysis. Correct the affected annotations. Use `@internal`, supported directly by EmmyLua, instead of `@nodoc` for shared internal declarations, and support it in the help parser. AI-assisted
This commit is contained in:
committed by
Lewis Russell
parent
cd52c77cd5
commit
65ef6fdaee
@@ -203,6 +203,7 @@ end
|
||||
---@return vim.lsp.folding_range.State
|
||||
function State:new(bufnr)
|
||||
self = Capability.new(self, bufnr)
|
||||
---@cast self vim.lsp.folding_range.State
|
||||
self.lang = vim.treesitter.language.get_lang(vim.bo[self.bufnr].filetype)
|
||||
self.row_level = {}
|
||||
self.row_kinds = {}
|
||||
@@ -325,8 +326,8 @@ end
|
||||
--- Split `line` into highlighted virt_text chunks from `spans`.
|
||||
---
|
||||
---@param line string
|
||||
---@param spans [integer, integer, string][] [start_col, end_col, highlight]
|
||||
---@return [string, string[]?][] [text, highlight[]?][]
|
||||
---@param spans [integer, integer, string][] # [start_col, end_col, highlight]
|
||||
---@return [string, string[]?][] # [text, highlight[]?][]
|
||||
local function spans_to_virt_text(line, spans)
|
||||
local boundaries = { 0, #line }
|
||||
for _, span in ipairs(spans) do
|
||||
|
||||
Reference in New Issue
Block a user