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

feat(lsp)!: semantic token modifiers, LspTokenUpdate #22022

Merged
merged 1 commit into from
Mar 6, 2023
Merged

feat(lsp)!: semantic token modifiers, LspTokenUpdate #22022

merged 1 commit into from
Mar 6, 2023

Conversation

swarn
Copy link
Contributor

@swarn swarn commented Jan 27, 2023

This is another take on how semantic token highlighting could work in neovim, cf #21576 and #21804. This PR has evolved quite a bit, and is no longer "rule-based."

Summary

  • The default highlighting for semantic tokens adds a number of extmarks for each token, which cover most basic uses and can be higlighted by colorschemes.
  • There is a new LspTokenUpdate autocommand event that allows more complex token highlighting.

Default Highlighting

For a token with n modifiers, 2n + 1 extmarks are applied:

  • @lsp.type.<type>.<ft> for the type of the token, priority 125 (vim.highlight.priorities.semantic_tokens)
  • @lsp.mod.<modifier>.<ft> for each modifier of the token, priority 126
  • @lsp.both.<type>.<modifier>.<ft> for each modifier of the token, priority 127

For example, for the C++ code:

int function(int const p) { return p; }
//            with the cursor here ^

The :Inspect command shows:
inspect

Default highlight links

expand

The following captures are linked by default to standard highlight groups:

Token Type Highlight Linked Group
@lsp.type.class Structure
@lsp.type.decorator Function
@lsp.type.enum Structure
@lsp.type.enumMember Constant
@lsp.type.function Function
@lsp.type.interface Structure
@lsp.type.macro Macro
@lsp.type.method Function
@lsp.type.namespace Structure
@lsp.type.parameter Identifier
@lsp.type.property Identifier
@lsp.type.struct Structure
@lsp.type.type Type
@lsp.type.typeParameter TypeDef
@lsp.type.variable Identifier

The following semantic types are purposefully not linked:

Token Type Highlight Note
@lsp.type Don't add highlights for off-spec token types
@lsp.type.comment This overrides @text.todo and other useful marks inside comments
@lsp.type.regexp Let treesitter handle literals
@lsp.type.keyword "
@lsp.type.string "
@lsp.type.number "
@lsp.type.operator "
@lsp.type.event Unclear to what this should link
@lsp.type.modifier "

Examples: using default highlighting

expand

You can disable specific semantic highlights by clearing a highlight group (you probably want this code in a colorscheme autocommand):

vim.api.nvim_set_hl(0, '@lsp.type.function', {})

You can disable all semantic highlights. Note that while this means that no visible highlight are being applied, but the tokens are still there and are still available with vim.lsp.semantic_tokens.get_at_pos() and visible with :Inspect:

for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do
  vim.api.nvim_set_hl(0, group, {})
end

The default links only use :h highlight-default groups. If you have a newer colorscheme with treesitter support, you can use the following to link to default treesitter groups, which potentially have more specific highlighting:

local links = {
  ['@lsp.type.namespace'] = '@namespace',
  ['@lsp.type.type'] = '@type',
  ['@lsp.type.class'] = '@type',
  ['@lsp.type.enum'] = '@type',
  ['@lsp.type.interface'] = '@type',
  ['@lsp.type.struct'] = '@structure',
  ['@lsp.type.typeParameter'] = 'TypeDef',
  ['@lsp.type.parameter'] = '@parameter',
  ['@lsp.type.variable'] = '@variable',
  ['@lsp.type.property'] = '@property',
  ['@lsp.type.enumMember'] = '@constant',
  ['@lsp.type.function'] = '@function',
  ['@lsp.type.method'] = '@method',
  ['@lsp.type.macro'] = '@macro',
  ['@lsp.type.decorator'] = '@function',
}
for newgroup, oldgroup in pairs(links) do
  vim.api.nvim_set_hl(0, newgroup, { link = oldgroup, default = true })
end

Note that some semantic token types have no treesitter equivalent, and there are both server-specific token types and server-specific token modifiers.

You can specialize by filetype. Make C++ functions red:

vim.api.nvim_set_hl(0, '@lsp.type.function.cpp', { fg = 'red' })

You can highlight all tokens with a given modifier by defining highlight group names:

vim.api.nvim_set_hl(0, '@lsp.mod.mutable.rust', { italic = true })
vim.api.nvim_set_hl(0, '@lsp.mod.readOnly', { fg = 'green' })

The default lsp.mod.* extmarks all have the same priority. If you add modifier highlights that all compose, or highlight modifiers that are mutually exclusive, then everything will work.

-- Deprecated default library functions will be both italic and strikethrough.
vim.api.nvim_set_hl(0, '@lsp.mod.defaultLibrary', { italic = true })
vim.api.nvim_set_hl(0, '@lsp.mod.deprecated',     { strikethrough = true })

-- Tokens can only have one scope in cpp, so there's no conflict here.
vim.api.nvim_set_hl(0, '@lsp.mod.fileScope.cpp',  { fg = 'red' })
vim.api.nvim_set_hl(0, '@lsp.mod.globalScope.cpp',{ fg = 'blue' })

The default lsp.both.* extmarks have higher priority, allowing for specialization:

-- Make declarations (class, function, etc...) bold.
vim.api.nvim_set_hl(0, '@lsp.mod.declaration', { bold = true })

-- But not variable declarations.
vim.api.nvim_set_hl(0, '@lsp.both.variable.declaration', { link = '@lsp.type.variable' })

LspTokenUpdate autocommand

The highlight-based customizations described above are straightforward, but limited. If a user wants arbitrary matching logic, they can use the LspTokenUpdate event to define callbacks that apply highlights to tokens. The event fires once per updated visible token. The vim.lsp.semantic_tokens.highlight_token function is provided to simplify creating a correct extmark for the token.

expand

Examples using LspTokenUpdate

Here is an example highlighting mutable global variables:

local st = vim.lsp.semantic_tokens
vim.api.nvim_create_autocmd("LspTokenUpdate", {
  callback = function(args)
    local token = args.data.token
    if
      token.type == "variable"
      and token.modifiers.globalScope
      and not token.modifiers.readonly
    then
      st.highlight_token(token, args.buf, args.data.client_id, "MyMutableGlobalHL")
    end
  end,
})

vim.api.nvim_set_hl(0, 'MyMutableGlobalHL', { fg = 'red' })

Here's an example that highlights variable names written in ALL_CAPS that aren't constant:

local st = vim.lsp.semantic_tokens
vim.api.nvim_create_autocmd("LspTokenUpdate", {
  callback = function(args)
    local token = args.data.token
    if token.type ~= "variable" or token.modifiers.readonly then return end

    local text = vim.api.nvim_buf_get_text(
      args.bufnr, token.line, token.start_col, token.line, token.end_col, {})[1]
    if text ~= string.upper(text) then return end

    st.highlight_token(token, args.buf, args.data.client_id, "Error")
  end,
})

@github-actions github-actions bot added lsp lua stdlib labels Jan 27, 2023
@clason
Copy link
Member

clason commented Jan 27, 2023

Thank you for that well reasoned and explained proposal! This sounds like a reasonable compromise to me, although I know some people will be apoplectic about colorschemes containing actual logic instead of being purely declarative...

Two bikeshedding comments:

  1. @lsp instead of @sem?
  2. Is it possible to instead of
st.delete_rule() -- delete all rules
st.restore_default_rule()

do just st.restore_default_rules()? What is the default_rule?

@swarn
Copy link
Contributor Author

swarn commented Jan 27, 2023

I know some people will be apoplectic about colorschemes containing actual logic instead of being purely declarative...

I think those concerns would be reasonable. If something like this is merged, I would strongly recommend that colorscheme authors stick to adding highlights, for all the @sem.type.* values and choice @sem.mod.* values.

If they do want to supply rules, I think they should offer them as opt-in and allow users to apply them manually.

st.rule_add(require('thecolorscheme').get_rule())

I see this as part of a broader trend of neovim plugins doing things on request, rather than doing things automatically.

  1. @lsp instead of @sem?

Yeah, I feel the names can change. @lsp.type.function works as well as @sem.type.function.

do just st.restore_default_rules()? What is the default_rule?

I played with both versions of this: restore_default_rule calling delete internally, or not. I defaulted to more explicit control; you can add rules then apply the default afterwards, if you want. But, I don't have a strong opinion on this.

The default rule implements the behavior described above, and is simply

local default_rule = function(token, bufnr, priority, namespace)
  local ft = vim.bo[bufnr].filetype

  local mark = function(hl_group, delta)
    vim.api.nvim_buf_set_extmark(bufnr, namespace, token.line, token.start_col, {
      hl_group = hl_group,
      end_col = token.end_col,
      priority = priority + delta,
      strict = false,
    })
  end

  mark(string.format('@sem.type.%s.%s', token.type, ft), 0)

  for _, modifier in ipairs(token.modifiers) do
    mark(string.format('@sem.mod.%s.%s', modifier, ft), 1)
  end
end

Copy link
Contributor

@jdrouhard jdrouhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. Just a couple comments. You may have to mark some of the local helper functions as @private so gen_vimdoc.py doesn't try to add documentation for them.

runtime/lua/vim/lsp/semantic_tokens.lua Outdated Show resolved Hide resolved
runtime/lua/vim/lsp/semantic_tokens.lua Outdated Show resolved Hide resolved
runtime/lua/vim/lsp/semantic_tokens.lua Show resolved Hide resolved
@swarn

This comment was marked as resolved.

@clason

This comment was marked as resolved.

@clason

This comment was marked as resolved.

@swarn
Copy link
Contributor Author

swarn commented Jan 30, 2023

To be clear, are you recommending the following?

  1. Remove restore_default_rule
  2. Remove the colorscheme option in add_rule

If so, I'll do both.

For later, it might be easiest to simply add colorscheme as a fourth scope (after global, ft, and buffer).

I'd strongly prefer to keep this PR focused on user customization

100% agreement from me. Previous discussion centered on colorschemes, so I wanted to address them. But I am comfortable just leaving a note that says "TBD: colorscheme rules" in this PR, if that's acceptable.

(In any case, I believe this is better solved at a lower level, e.g. adding a :highlight! clear that completely resets the highlight state to "factory defaults".)

I think it is useful to think about token rules as being the same kind of thing as treesitter queries or :syntax rules, because they are logic that applies highlights based on buffer contents. The complication is that both queries and syntax cleanly map to changes in filetype, while token rules may not.

So, if you specifically wanted to overload :highlight clear to reset rules, I disagree. Otherwise, I'm just making an off-topic point about separating highlighting from rules.

(Long-term, a better strategy will be to scope the rules to namespaces.)

Are you thinking of something fairly simple? Like this:

st.add_rule(fn1, { namespace = "foo"})
st.add_rule(fn2, { namespace = "foo"})

-- sometime later, delete all foo rules
st.delete_rule({namespace = "foo"})

If so, that's straightforward to implement as part of this PR.

@clason

This comment was marked as resolved.

@clason
Copy link
Member

clason commented Jan 31, 2023

@Lsp instead of @sem?

Followup bike to shed: do we really need to specify .type. and .mod.? Is there a realistic danger for the same name to be used both as a type and a modifier and needing to be distinguished?

@swarn
Copy link
Contributor Author

swarn commented Jan 31, 2023

Followup bike to shed: do we really need to specify .type. and .mod.?

I agree that it's unlikely there will be clashes between token types and modifiers.

But, I think of that question like this: are we sure that no LSP server implementation will ever reuse the same name in the lists of tokens and modifier? My answer is, why wouldn't they? They're two separate lists.

So, I am OK with making the names slightly longer to ensure it's never a problem. This seems like a very low cost.

This also allows highlighting @lsp.type to catch all off-spec types.

runtime/doc/lsp.txt Outdated Show resolved Hide resolved
runtime/doc/lsp.txt Outdated Show resolved Hide resolved
@swarn

This comment was marked as resolved.

@clason

This comment was marked as resolved.

@bfredl bfredl added this to the 0.9 milestone Feb 2, 2023
@swarn
Copy link
Contributor Author

swarn commented Feb 2, 2023

@clason, I have not ignored your earlier parenthetical note:

I also would prefer not to set implicit priorities based on order

The implicit priority setting is not required for this PR, but I do think it is useful, and a sane default.

Consider the following code:

st.add_rule(function(token)
  if token.modifiers.a and token.modifiers.b then
    return "ab_highlight"
  end
end)

st.add_rule(function(token)
  if token.modifiers.c then
    return "c_highlight"
  end
end)

hl(0, 'ab_highlight', { fg = 'red' })
hl(0, 'c_highlight', { fg = 'blue' })

If a token has modifiers a, b, and c, is it red or blue? The API could just shrug and pass on this question, but I think the intent is clear. Consider:

vim.api.nvim_set_hl(0, 'Highlight', { fg = 'red' })
vim.api.nvim_set_hl(0, 'Highlight', { fg = 'blue' })

We know that the later call "wins." So, I think that having an incrementing default priority will prevent confusion by matching expectations.

I believe that strongly enough that I prefer having no default priority to having a constant default priority. That is, make the signature:

add_rule({rule}, {priority}, {opts})

Than means a user would write:

st.add_rule(function(token)
  if token.modifiers.a and token.modifiers.b then
    return "ab_highlight"
  end
end, 1000)

st.add_rule(function(token)
  if token.modifiers.c then
    return "c_highlight"
  end
end, 1000)

And the answer to "why is it sometimes one and sometimes the other?" would at least be right there in the rule creation.

In that case, it might be worthwhile to add a new value in vim.highlight.priorities that is guaranteed to be higher than any used by the default rule, but I'm not sure.

@clason
Copy link
Member

clason commented Feb 2, 2023

I think this analogy is fraught, since highlight is a prior Vim API that we (need to) replicate, but add_rule is a new Lua function and should therefore behave like a Lua function.

So if you care about priority, you need to explicitly set priority. This is the same way as extmarks work, which this is much closer to.

@swarn
Copy link
Contributor Author

swarn commented Feb 3, 2023

Output of the modified :Inspect
inspect

@clason
Copy link
Member

clason commented Feb 3, 2023

Further call for simplification (sorry that it's going piecemeal, but this PR is a huge wall of text):

  1. What is the use case for a rule applying extmarks directly? Why is just returning a highlight name not enough? (I mean, a callback of course can do whatever it wants, including wiping your hard drive, but do we really need to document this as an intended scenario?)
  2. Do we really need ft and bufnr as options? If you write a rule, you can just add your own check. For that it's sufficient to have the callback accept bufnr (which can be used to extract all manner of information, not just filetype) and token (in this order, which is the customary order throughout the API).

On a similar note, the callback can return a pair (string,number|nil), then priority doesn't need to be an extra argument.

@swarn
Copy link
Contributor Author

swarn commented Feb 3, 2023

(sorry that it's going piecemeal, but this PR is a huge wall of text):

I chose, for my first neovim PR, a user-facing API for a new feature. That was an objectively foolish choice. I really appreciate the time you're spending helping this fool improve his PR!

  1. What is the use case for a rule applying extmarks directly?

The default rule shows one use case: applying multiple highlights, in this case one per modifier. If the API is too simple to create the default rule, it's too simple.

You might reasonably respond, "why not allow returning a table of highlights?" Sure, that can be added. But, what if the user wants them at different priority levels? Then, we could debate whether that seems reasonable, and if it is worth adding more complexity to the return type. And we could do it again for the next "what if."

The fact that users can set extmarks in rules means that the default callback behavior can be as simple as possible — one returned highlight or nil — while also supporting use cases that I haven't imagined. It is a core benefit of this callback-based approach. As an extra benefit, we don't have to debate what seems like a reasonable use of a tool that doesn't exist yet. In any case, you can't prevent users from setting extmarks in rules, all you can do is make it harder to do correctly.

I could bundle all the usually-unneeded arguments into a single table to tidy up the callback parameters. Something like callback(token, context) where context is a table with bufnr, ns, etc.

  1. Do we really need ft and bufnr as options?

It's true, you could implement those checks in your own rules. For filetype-specific rules, you'd probably just add it inside the rule:

local function a_rule(token, bufnr)
  if vim.bo[bufnr].filetype ~= "lua" then return
  -- actual rule here
end

The fact that you might end up evaluating a bunch of rules for other filetypes is a performance pessimization that will likely be meaningless. You could load filetype-specific rules in a once filetype autocommand, if you feel like it.

For buffer-specific rules, maybe a decorator approach:

local function some_rule(token) ... end

local function buffer_scoped(rule, scope)
    return function(token, bufnr, pri, ns)
        if bufnr ~= scope then return end
        return rule(token, bufnr, pri, ns)
    end
end

st.add_rule(buffer_scoped(some_rule, a_bufnr), 130, { desc = "some_rule for buffer " .. a_bufnr })

I think most non-trivial rules will be server-specific. The ft argument was just an easy near-enough approximation to server type, while I had imagined using buffer-scoped rules in on_attach for getting it exactly right. But, on further consideration, that seems to needlessly duplicate a lot of rules. I could instead make the change to the callback arguments mentioned above, and add a server field to the context:

local function another_rule(token, context)
  if context.server ~= "clangd" then return
  -- actual rule here
end

There's another wall of text for you. To summarize:

  • Extmarks in callbacks allow customization while keeping the API simple
  • I will remove the ft and buffer args from add_rule
  • I will change the callback signature to the two-argument form (token, context), and add server info to the second argument.

Thoughts?

@clason
Copy link
Member

clason commented Feb 3, 2023

Extmarks in callbacks allow customization while keeping the API simple

Of course; I still think it's not something we need to advertise widely.

I will remove the ft and buffer args from add_rule

Agreed; premature performance optimization is the root of all evil. That being said, if there's a benchmark that shows noticeable impact, then having this option is of course good.

I will change the callback signature to the two-argument form (token, context), and add server info to the second argument.

Again, having a (much) simpler API is worth a (small) amount of boilerplate. I'm not a great fan of just stuffing everything into a context table, in particular here as this looks like a real grab bag:

  • filetype can be easily looked up from bufnr, no need to pass it unless that can be demonstrated to have a performance impact;
  • namespace has a very different purpose (it namespaces the rule itself, not the token), so it should go into an opts table of the add_rule function (if and when it is implemented, not now!)
  • server in our context is more typically client.name, so I'd rather use the standard pattern of passing client directly (again, until it's shown to affect performance).

So add_rule(token, client, bufnr) sounds to me like a reasonable signature. But not sure we need bufnr if we have client then? I would welcome practical examples for its use. Any reasonable use, we'd add an example in the docstring showing the correct boilerplate.

@swarn
Copy link
Contributor Author

swarn commented Feb 3, 2023

  • filetype can be easily looked up from bufnr, no need to pass it

I agree. I used filetype lookup in the default rule and in the example above.

namespace has a very different purpose (it namespaces the rule itself, not the token), so it should go into an opts table of the add_rule function

I believe we are thinking of two different uses of namespace. I'm not thinking of an argument to add_rule. I'm thinking of an argument supplied to the callback. It's needed so that any extmarks applied inside the callback can be correctly managed by the decoration provider for semantic token highlights. Basically, "use this namespace if you want your extmarks to be automatically updated correctly."

At some point in the future, it could be useful to name sets of rules — a conceptual namespace for rules. But I'm not sure why you'd want that to be a literal :h namespace.

server in our context is more typically client.name, so I'd rather use the standard pattern of passing client

Very good point, passing client is both more idiomatic and more useful.

But not sure we need bufnr if we have client then? I would welcome practical examples for its use.

Well, we've mentioned looking up filetype, and that is used by the default rule. Also, I've got an example in the "Complex Logic" section of the (frequently changing) first comment in this thread using nvim_buf_get_text. In general, the buffer number is the key to a lot of information.

This would end up with a callback function callback(token, bufnr, client, ns).

@clason
Copy link
Member

clason commented Feb 3, 2023

I believe we are thinking of two different uses of namespace. I'm not thinking of an argument to add_rule. I'm thinking of an argument supplied to the callback. It's needed so that any extmarks applied inside the callback can be correctly managed by the decoration provider for semantic token highlights. Basically, "use this namespace if you want your extmarks to be automatically updated correctly."

Hmmm. I think that this needlessly complicates the API. I would prefer that

  • add_rule is for adding a single rule, returning a highlight name and optionally a priority.
  • the default_rule is special and can use internal stuff (in particular the (fixed!) namespace for semantic tokens).

If there is a strong(!) argument for adding a custom_rule that can (more conveniently) do lower-level stuff, we add it later. I strongly suggest not trying to shoehorn both "convenient simple" and "powerful complex" into a single function. I really don't think we should design add_rule around applying extmarks directly.

@clason
Copy link
Member

clason commented Feb 3, 2023

To put it bluntly, I'm not convinced that either of the "complex logic" examples is something we should support; this is veering dangerously into "look at the neat stuff we could do", where "stuff" is actually the language server's job, not the client's. Feature creep is a very real problem.

Of all the examples you've shown, client-specific rules are the only ones I really see as compelling -- although those could also be done by adding the rule as part of the on_attach callback or LspAttached autocommand, which is our standard pattern for LSP setup and config and therefore a very strong precedent.

Maybe we should get some benchmarks for adding rules and highlighting with them before continuing the discussion? I would also find it very helpful to see an actual complete example how one would use this in the context of setting up a server (using vim.lsp.start()).

@swarn
Copy link
Contributor Author

swarn commented Feb 3, 2023

Maybe we should get some benchmarks

I'm happy to do some benchmarking. What numbers are you looking for? Given that the rule callbacks are only called for visible tokens, I can't imagine that we'll see any meaningful difference for reasonable numbers of rules. If it wasn't clear, I think you're right about eliminating the scope options (ft and bufnr) from add_rule, and handling that functionality via guards inside the rules. Wasn't that the only context for performance concerns?

how one would use this

If I only wanted to load needed rules, I might add rules in an autocommand like so:

local clangd_rule_specs = {
  {
    function(token, bufnr, client)
      if client.name ~= "clangd" then return end
      -- ...
    end, 130, "clangd rule a"
  },
  { function(token, bufnr, client) ... end, 131, "clangd rule b" },
  { function(token, bufnr, client) ... end, 132, "clangd rule c" },
}

local clangd_rules_added = false

vim.api.nvim_create_autocmd("LspAttach", {
  callback = function(args)
    local client = vim.lsp.get_client_by_id(args.data.client_id)

    if clangd_rules_added or client.name ~= "clangd" then
      return
    end

    clangd_rules_added = true
    for _, spec in ipairs(clangd_rule_specs) do
      local rule, pri, desc = unpack(spec)
      vim.lsp.semantic_tokens.add_rule(rule, pri, { desc = desc })
    end
  end,
})

You could do something similar in on_attach, especially if you wanted buffer-scoped rules. But, given the ability to guard on client name, that seems unnecessary.

this is veering dangerously into "look at the neat stuff we could do"

Ha! I'd be careful with that. We've been programming for a long time without semantic highlighting; is there anything you can do with it that can't be dimissed as merely "neat?" There are a lot of neovim features that are just neat! I like my global status bar!

I will say that many C++ codebases have naming guidelines, things like "parameters start with t_". It's great to automatically show violations of those guidelines, both false positives and false negatives. While I don't know that highlighting misleadingly-named variables rises above neat, it shows what you can do very easily with a simple callback mechanism that can get the text.

One point is to contrast this callback approach with a DSL approach — implemented inside highlight names or otherwise — which seems like vastly more work to achieve less functionality.

where "stuff" is actually the language server's job

The server has done its job: it's telling us what is a variable, and what is read-only. Deciding how that should look is the client's job, I think.

Hmmm. I think that this needlessly complicates the API.

So, I'm thinking about this callback signature:

callback(token, bufnr, client, ns)

Are you saying that all of bufnr, client, and ns are too much? They don't seem like "shoehorning" to me — though I understand that is the issue at hand. But, simple callbacks just use the first argument. The other arguments give you access to, respectively, information about the text, the LSP server, and the ability to set correctly-managed extmarks. It doesn't seem extravagant, while it does seem like it is sufficient to prevent needing any other complex_rule function (famous last words!).

the default_rule is special and can use internal stuff

I feel pretty strongly about this one. Dogfooding is a straightforward way to determine if your API is sufficient. If we can't implement the default rule with the API, then the API is not good enough. I don't have have a knock-down, must-have use case that demonstrates the need for the extra arguments; again, I don't think there are must-have semantic tokens use cases. You're probably tired of reading this, but one of my goals here is to support uses I haven't thought of. If the API can't support the — very simple! — default rule, then there are probably a lot of interesting uses that it can't handle.

@swarn
Copy link
Contributor Author

swarn commented Feb 4, 2023

Easier side question: what's a good name/behavior for a command to print a table of current rules? :LspRuleInfo in a pop-up?

@mfussenegger
Copy link
Member

Not sure where to start given the amount of conversation that already happened, so I'll just leave some questions and thoughts. In no particular order:

  • I like that it keeps semantic tokens enabled by default

  • Why do we need to distinguish between LSP and Treesitter in the default highlight groups?

    • Advantage of not distinguishing:
      • Color schemes designed for Tree-sitter may yield better results to users if TS is not in use but LSP is
    • Disadvantage: Can't distinguish, but why is that a Problem? Tokens are usually not ambiguous. If something is a function, it's a function.
  • Couldn't one already accomplish a similar form of customization by using nvim_set_decoration_provider with get_at_pos(...), or maybe an additional .get() to retrieve token information? Relates a bit to your point of making complex things possible. It would give even more power without having to introduce new systems (that people need to learn and understand). And making it easy to do complex things is not the main priority.

  • I still miss a couple of concrete use-cases where I'd feel like "Oh yes, I'd want that". It's kinda hard to judge the proposed API against vague requirements. Good rule of thumb is to have 2-3 concrete use-cases to validate a design. E.g I can see how it's valuable to have a different highlighting on declarations, deprecated variables or readonly variables, but as I understood this would be possible with a design as initially proposed in Better semantic token modifiers #21576. Maybe this rule system is already entering Attractive nuisances territory?

  • I'm still not sure how I feel about having a custom highlight rule system specifically for LSP. I'd kinda prefer it if the LSP highlighter were merely an implementation detail given that the notation of semantic tokens and modifiers is conceptionally not exclusive to LSP but it just happens that it's currently the only source for it. On the other hand, that didn't stop us from making other LSP exclusive APIs, so maybe this point is moot.

  • I'm kinda in a weird spot with this as I don't care about highlighting much myself, so I mainly see this as maintenance burden, but you clearly put quite a lot of thought into this, so I don't want to say no to this either but I'd feel a lot better about this if in addition to @clason, @folke is also on board with this as he's also in the LSP reviewer group and maintains a popular colorscheme.

I can review some of the implementation details once it's clear that a rule system is really what we want to have.

@marvim marvim requested a review from a team March 2, 2023 22:13
@folke
Copy link
Member

folke commented Mar 4, 2023

I'm a bit late to the this discussion, but just wanted to say I like this approach!

runtime/doc/lsp.txt Outdated Show resolved Hide resolved
@clason
Copy link
Member

clason commented Mar 5, 2023

For the record, here's Helix' PR for integrating semantic tokens -- their theming choices are worth a look (or, rather, vice versa, since we're a good deal farther; the link goes both ways):
helix-editor/helix#6102

token.extmark_added = true
token.marked = true

api.nvim_exec_autocmds('LspTokenUpdate', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps this has been discussed before, but I think the behavior would be predictable if

  1. this code was moved before the @lsp.foo.bar code
  2. highlight_token() would set token.marked (or at least provide an option to do so)
  3. after the autocmd, we check again if token.marked was set and then disable the setting of the default highlight groups ( i e @lsp.whatever ) if this was done.

This would make it easier to completely override the behavior of a token without needing to counteract the effect of the default groups (which might set colors and attrs not set by the autocmd provided hl_group).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bikeshed, while we're at it: not crazy about both -- maybe typemod or combined or combination or somesuch would be more descriptive.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps this has been discussed before, but I think the behavior would be predictable if

  1. this code was moved before the @lsp.foo.bar code

  2. highlight_token() would set token.marked (or at least provide an option to do so)

  3. after the autocmd, we check again if token.marked was set and then disable the setting of the default highlight groups ( i e @lsp.whatever ) if this was done.

This would make it easier to completely override the behavior of a token without needing to counteract the effect of the default groups (which might set colors and attrs not set by the autocmd provided hl_group).

I really like this idea, and might even consider it a must. The one part of this PR I'm not super excited about is that the default extmarks are being added no matter what a user has in their autocmd. This would resolve that nicely.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this also mean that as soon as you want to have a single customisation you'd also need to apply all defaults as well if color schemes start using these?

I'd think it's more confusing if other highlights disappear. Afaik this was also discussed before. If there are no new substantial new arguments for a behaviour change I'd say we go ahead with this and let people actually try and use it before having another round of discussion going back and forth


Bikeshed, while we're at it: not crazy about both -- maybe typemod or combined or combination or somesuch would be more descriptive.

+1 for typemod

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this also mean that as soon as you want to have a single customisation you'd also need to apply all defaults as well if color schemes start using these?

Not if marking the token as added in the utility highlight function was optional (and false by default). Just giving the ability to override defaults for a particular token would be extremely useful and wouldn't really change the behavior this PR currently provides.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the change from @lsp.both.* to @lsp.typemod.*, which is more descriptive.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not if marking the token as added in the utility highlight function was optional (and false by default)

Right, this seems like the correct resolution. The default behavior should remain like it is, but we provide a realiable opt-in mechanism to completely override highlights for user who understand what it implies and wants that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this would be useful and straightforward to implement, but I am fine with leaving it for a future PR.

I imagine that the opts argument would add a second field; something like:

---@param opts (table|nil) Optional parameters.
---       - priority: (number|nil) Priority for the applied extmark. Defaults
---         to `vim.highlight.priorities.semantic_tokens + 3`
---       - keep_default (boolean|nil) Defaults to true. If true, apply the
---         default `@lsp.*` highlights as usual. If false, do not apply the
---         default highlights for this token.

I don't think this is the same as previous discussion about "disabling the default rule." That was about disabling all default semantic highlighting, rather than allowing you to disable it per-token using the callback.

There was also speculation about a hypothetical change enabling return values from autocommand callbacks, and how that would obviate the need for a separate highlight_token() function. Adding more logic to highlight_token() doesn't make that impossible, but maybe less clean.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the same as previous discussion about "disabling the default rule." That was about disabling all default semantic highlighting, rather than allowing you to disable it per-token using the callback.

Oh right.

I don't have a strong opinion on this but I'd really like to defer changing this to a separate PR.
If there are no other objections I'll go ahead and merge this in a bit

Change the default highlights used, and add more highlights per token.

Add an LspTokenUpdate event and a highlight_token function.

:Inspect now shows any highlights applied by token highlighting rules,
default or user-defined.

BREAKING CHANGE: change the default highlight groups used by semantic
token highlighting.
@mfussenegger mfussenegger merged commit 1cc23e1 into neovim:master Mar 6, 2023
ray-x added a commit to ray-x/starry.nvim that referenced this pull request Mar 8, 2023
ray-x added a commit to ray-x/aurora that referenced this pull request Mar 8, 2023
@justinmk justinmk changed the title feat(lsp)!: add rule-based sem token highlighting feat(lsp)!: semantic token modifiers, LspTokenUpdate Mar 8, 2023
olimorris referenced this pull request in olimorris/onedarkpro.nvim Mar 9, 2023
yesean pushed a commit to yesean/neovim that referenced this pull request Mar 25, 2023
feat(lsp)!: change semantic token highlighting

Change the default highlights used, and add more highlights per token.

Add an LspTokenUpdate event and a highlight_token function.

:Inspect now shows any highlights applied by token highlighting rules,
default or user-defined.

BREAKING CHANGE: change the default highlight groups used by semantic
token highlighting.
bfredl added a commit that referenced this pull request Apr 7, 2023
For a summary of notable changes, see runtime/doc/news.txt or run `:help news` within nvim.

BREAKING CHANGES
- Remove hardcopy
- Make iconv a non-optional dep
- Remove has("debug") (#22060)
- Make libintl a required dependency
- Rename vim.pretty_print => vim.print
- Rename sanitizer options from CLANG_* to ENABLE_*
- Remove the .deb release (#22773)
- **column**: Ensure 'statuscolumn' works with virtual and wrapped lines
- **cscope**: Remove
- **defaults**: Change default 'commentstring' value to empty (#22862)
- **edit**: Remove old c implementation of hebrew keymap
- **editorconfig**: Change editorconfig_enable to editorconfig
- **exepath**: Prefers extensionless for powershell
- **health**: Remove deprecated health.lua
- **lsp**: Add rule-based sem token highlighting (#22022)
- **lua**: Execute Lua with "nvim -l"
- **messages**: Graduate the 'msgsep' feature
- **options**: Deprecate paste, remove pastetoggle (#22647)
- **rpc**: Preseve files when stdio channel is closed (#22137)
- **runtime**: Remove filetype.vim (#20428)
- **treesitter**: Remove g:ts_highlight_lua (#22257)
- **treesitter**: Remove silent option from language.add()
- **treesitter**: Consolidate query util functions
- **treesitter**: Remove deprecated show_tree func
- **treesitter**: Deprecate top level indexes to modules (#22761)
- **treesitter**: Rename help parser to vimdoc

FEATURES
- Added support for @generic to lua2dox.lua
- Added support for optional params to lua2dox
- Added support for specifying types for lua2dox
- Mention ":help news" in intro #20674
- ":write ++p" creates parent dirs #20835
- Add vim.secure.read()
- `vim.inspect_pos`, `vim.show_pos`, `:Inspect`
- $NVIM_APPNAME #22128
- Try to recover from missing tempdir #22573
- Add `vim.filetype.get_option()`
- Add `vim.treesitter.language.get_filetypes()` (#22643)
- Allow function passed to defaulttable to take an argument (#22839)
- **api**: Nvim_select_popupmenu_item support cmdline pum (#20652)
- **api**: Add command name to Lua command callback opts
- **api**: Show more exception info
- **api**: More fields in nvim_list_uis
- **api**: Add filetype option nvim_get_option_value
- **api**: Add nvim_get_hl (#22693)
- **api**: Nvim_exec2(), deprecate nvim_exec() #19032
- **api**: Evaluate 'statuscolumn' with nvim_eval_statusline()
- **api**: Set statuscolumn line number in nvim_eval_statusline()
- **aucmd_win**: Allow crazy things with hidden buffers (#21250)
- **checkhealth**: Improve treesitter report
- **checkhealth**: Check runtime ($VIMRUNTIME)
- **checkhealth**: Use "help" syntax, avoid tabpage #20879
- **clipboard**: Copy to system clipboard in tmux when supported (#20936)
- **clipboard**: Added wayclip support (#21091)
- **diagnostic**: Add `suffix` option to `open_float()` (#21130)
- **diagnostic**: Add `suffix` option to `virt_text` config (#21140)
- **diagnostic**: Don't open quickfix/loclist if no diagnostics #21397
- **diagnostic**: Vim.diagnostic.is_disabled() #21527
- **diagnostic**: Add support for tags
- **docs**: Nested lists in HTML, update :help parser
- **docs**: Format parameters as a list #20485
- **docs**: Update parser, HTML gen #20720
- **docs-html**: Try to use tags for ToC headings
- **editorconfig**: Add builtin EditorConfig support
- **editorconfig**: Add editorconfig syntax file
- **editorconfig**: Allow editorconfig to be toggled dynamically
- **exrc**: Use vim.secure.read() for 'exrc' option
- **exrc**: Support .nvim.lua (#21436)
- **extmarks**: Allow preventing spellchecking with spell = false
- **extmarks**: Extend nvim_buf_get_extmarks()
- **filetype**: Fall back to file extension when matching from hashbang (#22140)
- **float**: Open float relative to mouse #21531
- **fs**: Add opts argument to vim.fs.dir()
- **gen_help_html.lua**: Remove old AWK scripts
- **health**: Detect tmux RGB support via `client_termfeatures`
- **help**: Highlighted codeblocks
- **highlight**: Add DiagnosticOk (and associated) highlight groups (#21286)
- **highlight**: Define the concept of altfont as a (c)term rendering attribute
- **l10n**: Update Turkish translations (#20444)
- **l10n**: Update zh_CN translations (#21085)
- **lsp**: Add bufnr option to lsp.start (#20473)
- **lsp**: Support window/showDocument (#19977)
- **lsp**: Run handler in coroutine to support async response (#21026)
- **lsp**: Support set title in lsp relate floatwindow (#21110)
- **lsp**: Support willSave & willSaveWaitUntil capability (#21315)
- **lsp**: Initial support for semantic token highlighting
- **lsp**: Highlight semantic token modifiers (#21390)
- **lsp**: Add function to get semantic tokens at cursor
- **lsp**: Add function to clear codelens (#21504)
- **lsp**: Show active clients in :checkhealth vim.lsp (#21670)
- **lsp**: Add triggerKind option for vim.lsp.buf.code_action (#21905)
- **lsp**: Implement workspace/didChangeWatchedFiles (#21293)
- **lsp**: Implement workspace/didChangeWatchedFiles (#22405)
- **lsp**: Overwrite omnifunc/tagfunc set by ftplugin #22267
- **lsp**: Render markdown in docs hover #22766
- **lsp**: Create default link from @lsp.type.comment to Comment (#22888)
- **lua**: Send "--" literally to Lua "-l" script
- **lua**: Exit 1 on Lua "-l" script error
- **lua**: Execute stdin ("-") as Lua
- **lua**: Store "nvim -l" scriptname in _G.arg[0]
- **lua**: Low-level interpreter mode (nvim -ll)
- **lua**: Make sure require'bit' always works, even with PUC lua 5.1
- **lua**: Add semver api
- **lua**: Omnifunc for builting lua interpreter
- **lua**: Use vim.empty_dict() for empty return value in new api functions  (#22737)
- **lua**: Allow `:=expr` as a shorter version of `:lua =expr`
- **lua**: Add `vim.loader`
- **lua-api**: Avoid unnecessary allocations (#19877)
- **man**: Add health check
- **man.lua**: Support spaces in manpage names
- **message**: Avoid spam on failed os_msg
- **packaging**: Add start menu and desktop shortcuts on Windows
- **provider**: Add support for Yarn node modules on Windows (#21246)
- **secure**: Add `:trust` command  and vim.secure.trust() (#21107)
- **spell**: Support nospell in treesitter queries
- **spell**: Also source `spell/LANG.lua` when setting `spelllang` (#22111)
- **test**: Add Lua forms for API methods (#20152)
- **treesitter**: Add vim.treesitter.show_tree() (#21322)
- **treesitter**: Add 'lang' option to show_tree() (#21341)
- **treesitter**: Show filetype associated with parser (#17633)
- **treesitter**: Allow capture text to be transformed
- **treesitter**: Add metadata option for get_node_text
- **treesitter**: Respect metadata[id].range for offset!
- **treesitter**: Playground improvements
- **treesitter**: Add filetype -> lang API
- **treesitter**: Upstream foldexpr from nvim-treesitter
- **treesitter**: Expand the API
- **treesitter**: Add :InspectTree command (#22477)
- **treesitter**: Bundle query parser and queries (#22483)
- **treesitter**: Use upstream format for injection queries
- **tui**: Run TUI as external process
- **tui**: Graduate the +tui feature
- **tui**: Support altfont mode in tui.c
- **ui**: Add support to display a title in the border of a float (#20184)
- **ui**: Add 'statuscolumn' option
- **ui**: Restore has('gui_running')
- **ui**: Add scroll_delta to win_viewport event #19270
- **vim-patch**: Mention original author #20772
- **vim.diff**: Allow passing an integer for linematch
- **vim.fs**: Pass path to find() predicate, lazy evaluate #22378
- **vim.fs**: Improve normalize
- **vim.gsplit**: Gain features of vim.split
- **vim.version**: More coercion with strict=false
- **web**: Syntax highlighting via highlight.js
- **window/ui**: Add splitkeep option (#19243)
- **windows**: Show icon in terminal titlebar, taskbar #20607

PERFORMANCE
- **column**: Only build fold/sign column when present in 'statuscolumn'
- **completion**: Use one call to globpath() for .vim and .lua #21942
- **diagnostic**: Use api variable and improve validate (#21111)
- **lsp**: Update semantic tokens algorithm for parsing modifiers (#21383)
- **lsp**: Only redraw the windows containing LSP tokens
- **lsp**: Better binary search mid calculation in semantic token (#22607)
- **statuscolumn**: Only fill click defs array once per redraw (#21884)
- **statusline**: UI elements are always redrawn on K_EVENT
- **treesitter**: Smarter languagetree invalidation
- **treesitter**: More efficient foldexpr
- **ui**: Mitigate redraw latency regression from TUI refactor

BUG FIXES
- Make_filter_cmd for :! powershell
- :! pwsh redirection for `command not found`
- Find multibyte file name in line (#20519)
- Change did_emsg back to int
- 'scroll' is not set correctly for floats with 'splitkeep'
- Setting tabline option not redrawing tabline
- Avoid unsigned overflow in home_replace() (#20854)
- Add lfs to luarc.json (#20979)
- Vim.ui.input always calls callback #21006
- Don't disable compositor widgets when a GUI with multigrid attaches
- Pvs warnings (#21145)
- Clang warnings (#21247)
- Vim.opt_local:append ignoring global option value (#21382)
- Issues with command line if ui elements are externalized
- Properly close builtin popup in ext_popupmenu
- Failing XDG test on Windows CI
- Pass value instead of pointer to isalpha (#21898)
- Use correct number for INT_MAX (#21951)
- Add manifest file to correctly determine Windows version (#21953)
- Uv_tty_set_mode failed in Windows #22264
- Lsp github issue template example (#22285)
- Remove "Features" section from --version/:version (#22315)
- Remove "Compiled by:" from :version/--version (#22316)
- Add missing void as function argument (#22317)
- Windows assertion failure due to incorrect path length (#22324)
- Resolve error from -Werror=maybe-uninitialized
- Address -Wmaybe-uninitialized warnings (#22436)
- Pasting in terminal buffer on windows #22566
- Invalid buffer size argument to snprintf #22729
- Snprintf buffer overflow detected by -D_FORTIFY_SOURCE=3 (#22780)
- **MSVC**: Set the active code page to utf-8 (#22384)
- **Windows**: Restore console title at exit #21922
- **api**: Dynamically allocate line buffer for nvim_out_write (#20537)
- **api**: Nvim_buf_get_text regression (#21071)
- **api**: Nvim_win_set_cursor redraw cursorcolumn for non-current window (#21072)
- **api**: Set correct curbuf when temporarily changing curwin (#21371)
- **api**: "emsg_silent" should imply "silent" in nvim_cmd (#21438)
- **api**: Nvim_create_autocmd crash on invalid types inside pattern array
- **api**: Avoid memory leak with click functions in nvim_eval_statusline() (#21845)
- **api**: Don't allow hiding aucmd_win from another tabpage (#21975)
- **api**: Allow empty Lua table for nested dicts #22268
- **api**: Set script context when setting usercmd or option (#22624)
- **api**: Vim.filetype.get_option() (#22753)
- **api**: Make nvim_get_hl return 'cterm' attrs properly
- **api**: Use local LastSet structure in nvim_get_option_info (#22741)
- **api**: Return both link and attributes with nvim_get_hl (#22824)
- **api**: Avoid double hit-enter prompt with nvim_err_writeln (#22879)
- **autocmd**: Handle recursion for force set (#22820)
- **buffer_updates**: Save and restore current window cursor (#16732)
- **build**: "make clean" fails
- **build**: Duplicate version string "v0.8.0-v0.8.0" #20578
- **build**: Fix invalid use of EXITFREE
- **chansend**: Sending lines to terminal in reverse order on Windows #19315
- **ci**: Skip test on windows (#21502)
- **ci/release/winget**: Bump action version
- **client**: Wait for session to exit
- **clint**: Disable whitespace/newline #20619
- **clipboard**: Prefer xsel #20918
- **clipboard**: Update version regex pattern (#21012)
- **clipboard**: Show provider warning when not during batch changes #21451
- **column**: Avoid drawing columns for virt_lines_leftcol
- **column**: Estimate 'statuscolumn' width appropriately
- **column**: No longer reset nrwidth_line_count for 'statuscolumn'
- **column**: Cmdwin cursor is offset with 'statuscolumn' (#22445)
- **column**: Issues with 'statuscolumn' width (#22542)
- **column**: Rebuild status column when sign column is invalidated (#22690)
- **column**: Invalidate statuscolumn width when UPD_NOT_VALID (#22723)
- **completion**: Set pum_size even if ext_popupmenu is used (#20648)
- **completion**: Correct what modes support fuzzy completion
- **completion**: Include lua syntaxes in :ownsyntax completion (#21941)
- **coverity/433537**: Don't call kv_concat_len() when read_size is 0 (#21664)
- **decoration**: Redraw correctly when re-using ids
- **decoration**: Call providers in win_update() earlier
- **decoration**: Do not reset must_redraw after calling providers (#21459)
- **decoration**: Don't show signcolumn for non-sign_text extmark (#22135)
- **diagnostic**: Correct type annotations; add Diagnostic type (#21120)
- **diagnostic**: Clear stale cache on reset (#21454)
- **diagnostic**: Sort diagnostics by column (#21457)
- **diagnostic**: Revert notification on missing diagnostics (#21632)
- **diagnostic**: Use correct field name for tags (#22835)
- **diff**: Remove size_t underflow (#20929)
- **diff**: Fix a crash in diff mode with linematch enabled (#21070)
- **diff**: Handle long lines without crashing (#21389)
- **diff**: Avoid restoring invalid 'foldcolumn' value (#21650)
- **diff**: "nvim -d" should only diff arglist files #21829
- **diff**: Adjust extmarks after diffput/diffget (#22440)
- **diff**: Add NULL check
- **diff**: Trigger on_bytes only once after diffget/diffput
- **diff.c**: Regression in diffgetput (#20843)
- **docs**: Missing "(" in :help HTML
- **docs**: Nil as viable argument for goto_prev (#20852)
- **docs-html**: Keycodes, taglinks, column_heading #20498
- **docs-html**: Update parser
- **docs-html**: Misaligned tabs after conceal #20690
- **edit**: Don't subtract msg_scrolled when removing double quote (#22630)
- **editorconfig**: Do not highlight unknown properties as errors (#21673)
- **embed**: Handle stdio in server properly
- **eval**: Make error number of charidx() same as Vim
- **eval**: Change some tv_dict_add() usages back to hash_add()
- **events**: Save v:event for cmdline autocommands separately (#21316)
- **events**: Skip WinScrolled for newly-created float windows (#21333)
- **ex_cmds**: Fix a mistake in the porting of Vim patch 8.1.0306 (#21096)
- **exit**: The TUI should not ui_flush() itself (#21625)
- **exit**: Skip unnecessary steps in TUI preserve_exit() (#21897)
- **extmarks**: Adjust extmarks when inserting prompt prefix
- **extmarks**: Problems with folded virtual lines (#21930)
- **extmarks**: Don't leak memory on error (#22507)
- **fileio**: Use first available directory in backupdir for backupcopy (#20655)
- **fileio.c**: Don't use uninitialized memory (#22031)
- **filetype**: Don't pass empty string to detect (#20766)
- **filetype**: Correctly detect tex files
- **filetype**: Make vim.filetype.match() work with contents only (#22181)
- **filetype**: Avoid recursive FileType autocmds (#22813)
- **filetype**: Make recursive work...again (#22826)
- **float**: Make closing float in another tab return to correct window
- **float**: Fix ml_get error with bufpos
- **float**: Fix crash with bufpos and non-existent window (#21319)
- **float**: Remove -1 in height clamp
- **folds**: Fix fold marker multibyte comparison (#20439)
- **folds**: Use long for number of folded lines (#21447)
- **folds**: Cursorline highlight is not always applied on closed folds (#22242)
- **folds**: Handle visual blockwise indent insertion correctly (#22898)
- **fs**: Duplicate path separator #21509
- **health**: Correct tmux rgb verification (#20868)
- **health**: Fix `tmux_esc_time` comparison
- **health**: Iterate using ipairs correctly (#22119)
- **health**: Stop using deprecated ts.language.inspect_language() (#22850)
- **help**: Force tree reparse after local addition insertion
- **helpers**: Restore channel id after a call to WITH_SCRIPT_CONTEXT
- **highlight**: Link more treesitter groups by default (#20711)
- **highlight**: Properly deal with underline mask when listing (#22057)
- **highlight**: Avoid ORing underline flags (#22372)
- **highlight**: Use winhl=Foo:Bar even when Bar is empty
- **inspect**: Alwasy resolve full treesitter lang hl groups
- **intro**: Omit patch version in ":help news" item #20713
- **intro**: Make :help news line easier to translate (#21974)
- **lintcommit**: Capitalized description #22282
- **loader**: Disable profiling by default
- **lsp**: Reporting bogus capabilities in CodeActionKind #20678
- **lsp**: Ignore hover and signatureHelp responses on buffer change (#21121)
- **lsp**: Render <pre>{lang} code blocks and set separator default to false (#21271)
- **lsp**: Remove workspaceFolders field (#21284)
- **lsp**: Call show_document with correct args
- **lsp**: Ensure open_logfile is safe for fast events (#21288)
- **lsp**: Followup fixes for semantic tokens support (#21357)
- **lsp**: Correct some type annotations (#21365)
- **lsp**: Fix get_active_clients bufnr parameter (#21366)
- **lsp**: Ignore null responses for semanticTokens request (#21364)
- **lsp**: Token_edit.data might be null on deletion (#21462)
- **lsp**: Adjust gravity of semantic tokens extmarks (#21574)
- **lsp**: Fix nil client access in get_active_clients (#21524)
- **lsp**: Change vim.lsp.get_active_clients.filter name annotation to string (#21624)
- **lsp**: Correct callHierarchy capability to fix lsp.buf.incoming_calls() (#21665)
- **lsp**: Fix `removed` param value in add_workspace_folder (#21915)
- **lsp**: Assert workspace/applyEdit receives params (#21945)
- **lsp**: Check method is supported when range formatting (#21970)
- **lsp**: Check if the buffer is a directory before w! it (#22289)
- **lsp**: Wrong format of bufnr and client order in error message (#22336)
- **lsp**: Fix some type annotations (#22397)
- **lsp**: CallHierarchy methods also require the callHierarchyProvider (#22427)
- **lsp**: Use buffer scheme for files not stored on disk (#22407)
- **lsp**: Only fire LspDetach for attached buffers (#22468)
- **lsp**: Don't monitor files if workspace_folders is nil (#22531)
- **lsp**: Change LspTokenUpdate to use buffer instead of pattern (#22559)
- **lsp**: Prevent lsp tests from picking up local user config (#22606)
- **lsp**: Send didClose on buffer rename (#22623)
- **lsp**: Use line start/end for visual line selection (#22632)
- **lsp**: Remove_workspace_folders fails if client has no workspace_folders #22633
- **lsp**: Vim.lsp.util.apply_text_edits cursor validation #22636
- **lsp**: Kill buffers after renaming a directory #22618
- **lsp**: Avoid switching buffers on lsp attach (#22689)
- **lsp**: Jump to tag locations reliably when :ltag is used (#22750)
- **lsp**: Add missing silent check in lsp hover handler (#22763)
- **lsp/window_showDocument**: Correctly handle external resources #20867
- **lua**: Properly configure luacheck and remove `local vim = ...` lines (#20551)
- **lua**: Assert failure with vim.regex() error inside :silent! (#20555)
- **lua**: On_yank error with blockwise multibyte region #20162
- **lua**: Pesc, tbl_islist result types #20751
- **lua**: Make `vim.deepcopy` work with `vim.NIL`
- **lua**: Always return nil values in vim.tbl_get when no results
- **lua**: Mark some eval functions that can run in API-fast
- **lua**: Vim.deprecate() shows ":help deprecated" #22677
- **luado**: Get old_line length before executing Lua code
- **man**: Support MacOS 13
- **man**: Handle absolute paths as `:Man` targets (#20624)
- **man**: Use italics for `<bs>_` (#22086)
- **man.lua**: Set modifiable before writing page (#20914)
- **man.lua**: Use `env` command (#21007)
- **man.lua**: Open in current window if it's already a man page (#21987)
- **man.lua**: Tests, naming
- **mappings**: Use all buckets in second round of unmap (#21534)
- **mappings**: Fix check for cpo-B inverted in completion
- **mappings**: Make "<" escaping in completion match Vim
- **mark**: Do not restore view in op-pending mode (#20889)
- **memline**: Use long instead of linenr_T for db_line_count
- **memory**: Fix memory alignment for dynamic allocation
- **messages**: Reset msg_grid_scroll_discount when redrawing (#21000)
- **messages**: Don't set cmdline_row when messages have scrolled (#21015)
- **mouse**: Ensure no scrolling with "ver:0" in 'mousescroll' (#20861)
- **mouse**: Statusline click registered as statuscolumn (#21748)
- **options**: No matter what is said, 'cmdheight' is tab-local (susy baka)
- **options**: Fix local 'sidescrolloff' doesn't work for mouse (#21162)
- **options**: Restore exists() behavior for options (#21510)
- **paste**: Feed keys as typed in cmdline mode (#20959)
- **path**: Don't remove trailing slash when getting absolute path (#20853)
- **powershell**: Wrong length allocation for ":%w !" #20530
- **qflist**: Avoid read of uninitialized memory (#20709)
- **rbuffer**: Handle edge case where write_ptr has wrapped around
- **redraw**: Get the line again after evaluating something
- **remote**: Don't leak memory on failure to connect to server (#21931)
- **rpc**: Don't free args on error in rpc_send_event
- **rpc**: Don't parse msgpack if buflen is 0 (#21899)
- **rpc**: Ignore redraw events when not in UI client (#21892)
- **rpc**: Ignore redraw events when exiting (#22184)
- **runtime**: Properly rely on t_Co for colorschemes (#20602)
- **runtime**: Use `g:terminal_color_{0-15}` in colorschemes (#20637)
- **screen**: Correctly draw background and eob with 'rightleft' (#22640)
- **screen**: Redraw the ruler for a current floating window
- **secure**: Crash when hitting escape in prompt (#21283)
- **shell**: On Windows :make does not echo #22728
- **showcmd**: Assert failure with cmdheight=0 (#21536)
- **sleep**: Correct cursor placement (#22639)
- **spell**: Fix wrong cast (#20810)
- **spell**: Properly source spell/LANG.{vim,lua} (#22716)
- **startup**: Support .exrc or .nvimrc with init.lua (#21181)
- **status**: Handle unprintable chars in the statusline
- **statuscolumn**: Fix crashes and clang/PVS warnings (#21725)
- **statuscolumn**: Fix sign column highlights (#21727)
- **statuscolumn**: Foldcolumn buffer is too small (#21761)
- **statuscolumn**: Make %l/%r respect 'number'/'relativenumber' (#21747)
- **statuscolumn**: Always fill click defs array (#21878)
- **statusline**: Don't show showcmd when not enough space (#21550)
- **statusline**: Make nvim_eval_statusline() work with %S (#21553)
- **statusline**: Don't leak memory with zero-width click labels
- **statusline**: Don't leak memory with truncated click labels
- **stdpath**: Default to /tmp if stdpath('run') cannot be created #20952
- **syntax**: Correct conceal for annotated code blocks (#21272)
- **tabline**: Avoid memory leak in tabline click definitions (#21847)
- **terminal**: Fix 'mousescroll' not respected in terminal mode (#21415)
- **test**: Unset XDG_CONFIG_HOME when running oldtest
- **test**: Fix issues detected by running unittests in ASAN/UBSAN
- **test**: Fix C imports on macOS arm64
- **tests**: Only get the color map once, even for multiple test files
- **tests**: Initialize Screen.colors in API highlight tests
- **tests**: Use -l mode for lsp tests
- **tests**: Fixes for using vim.mpack and more ASAN
- **tests**: Adapt treesitter/highlight_spec priority test
- **treesitter**: Properly restore `'syntax'` (#21358)
- **treesitter**: Really restore syntax
- **treesitter**: Validate language name
- **treesitter**: Fix most diagnostics
- **treesitter**: Don't trample parsers when filetype!=lang
- **treesitter**: Make params optional
- **treesitter**: Fixup language invalidation (#22381)
- **treesitter**: Remove virtual text from playground
- **treesitter**: Ipairs -> pairs
- **treesitter**: Fixup for health
- **treesitter**: Maintain cursor position when toggling anonymous nodes
- **treesitter**: Disallow empty filetypes
- **treesitter**: Typos in _range.lua
- **treesitter**: Break early from loop when match is found (#22499)
- **treesitter**: Raise ts_match_limit to 256 (#22497)
- **treesitter**: Is_in_node_range (#22582)
- **treesitter**: Correct include_bytes arg for parse()
- **treesitter**: Do not error on empty filetype
- **treesitter**: Better lang handling of get_parser()
- **treesitter**: Foldexpr (#22652)
- **treesitter**: InspectTree does not respect 'splitright' #22692
- **treesitter**: Annotations
- **treesitter**: Add missing deprecate
- **treesitter**: Update queries from nvim-treesitter
- **treesitter**: Use capture metadata range if exists
- **treesitter**: Disable folding in inspect_tree() (#22885)
- **treesitter**: Do not track ranges of the root tree (#22912)
- **ts**: Check buffer is loaded when restoring options (#21419)
- **tui**: Resume main thread if suspending isn't implemented (#20523)
- **tui**: Set cursor color param as string when required #21407
- **tui**: More work in the TUI
- **tui**: Do not set ui_client_termname if it is already set (#21607)
- **tui**: Make a copy of data->params before unibi_format() (#21643)
- **tui**: Do not invoke loop recursively for pad()
- **tui**: Set stdin as "blocking" on exit (#21973)
- **tui**: Detach/attach on suspend/resume (#22040)
- **tui**: Exit on input eof
- **tui**: Set taskbar, icon in Windows #22270
- **tui**: Only forward stdin_fd on first attach (#22293)
- **tui**: Properly check if stdin is a tty (#22321)
- **tui**: Avoid stack-use-after-scope with cursor color (#22435)
- **tutor**: Failing to get buf name #20933
- **ui**: Msg_ext_set_kind for nvim_echo (#20476)
- **ui**: Setting 'cmdheight' with global statusline (#20515)
- **ui**: Send grid_resize events before triggering VimResized (#20760)
- **ui**: Fix some cases of stale highlight definitions
- **ui**: Allow resize commands to set 'cmdheight' to 0
- **ui**: Fix fragile UI_CALL macro invocation (#21656)
- **ui**: Convert title_pos string in nvim_win_get_config
- **ui**: Set stc to empty in floatwin with minimal style (#21720)
- **ui**: Command line issues with external messages (#21709)
- **ui**: Re-organize tty fd handling and fix issues
- **ui**: Make sure screen is valid after resizing
- **ui**: Recording change doesn't trigger statusline redraw
- **ui**: Ruler is not redrawn in cmdline with redrawstatus
- **ui-ext**: Correct message kind in history before vim.ui_attach()
- **ui-ext**: Log and clear error in ui_comp_event (#21147)
- **ui-ext**: Force cursor update after resize in char-based UI
- **unittest**: Delete unused duplicated code
- **unittests**: Do not consider process crash to be a success
- **unittests**: Fix TUI broken test previously ignored
- **vim-patches**: Ensure libfuse is installed
- **vim.diff**: Correctly apply hunk offsets with linematch (#20931)
- **vim.diff**: Fix fastforward off-by-1 (#20937)
- **vim.ui.input**: Return empty string when inputs nothing (#20883)
- **vim.version**: Incorrect version.cmp()
- **vim.version**: Prerelease compare
- **win_close**: Remove float grid after closing buffer (#21551)
- **win_update**: Don't use unintialized memory in edge case (#22266)
- **windows**: Set console icon later in startup
- **windows**: Consistent normalization in fs.find

BUILD SYSTEM!
- Remove unused variable CMAKE_C_COMPILER_ARG1
- Remove code for cross-compilation
- Remove url for 32-bit winyank
- Remove unnecessary translation-related code
- Rely on builtin cmake downloading rather than custom script
- Define EP_PREFIX property
- Only generate compilation database for the nvim target (#20449)
- Remove EXITFREE for debug builds
- Generate compilation database for older cmake versions
- Add clang-tidy configuration file (#15601)
- Fix incorrect clang-tidy identifier rules (#20650)
- Rely on default cmake installation if possible
- Give example on complex regexes
- Preprocess vim patches with uncrustify #20786
- Copy each treesitter parser library individually #20797
- Fix plural messages missing from .po files (#20830)
- Make update-po support optwin.vim (#20840)
- Remove python linting #20851
- Add EXCLUDE option to add_glob_target
- Always ignore user's cmake preset (#20935)
- Allow IWYU to fix includes for all .c files
- Restrict `git describe` to top level source directory (#20993)
- Fix help tags generation when SHELL=fish (#21562)
- Add git sha to version when built with nix flake (#21210)
- Remove workaround for old luajit versions
- Remove workaround for ancient clang versions
- Use modern cmake (#21589)
- Include our libraries before system libraries (#21746)
- Enable iwyu with target properties instead of variables (#21797)
- Exclude tui/terminfo_defs.h from lintc-clint (#21822)
- Enable cmake workflow presets (#21860)
- Remove nvim as a dependency of unittests (#21903)
- Various cmake fixes (#21902)
- Bump MSVC warning to level two (#21890)
- Use CMAKE_POSITION_INDEPENDENT_CODE instead of -fPIC (#21947)
- Make generated source files reproducible #21586
- Remove unnecessary unit test code (#21940)
- Use cmake for all platforms for unibilium and libtermkey (#21926)
- Simplify treesitter installation (#21969)
- Use upstream CMakeLists.txt for unibilium (#21976)
- Delete pthreads import (#21732)
- Remove GNU make check (#21977)
- Remove tests for libtermkey (#21983)
- Use cmake to build treesitter on all platforms (#21984)
- Introduce default build variables (#21991)
- Use cmake to build libvterm on all platform (#21986)
- Check if libvterm version meets requirement (#22010)
- Find unibilium without relying on libfindmacros (#22015)
- Fix dependencies in find modules (#22017)
- Enable ccache by default if available (#22020)
- Enable ccache project-wide (#22045)
- Add uninstall make target (#22059)
- Remove unnecessary file generation (#22099)
- Update release data
- Stop relying on CMAKE_BUILD_TYPE to determine the build type (#22051)
- Unbreak building neovim with multi-config generators (#22104)
- Don't build libnvim when running the CI (#22149)
- Remove duplicate INTERFACE keyword (#22106)
- Prefer -D <variable>=<value> over -D<variable>=<value> (#22164)
- Replace check-single-includes with clang-tidy (#22061)
- Remove unused function get_test_target (#22176)
- Reuse source files with interface library (#22177)
- Create test/CMakeLists.txt and move test-related code (#22179)
- Remove codecov related files (#20859)
- Mark uninteresting variables as advanced (#22208)
- Enable MSVC level 3 warnings (#21934)
- Don't check environment variable to detect CI (#22234)
- Treat clang-tidy warnings as errors (#22238)
- Remove ENABLE_COMPILER_SUGGESTIONS option (#22249)
- Only use HOSTNAME_PRG if HOSTNAME is undefined (#22288)
- Use custom command to create single versiondef (#22290)
- Use libuv config file (#22209)
- Test multi-config generator (#22310)
- Build all dependencies in parallel (#22329)
- Remove unused dependency penlight (#22334)
- Build luajit in parallel (#22327)
- Set libtermkey project language to C (#22410)
- Remove pkgconfig-related code (#22422)
- Remove libfindmacros library (#22423)
- Cmake cleanup (#22251)
- Unset variables ending with "URL" if USE_EXISTING_SRC_DIR is ON
- Show build type specific compiler flags when using --version
- Fix unknown pragma warning with mingw (#22533)
- Consistently use the provided option paths
- Fix USE_EXISTING_SRC_DIR option
- Silence git describe error output
- Remove workaround for incorrectly packaged libluv
- Enable unit testing on release builds (#22554)
- Fix build warning when using gcc 4.9.2
- Explicitly add dependency include dir for header generation
- Sanitizers for gcc
- Set CMAKE_C_STANDARD to 99 for all dependencies
- Drop curl.exe on Windows
- Download wintools executables separately
- Cmake cleanup
- **MSVC**: Enable assertions on RelWithDebInfo build type (#22326)
- **Windows**: Fix redoing version generation (#21880)
- **Windows**: Make bundling nvim-qt optional (#21866)
- **Windows**: Allow building without custom md5sum
- **bump_deps.lua**: Run command -v in shell (#22030)
- **ci**: Let ASAN print tracebacks for more errors (SIGABORT, SIGILL)
- **cmake**: Add modelines to enable syntax highlighting
- **deps**: Restore support for USE_EXISTING_SRC_DIR (#20491)
- **deps**: Add build type for libuv (#20575)
- **deps**: Disable shared library for libvterm. (#20566)
- **deps**: Bump tree-sitter to v0.20.8 (#22663)
- **deps**: Bump luarocks to v3.9.2
- **deps**: Bump coxpcall to 1.17.0-1
- **deps**: Bump luacheck to 1.1.0-1
- **deps**: Bump mpack to 1.0.10
- **deps**: Bump lua parser to v0.0.14 (#20897)
- **deps**: Switch vim parser to maintained fork (#22896)
- **deps**: Bump vimdoc parser to v2.0.0 (#22870)
- **deps**: Set query parser to release (#22603)
- **deps**: Bump libvterm to v0.3.1
- **deps**: Bump msgpack-c to v6.0.0 (#22522)
- **deps**: Bump win32yank to v0.1.1 (#22700)
- **deps**: Bump actions/stale from 7 to 8
- **deps**: Switch to Launchpad for libvterm and libtermkey (#22811)
- **editorconfig**: Set indent_size to 4 for python files (#21135)
- **lint**: Remove clint.py rules for braces #20880
- **lint**: Add more shell scripts to lintsh
- **lintsh**: Double quote to prevent word splitting (#21571)
- **luarocks**: Update busted version to v2.1.1 (#22029)
- **nix**: Change the pkgs to final, add new version of libvterm (#20410)
- **nix**: Update nixpkgs
- **nix**: Clean up nix flake (#21565)
- **nix**: Remove pylint as it has been removed (#21572)
- **nix**: Fixed build (#22918)
- **vim-patch.sh**: Handle added/removed files properly
- **vim-patch.sh**: Checkout files with path for uncrustify (#20863)
- **windows**: Export extern symbols for use in FFI #22756
- **windows**: Specify Windows 8 as the minimum version (#22173)
- **windows**: Work around luarocks not finding its own md5sum

DOCUMENTATION
- Refer to vim.lsp.start() in LSP issue template #20422
- Fix incorrect :help tag (#20511)
- Added proper annotations to functions in shared.lua
- Fix typos
- Fix/remove invalid URLs #20647
- "supported platforms" matrix #19615
- Update vimdoc parser #20747
- ":che" is ":checkhealth" #20147
- .git-blame-ignore-revs (#20820)
- Swap CursorLineFold and CursorLineSign (#20875)
- Add language annotation to Nvim manual
- Add missing docs from some Vim patches (#21296)
- Dark/light color/accessibilty pass for generated html docs #21345
- Add links to extmarks and namespaces (#21378)
- Remove "How-to disable mouse" menu item #21394
- Add security policy (#17338)
- Fix order of numbers in syntax.txt (#21581)
- Clarify line about converse of lua-heredoc (#21592)
- Fix treesitter parsing errors
- Add 'statuscolumn' docstrings (#21717)
- Builtin TUI is no longer channel 0 (#21794)
- Treesitter.add_directive, add_predicate #21206
- Docs: use codeblocks in runtime/doc/options.txt (#21919)
- Clarify :runtime behavior without [where] again (#22003)
- Clarify "pipe" mode for sockconnect
- Reword news.txt to ensure a consistent style (#22215)
- Remove mentions of 'balloonexpr' #22049
- Remove the test badge from the README (#22350)
- Mention getmousepos() for click execute function label
- Naming conventions, guidelines
- Fix more treesitter parsing errors
- Use build/bin/nvim instead of nvim in gen_vimdoc (#22398)
- Fix vim.treesitter tags
- Lua2dox.lua debugging
- Module-level docstrings (@defgroup) #22498
- Add missing highlight groups for floats
- Add removed features in news.txt
- Fix g:terminal_color_x terminal colors #22746
- More details about vim.region (#21116)
- How to debug TUI using gdb/lldb #22771
- Add vim.treesitter.query.get_query() to deprecated.txt
- **README**: Add Kotlin as a language which can use the API (#21567)
- **README**: Fix CI status badge (#22308)
- **api**: Pattern is not expanded for autocommands (#20812)
- **api**: Fix treesitter parsing errors
- **api**: Tweak data arg for nvim_create_autocmd (#22008)
- **api**: Link to nvim_set_hl_ns from nvim_set_hl (#22678)
- **dev-style**: Remove rule about variable declarations (#20446)
- **dev-style**: Remove rules covered by uncrustify
- **diagnostic**: Number → integer (#22512)
- **docstrings**: Fix runtime type annotations
- **editorconfig**: Update news.txt
- **editorconfig**: Add editorconfig.txt
- **editorconfig**: Number → integer (#22514)
- **filetype**: Number → integer (#22516)
- **gen**: Support language annotation in docstrings
- **gitignore**: Correct oldtest path
- **help**: Consistent headers for local additions
- **highlight**: Fix type annotations (#22272)
- **html**: Render @see items as a list #22675
- **inspect**: Number → integer (#22511)
- **lsp**: Add formatting APIs to deprecated.txt (#20487)
- **lsp**: Update buf_notify and rpc.notify params types (#21753)
- **lsp**: Fix type annotation on convert_input_to_markdown_lines (#21772)
- **lsp**: Format arguments to start_client() (#21980)
- **lsp**: Update cmd_env description (#22438)
- **lsp**: Change type annotations from number → integer (#22510)
- **lsp**: Type annotation for lsp.client (#22509)
- **lsp**: More precise type annotations (#22621)
- **lsp**: Opt-out of default LSP "gq" #22615
- **lua**: Add clarifications for fs.find() and fs.normalize() (#21132)
- **lua**: Correct the tags for vim.opt_local and vim.opt_global (#21138)
- **lua**: Correct vim.spell.check example (#21311)
- **lua**: Add guide to using Lua in Neovim (#21137)
- **lua**: Add `vim.json` (#21538)
- **lua**: Fix treesitter parsing errors
- **lua**: Adjust some type annotations
- **lua**: Lua-guide: <Nop> is for rhs of vim.keymap.set(), not lhs (#21814)
- **lua**: Use luaref tag instead of www.lua.org #21813
- **lua**: Number → integer (#22517)
- **luvref**: Fix treesitter parsing errors
- **luvref**: Update to version bump
- **maintain**: CI strategy #20778
- **maintain**: Add note on updating luvref.txt
- **manual**: Fix treesitter parsing errors
- **news**: Add news.txt and link from README (#20426)
- **options**: Remove mentions of 'imactivatefunc' and 'imstatusfunc'
- **shell**: Mention "&" for piping with powershell #20459
- **support**: Update tested versions (#21126)
- **test**: Using cmake directly (without make) #22781
- **treesitter**: Fix predicate syntax (#21016)
- **treesitter**: Change links for `eq?` and `set!` to codeblocks  (#21047)
- **treesitter**: Use full function names in tags (#21321)
- **treesitter**: Fix parse errors
- **treesitter**: Number → integer (#22513)
- **treesitter**: Add query injections
- **tutor**: Fix TODO line demo (#21965)
- **uri**: Number → integer (#22515)
- **usr**: Make usr_05.txt more coherent with Nvim changes (#22428)
- **usr_05**: Update sentence about Nvim default behavior of Q (#20817)
- **vim.fs**: Normalize Windows example was incorrect (#21966)
- **website**: Soft wrap code blocks #21644

REFACTOR
- Remove char_u type and replace with char, uint8_t, etc
- remove STRNCMP (#21208) and STRLCPY (#21235)
- Remove clint error suppression as all errors has been fixed #21782
- Explicitly convert HANDLE to intptr_t for _open_osfhandle()
- Clang-tidy fixes to silence clangd warning (#20683)
- Fix uncrustify lint errors
- Move do_mouse() and its helpers to mouse.c (#20895)
- Fix clang-tidy warnings
- Click definition functions #20923
- Remove stray emsg check after #20992 (#20996)
- Move tabline code to statusline.c (#21008)
- Convert drawline.c draw states to enum (#21067)
- Remove __STDC_ISO_10646__ check
- Deprecate 'secure' option
- Remove old TODO comments that aren't relevant anymore (#21144)
- Maybe suppress a PVS warning
- Rework parameter validation in vim.secure.trust() (#21223)
- Buffer_ensure_loaded()
- Move ex_retab() to indent.c
- Remove COMMA (#21260)
- Make sure getting a callback doesn't modify argument
- Rename mch_msg => os_msg
- Rename mch_get_acl => os_get_acl
- Eliminate os_unix.c #21621
- Extract code to open stdin for reading
- Eliminate bump-deps.sh using "nvim -l"
- Fix IWYU mapping file and use IWYU (#21802)
- Format with stylua (#21821)
- Remove E5500, adjust tests
- Fix sign conversion warning from gcc (#21833)
- Use uint8_t for blobs and ga_append() (#21916)
- Use flexible arrays instead of the length-of-one trick (#22072)
- Reduce scope of locals as per the style guide (#22206)
- Move init_default_autocmds to lua
- Rename show_tree => inspect_tree #22474
- Move ga_loaded to runtime.c (#22626)
- Do more in TRY_WRAP
- Add const and remove unnecessary casts (#22841)
- Use bool type for global variables (#22842)
- Rename local API alias from a to api
- Make error message definitions const
- Remove use of reserved c++ keywords
- **PVS**: Suppress false positive V547 in drawline.c (#21875)
- **PVS/V1048**: Remove unnecessary assignment (#21870)
- **PVS/V1048**: Remove redundant assignment (#21871)
- **PVS/V1048**: Remove duplicated assignments (#21873)
- **PVS/V581**: Merge identical if statements (#22390)
- **api**: Do not allocate temporaries for internal events
- **api**: VALIDATE macros #22187 #22256 #22262
- **build**: Remove unused stdlib function and include checks
- **build**: Graduate HAVE_LOCALE_H feature
- **build**: Graduate libtreesitter features which are 1+ years old
- **build**: Graduate msgpack-c FLOAT32 "feature" since forever
- **build**: Graduate unibilium VAR_FROM feature from 2017
- **build**: Graduate -Wvla, -fno-common and -Og "features"
- **build**: Make installation of runtime/ more effective
- **checkhealth**: Convert "nvim" check to Lua
- **clint**: Convert short to int16_t (#20815)
- **column**: Remove unused build_statuscol_str() arguments
- **completion**: Don't add and remove '^' for Lua (#22702)
- **diagnostic**: Remove deprecated function (#20423)
- **diagnostic**: DRY for loop #21521
- **diff.c**: Reduce scope of variables (#20781)
- **diff.c**: Break up ex_diffgetput()
- **diff.c**: Allocate hunks directly in ga_array
- **diff.c**: Factor out hunk extraction
- **diff.c**: Factor out hunk processing
- **diff.c**: Simplify diff_buf_idx()
- **diff.c**: Internal does not need diffstyle
- **diff.c**: Factor out diffblock deletion
- **diff.c**: Copy lines via memmove
- **drawline.c**: Leadcol/trailcol
- **drawline.c**: Move number column helpers function together
- **drawscreen.c**: Reduce scopes of locals (#20668)
- **eval**: Make get_lval() explicitly check for v:lua
- **eval.c**: Factor out get_number_tv() (#21893)
- **exit**: Pass error message to preserve_exit() (#22097)
- **extmarks**: Some minor internal API changes
- **f_has**: Remove wrong comment (#21561)
- **fileio.c**: Reduce scope of locals
- **fileio.c**: Refactor match_file_path()
- **fileio.c**: Refactor vim_rename()
- **fileio.c**: Refactor buf_write_bytes
- **fileio.c**: Refactor buf_write_bytes (2)
- **fileio.c**: Remove HAS_BW_FLAGS
- **fileio.c**: Factor out autocmd handling from buf_write()
- **fileio.c**: More bools
- **fileio.c**: Reduce scope of locals
- **fileio.c**: Do not use macros for error handling
- **fileio.c**: Factor out buf_write post autocmds
- **fileio.c**: Factor out file info calc
- **fileio.c**: Make unreadable expression readable
- **fileio.c**: Factor out backup creation
- **fileio.c**: Remove HAVE_ACL ifdefs
- **fileio.c**: Normalize ifdefs
- **fs**: Replace vim.fn/vim.env in vim.fs (#20379)
- **highlight**: Rename FloatBorderTitle #20988
- **highlight**: Reshape the HL_UNDER* bits into a 3-bit integer mask
- **highlight_group.c**: Reduce scope of locals
- **intro**: Avoid Coverity warning (#22000)
- **loader**: Use vim.fs
- **loader**: Remove BufWritePost autocmd
- **loader**: Add typing for package.loaders
- **loader**: Simplify tracking logic
- **loader**: Cache hash information
- **log**: Reduce compile time LOG_LEVEL granularity
- **lsp**: Remove deprecated lsp functions (#20421)
- **lsp**: Extract a _create_server method in lsp_spec
- **lsp**: Remove deprecated vim.lsp.buf_get_clients calls (#21337)
- **lsp**: Remove workaround for missing bit module (#22373)
- **lsp**: Remove deprecated code (#22389)
- **lsp**: Remove _resolve_capabilities_compat (#22628)
- **lsp**: Do not parse verbose output when overwriting options (#22810)
- **lua**: Move _G.arg init to nlua_init()
- **lua**: Get all marks instead of iterating over namespaces
- **lua2dox**: Format with stylua
- **main.c**: Remove unreachable use_builtin_ui conditions (#22338)
- **man**: Pass env directly to spawn() (#20591)
- **man**: Add type annotations
- **memory**: Simplify new alignment logic
- **option.c**: Reduce scope of locals
- **option.c**: Add get_varp_from and get_varp_scope_from
- **option.c**: De-nest set_option_value
- **option.c**: Use intermediate for options ref
- **option.c**: Add do_set_num
- **option.c**: Add do_set_bool
- **option.c**: Simplify do_set_string
- **option.c**: Factor out common skip check
- **option.c**: Factor out loop code from do_set()
- **option.c**: Remove goto
- **option.c**: Change nextchar to uint8_t
- **option.c**: Use skiptowhite_esc
- **option.c**: Factor out set op parsing
- **option.c**: Factor out option prefix parsing
- **option.c**: Factor out option name parsing
- **option.c**: Factor out opt_idx validation
- **option.c**: De-nest code in do_set_option
- **option.c**: Move bool prefix check
- **option.c**: Add do_set_option_value
- **option.c**: Factor out some nextchar checks
- **option.c**: Factor out string option special case handling
- **options**: Don't pass negative number to illegal_char() (#21999)
- **optionstr.c**: Reduce scope of locals
- **optionstr.c**: Break up did_set_string_option 1-52
- **optionstr.c**: Remove some simple did_set_* functions
- **optionstr.c**: Add did_set_string_option_for
- **optionstr.c**: Break up did_option_listflags
- **optionstr.c**: Remove some redundant parens
- **optionstr.c**: Break up did_set_expropt
- **optionstr.c**: Move handling of formatlistpat
- **optionstr.c**: Align comments (#22070)
- **params**: Open -s and -w script files after parsing commands
- **pty**: Remove old logic for inheriting termios from host terminal
- **redraw**: No type argument in update_screen()
- **redraw**: Various simplifications
- **redraw**: Make cursor position redraw use the "redraw later" pattern
- **runtime**: Use vim.version to compare versions #22550
- **runtime.c**: Factor out find_script_by_name() (#22620)
- **screen**: Screen.c delenda est
- **sleep**: Simplify rube goldberg implementation of :sleep
- **spell**: Use uint8_t for "byts" variables (#22519)
- **statusline**: Move statusline defs to statusline_defs.h
- **tag**: Remove return type from do_tag()
- **test**: Create an lsp-specific helpers.lua file
- **tests**: Lift retry() into assert_log()
- **tests**: Run unittests using main nvim binary in interpreter mode
- **tests**: Move lua-client into core and use it for functionaltests
- **treesitter**: Add vim.treesitter.get_node() (#22360)
- **treesitter**: Use string.format to create lines
- **treesitter**: Simplify some range functions
- **treesitter**: Delegate region calculation to treesitter (#22553)
- **treesitter**: Use byte ranges from treesitter (#22589)
- **treesitter**: Add Range type aliase for Range4|Range6
- **treesitter**: Delegate region calculation to treesitter (#22576)
- **treesitter**: Move inspect_tree impl
- **tui**: Use nvim_echo() for verbose terminfo
- **tui/input.c**: Remove unused multithreading code (#22342)
- **ui**: Statusbar invalidation to win_set_inner_size()
- **ui**: Devirtualize the ui layer
- **ui**: Cleanup 'redrawdebug', introduce "flush" mode
- **ui**: Don't reimplement redrawing in focus gained handling
- **ui**: Remove some superfluous ui_flush() calls
- **ui**: Ui_log() can now just be a function
- **uncrustify**: Move macros definitions to enable formatting
- **uncrustify**: Improved formatting rules
- **vim.gsplit**: Remove "keepsep"
- **vim.version**: Cleanup
- **vim.version**: Use lazy.nvim semver module
- **vim.version**: Use lazy.nvim semver module
- **win_close**: Remove "force", don't pass on "free_buf" (#21921)
- **win_line**: Rename attr to vi_attr (#21487)
- **win_line**: Move some variables into a struct (#22490)
- **window**: Remove aucmd_win check from one_window() (#21972)
- **window.c**: Reduce scope of locals (#20301)
- **windows**: Move os_icon_xx functions

TESTING
- Introduce skip() #21010
- Remove skip for 32-bit MSVC (#21030)
- Don't skip parser_spec on windows (#20294)
- Add a Lua test for swap file created before boot
- Fix failing tui_spec.lua tests (#21117)
- Use isCI to simplify CI detection (#21134)
- Simplify platform detection (#21020)
- Adding/removing winbar should not cause win_pos events (#21226)
- Use luv.os_uname for fast platform detection (#21157)
- Add more tests for float window bufpos (#21318)
- Convert another test in test_matchadd_conceal.vim to Lua (#21353)
- Remove unused variable (#21552)
- Add test cases for command line issues
- Add more tests for Unicode
- Avoid consecutive mouse input at different positions (#21781)
- Align Test_shell_options, Test_shellslash with Nvim default
- Avoid noise in NVIM_LOG_FILE
- Exepath() returns correct path with cmd.exe, powershell #21928
- Remove unused field ext_float (#22243)
- Make expect_unchanged() less confusing (#22255)
- Make {MATCH:} behave less unexpectedly in screen:expect()
- Don't search entire repo for files
- Move oldtests to test directory (#22536)
- Use a wider screen in the rightleft winhl test (#22641)
- Unskip working Windows tests (#22537)
- Re-bundle cat on windows (#21255)
- Windows not detected in msys shells #22671
- Use exec_capture() in more places (#22787)
- Fix flaky watchfiles tests (#22637)
- Replace lfs with luv and vim.fs
- Improve editor/fold_spec.lua and editor/put_spec.lua (#22916)
- **Windows**: Normalize paths for test summary
- **api**: Migrate screenchar() test in in window API to screen test
- **editorconfig**: Add editorconfig tests
- **exit_spec**: Make sure that autocommands are triggered (#22188)
- **fileio_spec**: Avoid expect_exit() without calling clear() (#21810)
- **float_spec**: Add missing sum_scroll_delta #22648
- **help**: Drop treesitter parse error to 0
- **highlight_spec**: Fix warning in Visual highlight test (#22719)
- **legacy/prompt_buffer_spec**: Align script with oldtest more (#22354)
- **lsp**: Call clear() before willSave tests (#21336)
- **lsp**: Add a screen:expect() between insert() and feed_command() (#21577)
- **lua/diagnostic_spec**: Remove unnecessary after_each()
- **lua/fs_spec**: Fix vim.fs.dir() test (#21503)
- **lua/ui_spec**: Fix Ctrl-C test flakiness (#21039)
- **old**: Test_lambda.vim garbagecollect() -> test_garbagecollect_now()
- **old**: Remove stray test42 files (#20966)
- **old**: Make Test_help_tagjump() test order match upstream
- **old**: Add missing lines from Vim patch 8.2.0522 (#21048)
- **old**: Make ":h local-additions" work properly in test_help.vim
- **old**: Skip Vim9 script with less divergence
- **old**: Change $TMPDIR from Xtest-tmpdir to X-test-tmpdir (#21346)
- **old**: Make test_signs.vim closer to upstream (#21479)
- **old**: Run some part of 'cpoptions' tests
- **old**: Make getting an unused PID work (#22529)
- **old**: Move memfile_test.c to test/old/ (#22567)
- **old**: Unskip working tests on Windows (#22650)
- **shada**: Fix shada syntax definitions test
- **statuscolumn**: Add more tests for wrapped lines (#21718)
- **statuscolumn**: %l should follow default wrap behavior (#21766)
- **statuscolumn_spec**: Remove unnecessary feed('lh')
- **statusline**: UI elements are not redrawn on K_EVENT unnecessarily
- **syn_attr_spec**: Add more information (#21912)
- **termxx_spec**: Fix TermClose bdelete test flakiness (#22463)
- **treesitter/parser_spec**: Correct time unit (#22471)
- **tui_spec**: Don't use nested terminal for resize at startup (#21583)
- **tui_spec**: Avoid race between nvim_paste and nvim_input (#21639)
- **tui_spec**: Improve cursor_address test (#21700)
- **tui_spec**: Doesn't use Unicode in cursor_address test (#21703)
- **tui_spec**: Make rapid resize test test what it wants to test (#21933)
- **tui_spec**: Don't expect exact screen in rapid resize test (#21935)
- **tui_spec**: Remove unnecessary arguments for remote UI
- **tui_spec**: Use RPC request to setup autocommands
- **ui**: Wait for another success with failure after success
- **undo_spec**: Add more tests for writing in Insert mode
- **unit**: Use file:close() properly (#21505)
- **vim.fs.normalize**: Enable test on Windows
folke pushed a commit to folke/neovim that referenced this pull request May 22, 2023
feat(lsp)!: change semantic token highlighting

Change the default highlights used, and add more highlights per token.

Add an LspTokenUpdate event and a highlight_token function.

:Inspect now shows any highlights applied by token highlighting rules,
default or user-defined.

BREAKING CHANGE: change the default highlight groups used by semantic
token highlighting.
folke pushed a commit to folke/neovim that referenced this pull request May 22, 2023
For a summary of notable changes, see runtime/doc/news.txt or run `:help news` within nvim.

BREAKING CHANGES
- Remove hardcopy
- Make iconv a non-optional dep
- Remove has("debug") (#22060)
- Make libintl a required dependency
- Rename vim.pretty_print => vim.print
- Rename sanitizer options from CLANG_* to ENABLE_*
- Remove the .deb release (#22773)
- **column**: Ensure 'statuscolumn' works with virtual and wrapped lines
- **cscope**: Remove
- **defaults**: Change default 'commentstring' value to empty (#22862)
- **edit**: Remove old c implementation of hebrew keymap
- **editorconfig**: Change editorconfig_enable to editorconfig
- **exepath**: Prefers extensionless for powershell
- **health**: Remove deprecated health.lua
- **lsp**: Add rule-based sem token highlighting (#22022)
- **lua**: Execute Lua with "nvim -l"
- **messages**: Graduate the 'msgsep' feature
- **options**: Deprecate paste, remove pastetoggle (#22647)
- **rpc**: Preseve files when stdio channel is closed (#22137)
- **runtime**: Remove filetype.vim (#20428)
- **treesitter**: Remove g:ts_highlight_lua (#22257)
- **treesitter**: Remove silent option from language.add()
- **treesitter**: Consolidate query util functions
- **treesitter**: Remove deprecated show_tree func
- **treesitter**: Deprecate top level indexes to modules (#22761)
- **treesitter**: Rename help parser to vimdoc

FEATURES
- Added support for @generic to lua2dox.lua
- Added support for optional params to lua2dox
- Added support for specifying types for lua2dox
- Mention ":help news" in intro #20674
- ":write ++p" creates parent dirs #20835
- Add vim.secure.read()
- `vim.inspect_pos`, `vim.show_pos`, `:Inspect`
- $NVIM_APPNAME #22128
- Try to recover from missing tempdir #22573
- Add `vim.filetype.get_option()`
- Add `vim.treesitter.language.get_filetypes()` (#22643)
- Allow function passed to defaulttable to take an argument (#22839)
- **api**: Nvim_select_popupmenu_item support cmdline pum (#20652)
- **api**: Add command name to Lua command callback opts
- **api**: Show more exception info
- **api**: More fields in nvim_list_uis
- **api**: Add filetype option nvim_get_option_value
- **api**: Add nvim_get_hl (#22693)
- **api**: Nvim_exec2(), deprecate nvim_exec() #19032
- **api**: Evaluate 'statuscolumn' with nvim_eval_statusline()
- **api**: Set statuscolumn line number in nvim_eval_statusline()
- **aucmd_win**: Allow crazy things with hidden buffers (#21250)
- **checkhealth**: Improve treesitter report
- **checkhealth**: Check runtime ($VIMRUNTIME)
- **checkhealth**: Use "help" syntax, avoid tabpage #20879
- **clipboard**: Copy to system clipboard in tmux when supported (#20936)
- **clipboard**: Added wayclip support (#21091)
- **diagnostic**: Add `suffix` option to `open_float()` (#21130)
- **diagnostic**: Add `suffix` option to `virt_text` config (#21140)
- **diagnostic**: Don't open quickfix/loclist if no diagnostics #21397
- **diagnostic**: Vim.diagnostic.is_disabled() #21527
- **diagnostic**: Add support for tags
- **docs**: Nested lists in HTML, update :help parser
- **docs**: Format parameters as a list #20485
- **docs**: Update parser, HTML gen #20720
- **docs-html**: Try to use tags for ToC headings
- **editorconfig**: Add builtin EditorConfig support
- **editorconfig**: Add editorconfig syntax file
- **editorconfig**: Allow editorconfig to be toggled dynamically
- **exrc**: Use vim.secure.read() for 'exrc' option
- **exrc**: Support .nvim.lua (#21436)
- **extmarks**: Allow preventing spellchecking with spell = false
- **extmarks**: Extend nvim_buf_get_extmarks()
- **filetype**: Fall back to file extension when matching from hashbang (#22140)
- **float**: Open float relative to mouse #21531
- **fs**: Add opts argument to vim.fs.dir()
- **gen_help_html.lua**: Remove old AWK scripts
- **health**: Detect tmux RGB support via `client_termfeatures`
- **help**: Highlighted codeblocks
- **highlight**: Add DiagnosticOk (and associated) highlight groups (#21286)
- **highlight**: Define the concept of altfont as a (c)term rendering attribute
- **l10n**: Update Turkish translations (#20444)
- **l10n**: Update zh_CN translations (#21085)
- **lsp**: Add bufnr option to lsp.start (#20473)
- **lsp**: Support window/showDocument (#19977)
- **lsp**: Run handler in coroutine to support async response (#21026)
- **lsp**: Support set title in lsp relate floatwindow (#21110)
- **lsp**: Support willSave & willSaveWaitUntil capability (#21315)
- **lsp**: Initial support for semantic token highlighting
- **lsp**: Highlight semantic token modifiers (#21390)
- **lsp**: Add function to get semantic tokens at cursor
- **lsp**: Add function to clear codelens (#21504)
- **lsp**: Show active clients in :checkhealth vim.lsp (#21670)
- **lsp**: Add triggerKind option for vim.lsp.buf.code_action (#21905)
- **lsp**: Implement workspace/didChangeWatchedFiles (#21293)
- **lsp**: Implement workspace/didChangeWatchedFiles (#22405)
- **lsp**: Overwrite omnifunc/tagfunc set by ftplugin #22267
- **lsp**: Render markdown in docs hover #22766
- **lsp**: Create default link from @lsp.type.comment to Comment (#22888)
- **lua**: Send "--" literally to Lua "-l" script
- **lua**: Exit 1 on Lua "-l" script error
- **lua**: Execute stdin ("-") as Lua
- **lua**: Store "nvim -l" scriptname in _G.arg[0]
- **lua**: Low-level interpreter mode (nvim -ll)
- **lua**: Make sure require'bit' always works, even with PUC lua 5.1
- **lua**: Add semver api
- **lua**: Omnifunc for builting lua interpreter
- **lua**: Use vim.empty_dict() for empty return value in new api functions  (#22737)
- **lua**: Allow `:=expr` as a shorter version of `:lua =expr`
- **lua**: Add `vim.loader`
- **lua-api**: Avoid unnecessary allocations (#19877)
- **man**: Add health check
- **man.lua**: Support spaces in manpage names
- **message**: Avoid spam on failed os_msg
- **packaging**: Add start menu and desktop shortcuts on Windows
- **provider**: Add support for Yarn node modules on Windows (#21246)
- **secure**: Add `:trust` command  and vim.secure.trust() (#21107)
- **spell**: Support nospell in treesitter queries
- **spell**: Also source `spell/LANG.lua` when setting `spelllang` (#22111)
- **test**: Add Lua forms for API methods (#20152)
- **treesitter**: Add vim.treesitter.show_tree() (#21322)
- **treesitter**: Add 'lang' option to show_tree() (#21341)
- **treesitter**: Show filetype associated with parser (#17633)
- **treesitter**: Allow capture text to be transformed
- **treesitter**: Add metadata option for get_node_text
- **treesitter**: Respect metadata[id].range for offset!
- **treesitter**: Playground improvements
- **treesitter**: Add filetype -> lang API
- **treesitter**: Upstream foldexpr from nvim-treesitter
- **treesitter**: Expand the API
- **treesitter**: Add :InspectTree command (#22477)
- **treesitter**: Bundle query parser and queries (#22483)
- **treesitter**: Use upstream format for injection queries
- **tui**: Run TUI as external process
- **tui**: Graduate the +tui feature
- **tui**: Support altfont mode in tui.c
- **ui**: Add support to display a title in the border of a float (#20184)
- **ui**: Add 'statuscolumn' option
- **ui**: Restore has('gui_running')
- **ui**: Add scroll_delta to win_viewport event #19270
- **vim-patch**: Mention original author #20772
- **vim.diff**: Allow passing an integer for linematch
- **vim.fs**: Pass path to find() predicate, lazy evaluate #22378
- **vim.fs**: Improve normalize
- **vim.gsplit**: Gain features of vim.split
- **vim.version**: More coercion with strict=false
- **web**: Syntax highlighting via highlight.js
- **window/ui**: Add splitkeep option (#19243)
- **windows**: Show icon in terminal titlebar, taskbar #20607

PERFORMANCE
- **column**: Only build fold/sign column when present in 'statuscolumn'
- **completion**: Use one call to globpath() for .vim and .lua #21942
- **diagnostic**: Use api variable and improve validate (#21111)
- **lsp**: Update semantic tokens algorithm for parsing modifiers (#21383)
- **lsp**: Only redraw the windows containing LSP tokens
- **lsp**: Better binary search mid calculation in semantic token (#22607)
- **statuscolumn**: Only fill click defs array once per redraw (#21884)
- **statusline**: UI elements are always redrawn on K_EVENT
- **treesitter**: Smarter languagetree invalidation
- **treesitter**: More efficient foldexpr
- **ui**: Mitigate redraw latency regression from TUI refactor

BUG FIXES
- Make_filter_cmd for :! powershell
- :! pwsh redirection for `command not found`
- Find multibyte file name in line (#20519)
- Change did_emsg back to int
- 'scroll' is not set correctly for floats with 'splitkeep'
- Setting tabline option not redrawing tabline
- Avoid unsigned overflow in home_replace() (#20854)
- Add lfs to luarc.json (#20979)
- Vim.ui.input always calls callback #21006
- Don't disable compositor widgets when a GUI with multigrid attaches
- Pvs warnings (#21145)
- Clang warnings (#21247)
- Vim.opt_local:append ignoring global option value (#21382)
- Issues with command line if ui elements are externalized
- Properly close builtin popup in ext_popupmenu
- Failing XDG test on Windows CI
- Pass value instead of pointer to isalpha (#21898)
- Use correct number for INT_MAX (#21951)
- Add manifest file to correctly determine Windows version (#21953)
- Uv_tty_set_mode failed in Windows #22264
- Lsp github issue template example (#22285)
- Remove "Features" section from --version/:version (#22315)
- Remove "Compiled by:" from :version/--version (#22316)
- Add missing void as function argument (#22317)
- Windows assertion failure due to incorrect path length (#22324)
- Resolve error from -Werror=maybe-uninitialized
- Address -Wmaybe-uninitialized warnings (#22436)
- Pasting in terminal buffer on windows #22566
- Invalid buffer size argument to snprintf #22729
- Snprintf buffer overflow detected by -D_FORTIFY_SOURCE=3 (#22780)
- **MSVC**: Set the active code page to utf-8 (#22384)
- **Windows**: Restore console title at exit #21922
- **api**: Dynamically allocate line buffer for nvim_out_write (#20537)
- **api**: Nvim_buf_get_text regression (#21071)
- **api**: Nvim_win_set_cursor redraw cursorcolumn for non-current window (#21072)
- **api**: Set correct curbuf when temporarily changing curwin (#21371)
- **api**: "emsg_silent" should imply "silent" in nvim_cmd (#21438)
- **api**: Nvim_create_autocmd crash on invalid types inside pattern array
- **api**: Avoid memory leak with click functions in nvim_eval_statusline() (#21845)
- **api**: Don't allow hiding aucmd_win from another tabpage (#21975)
- **api**: Allow empty Lua table for nested dicts #22268
- **api**: Set script context when setting usercmd or option (#22624)
- **api**: Vim.filetype.get_option() (#22753)
- **api**: Make nvim_get_hl return 'cterm' attrs properly
- **api**: Use local LastSet structure in nvim_get_option_info (#22741)
- **api**: Return both link and attributes with nvim_get_hl (#22824)
- **api**: Avoid double hit-enter prompt with nvim_err_writeln (#22879)
- **autocmd**: Handle recursion for force set (#22820)
- **buffer_updates**: Save and restore current window cursor (#16732)
- **build**: "make clean" fails
- **build**: Duplicate version string "v0.8.0-v0.8.0" #20578
- **build**: Fix invalid use of EXITFREE
- **chansend**: Sending lines to terminal in reverse order on Windows #19315
- **ci**: Skip test on windows (#21502)
- **ci/release/winget**: Bump action version
- **client**: Wait for session to exit
- **clint**: Disable whitespace/newline #20619
- **clipboard**: Prefer xsel #20918
- **clipboard**: Update version regex pattern (#21012)
- **clipboard**: Show provider warning when not during batch changes #21451
- **column**: Avoid drawing columns for virt_lines_leftcol
- **column**: Estimate 'statuscolumn' width appropriately
- **column**: No longer reset nrwidth_line_count for 'statuscolumn'
- **column**: Cmdwin cursor is offset with 'statuscolumn' (#22445)
- **column**: Issues with 'statuscolumn' width (#22542)
- **column**: Rebuild status column when sign column is invalidated (#22690)
- **column**: Invalidate statuscolumn width when UPD_NOT_VALID (#22723)
- **completion**: Set pum_size even if ext_popupmenu is used (#20648)
- **completion**: Correct what modes support fuzzy completion
- **completion**: Include lua syntaxes in :ownsyntax completion (#21941)
- **coverity/433537**: Don't call kv_concat_len() when read_size is 0 (#21664)
- **decoration**: Redraw correctly when re-using ids
- **decoration**: Call providers in win_update() earlier
- **decoration**: Do not reset must_redraw after calling providers (#21459)
- **decoration**: Don't show signcolumn for non-sign_text extmark (#22135)
- **diagnostic**: Correct type annotations; add Diagnostic type (#21120)
- **diagnostic**: Clear stale cache on reset (#21454)
- **diagnostic**: Sort diagnostics by column (#21457)
- **diagnostic**: Revert notification on missing diagnostics (#21632)
- **diagnostic**: Use correct field name for tags (#22835)
- **diff**: Remove size_t underflow (#20929)
- **diff**: Fix a crash in diff mode with linematch enabled (#21070)
- **diff**: Handle long lines without crashing (#21389)
- **diff**: Avoid restoring invalid 'foldcolumn' value (#21650)
- **diff**: "nvim -d" should only diff arglist files #21829
- **diff**: Adjust extmarks after diffput/diffget (#22440)
- **diff**: Add NULL check
- **diff**: Trigger on_bytes only once after diffget/diffput
- **diff.c**: Regression in diffgetput (#20843)
- **docs**: Missing "(" in :help HTML
- **docs**: Nil as viable argument for goto_prev (#20852)
- **docs-html**: Keycodes, taglinks, column_heading #20498
- **docs-html**: Update parser
- **docs-html**: Misaligned tabs after conceal #20690
- **edit**: Don't subtract msg_scrolled when removing double quote (#22630)
- **editorconfig**: Do not highlight unknown properties as errors (#21673)
- **embed**: Handle stdio in server properly
- **eval**: Make error number of charidx() same as Vim
- **eval**: Change some tv_dict_add() usages back to hash_add()
- **events**: Save v:event for cmdline autocommands separately (#21316)
- **events**: Skip WinScrolled for newly-created float windows (#21333)
- **ex_cmds**: Fix a mistake in the porting of Vim patch 8.1.0306 (#21096)
- **exit**: The TUI should not ui_flush() itself (#21625)
- **exit**: Skip unnecessary steps in TUI preserve_exit() (#21897)
- **extmarks**: Adjust extmarks when inserting prompt prefix
- **extmarks**: Problems with folded virtual lines (#21930)
- **extmarks**: Don't leak memory on error (#22507)
- **fileio**: Use first available directory in backupdir for backupcopy (#20655)
- **fileio.c**: Don't use uninitialized memory (#22031)
- **filetype**: Don't pass empty string to detect (#20766)
- **filetype**: Correctly detect tex files
- **filetype**: Make vim.filetype.match() work with contents only (#22181)
- **filetype**: Avoid recursive FileType autocmds (#22813)
- **filetype**: Make recursive work...again (#22826)
- **float**: Make closing float in another tab return to correct window
- **float**: Fix ml_get error with bufpos
- **float**: Fix crash with bufpos and non-existent window (#21319)
- **float**: Remove -1 in height clamp
- **folds**: Fix fold marker multibyte comparison (#20439)
- **folds**: Use long for number of folded lines (#21447)
- **folds**: Cursorline highlight is not always applied on closed folds (#22242)
- **folds**: Handle visual blockwise indent insertion correctly (#22898)
- **fs**: Duplicate path separator #21509
- **health**: Correct tmux rgb verification (#20868)
- **health**: Fix `tmux_esc_time` comparison
- **health**: Iterate using ipairs correctly (#22119)
- **health**: Stop using deprecated ts.language.inspect_language() (#22850)
- **help**: Force tree reparse after local addition insertion
- **helpers**: Restore channel id after a call to WITH_SCRIPT_CONTEXT
- **highlight**: Link more treesitter groups by default (#20711)
- **highlight**: Properly deal with underline mask when listing (#22057)
- **highlight**: Avoid ORing underline flags (#22372)
- **highlight**: Use winhl=Foo:Bar even when Bar is empty
- **inspect**: Alwasy resolve full treesitter lang hl groups
- **intro**: Omit patch version in ":help news" item #20713
- **intro**: Make :help news line easier to translate (#21974)
- **lintcommit**: Capitalized description #22282
- **loader**: Disable profiling by default
- **lsp**: Reporting bogus capabilities in CodeActionKind #20678
- **lsp**: Ignore hover and signatureHelp responses on buffer change (#21121)
- **lsp**: Render <pre>{lang} code blocks and set separator default to false (#21271)
- **lsp**: Remove workspaceFolders field (#21284)
- **lsp**: Call show_document with correct args
- **lsp**: Ensure open_logfile is safe for fast events (#21288)
- **lsp**: Followup fixes for semantic tokens support (#21357)
- **lsp**: Correct some type annotations (#21365)
- **lsp**: Fix get_active_clients bufnr parameter (#21366)
- **lsp**: Ignore null responses for semanticTokens request (#21364)
- **lsp**: Token_edit.data might be null on deletion (#21462)
- **lsp**: Adjust gravity of semantic tokens extmarks (#21574)
- **lsp**: Fix nil client access in get_active_clients (#21524)
- **lsp**: Change vim.lsp.get_active_clients.filter name annotation to string (#21624)
- **lsp**: Correct callHierarchy capability to fix lsp.buf.incoming_calls() (#21665)
- **lsp**: Fix `removed` param value in add_workspace_folder (#21915)
- **lsp**: Assert workspace/applyEdit receives params (#21945)
- **lsp**: Check method is supported when range formatting (#21970)
- **lsp**: Check if the buffer is a directory before w! it (#22289)
- **lsp**: Wrong format of bufnr and client order in error message (#22336)
- **lsp**: Fix some type annotations (#22397)
- **lsp**: CallHierarchy methods also require the callHierarchyProvider (#22427)
- **lsp**: Use buffer scheme for files not stored on disk (#22407)
- **lsp**: Only fire LspDetach for attached buffers (#22468)
- **lsp**: Don't monitor files if workspace_folders is nil (#22531)
- **lsp**: Change LspTokenUpdate to use buffer instead of pattern (#22559)
- **lsp**: Prevent lsp tests from picking up local user config (#22606)
- **lsp**: Send didClose on buffer rename (#22623)
- **lsp**: Use line start/end for visual line selection (#22632)
- **lsp**: Remove_workspace_folders fails if client has no workspace_folders #22633
- **lsp**: Vim.lsp.util.apply_text_edits cursor validation #22636
- **lsp**: Kill buffers after renaming a directory #22618
- **lsp**: Avoid switching buffers on lsp attach (#22689)
- **lsp**: Jump to tag locations reliably when :ltag is used (#22750)
- **lsp**: Add missing silent check in lsp hover handler (#22763)
- **lsp/window_showDocument**: Correctly handle external resources #20867
- **lua**: Properly configure luacheck and remove `local vim = ...` lines (#20551)
- **lua**: Assert failure with vim.regex() error inside :silent! (#20555)
- **lua**: On_yank error with blockwise multibyte region #20162
- **lua**: Pesc, tbl_islist result types #20751
- **lua**: Make `vim.deepcopy` work with `vim.NIL`
- **lua**: Always return nil values in vim.tbl_get when no results
- **lua**: Mark some eval functions that can run in API-fast
- **lua**: Vim.deprecate() shows ":help deprecated" #22677
- **luado**: Get old_line length before executing Lua code
- **man**: Support MacOS 13
- **man**: Handle absolute paths as `:Man` targets (#20624)
- **man**: Use italics for `<bs>_` (#22086)
- **man.lua**: Set modifiable before writing page (#20914)
- **man.lua**: Use `env` command (#21007)
- **man.lua**: Open in current window if it's already a man page (#21987)
- **man.lua**: Tests, naming
- **mappings**: Use all buckets in second round of unmap (#21534)
- **mappings**: Fix check for cpo-B inverted in completion
- **mappings**: Make "<" escaping in completion match Vim
- **mark**: Do not restore view in op-pending mode (#20889)
- **memline**: Use long instead of linenr_T for db_line_count
- **memory**: Fix memory alignment for dynamic allocation
- **messages**: Reset msg_grid_scroll_discount when redrawing (#21000)
- **messages**: Don't set cmdline_row when messages have scrolled (#21015)
- **mouse**: Ensure no scrolling with "ver:0" in 'mousescroll' (#20861)
- **mouse**: Statusline click registered as statuscolumn (#21748)
- **options**: No matter what is said, 'cmdheight' is tab-local (susy baka)
- **options**: Fix local 'sidescrolloff' doesn't work for mouse (#21162)
- **options**: Restore exists() behavior for options (#21510)
- **paste**: Feed keys as typed in cmdline mode (#20959)
- **path**: Don't remove trailing slash when getting absolute path (#20853)
- **powershell**: Wrong length allocation for ":%w !" #20530
- **qflist**: Avoid read of uninitialized memory (#20709)
- **rbuffer**: Handle edge case where write_ptr has wrapped around
- **redraw**: Get the line again after evaluating something
- **remote**: Don't leak memory on failure to connect to server (#21931)
- **rpc**: Don't free args on error in rpc_send_event
- **rpc**: Don't parse msgpack if buflen is 0 (#21899)
- **rpc**: Ignore redraw events when not in UI client (#21892)
- **rpc**: Ignore redraw events when exiting (#22184)
- **runtime**: Properly rely on t_Co for colorschemes (#20602)
- **runtime**: Use `g:terminal_color_{0-15}` in colorschemes (#20637)
- **screen**: Correctly draw background and eob with 'rightleft' (#22640)
- **screen**: Redraw the ruler for a current floating window
- **secure**: Crash when hitting escape in prompt (#21283)
- **shell**: On Windows :make does not echo #22728
- **showcmd**: Assert failure with cmdheight=0 (#21536)
- **sleep**: Correct cursor placement (#22639)
- **spell**: Fix wrong cast (#20810)
- **spell**: Properly source spell/LANG.{vim,lua} (#22716)
- **startup**: Support .exrc or .nvimrc with init.lua (#21181)
- **status**: Handle unprintable chars in the statusline
- **statuscolumn**: Fix crashes and clang/PVS warnings (#21725)
- **statuscolumn**: Fix sign column highlights (#21727)
- **statuscolumn**: Foldcolumn buffer is too small (#21761)
- **statuscolumn**: Make %l/%r respect 'number'/'relativenumber' (#21747)
- **statuscolumn**: Always fill click defs array (#21878)
- **statusline**: Don't show showcmd when not enough space (#21550)
- **statusline**: Make nvim_eval_statusline() work with %S (#21553)
- **statusline**: Don't leak memory with zero-width click labels
- **statusline**: Don't leak memory with truncated click labels
- **stdpath**: Default to /tmp if stdpath('run') cannot be created #20952
- **syntax**: Correct conceal for annotated code blocks (#21272)
- **tabline**: Avoid memory leak in tabline click definitions (#21847)
- **terminal**: Fix 'mousescroll' not respected in terminal mode (#21415)
- **test**: Unset XDG_CONFIG_HOME when running oldtest
- **test**: Fix issues detected by running unittests in ASAN/UBSAN
- **test**: Fix C imports on macOS arm64
- **tests**: Only get the color map once, even for multiple test files
- **tests**: Initialize Screen.colors in API highlight tests
- **tests**: Use -l mode for lsp tests
- **tests**: Fixes for using vim.mpack and more ASAN
- **tests**: Adapt treesitter/highlight_spec priority test
- **treesitter**: Properly restore `'syntax'` (#21358)
- **treesitter**: Really restore syntax
- **treesitter**: Validate language name
- **treesitter**: Fix most diagnostics
- **treesitter**: Don't trample parsers when filetype!=lang
- **treesitter**: Make params optional
- **treesitter**: Fixup language invalidation (#22381)
- **treesitter**: Remove virtual text from playground
- **treesitter**: Ipairs -> pairs
- **treesitter**: Fixup for health
- **treesitter**: Maintain cursor position when toggling anonymous nodes
- **treesitter**: Disallow empty filetypes
- **treesitter**: Typos in _range.lua
- **treesitter**: Break early from loop when match is found (#22499)
- **treesitter**: Raise ts_match_limit to 256 (#22497)
- **treesitter**: Is_in_node_range (#22582)
- **treesitter**: Correct include_bytes arg for parse()
- **treesitter**: Do not error on empty filetype
- **treesitter**: Better lang handling of get_parser()
- **treesitter**: Foldexpr (#22652)
- **treesitter**: InspectTree does not respect 'splitright' #22692
- **treesitter**: Annotations
- **treesitter**: Add missing deprecate
- **treesitter**: Update queries from nvim-treesitter
- **treesitter**: Use capture metadata range if exists
- **treesitter**: Disable folding in inspect_tree() (#22885)
- **treesitter**: Do not track ranges of the root tree (#22912)
- **ts**: Check buffer is loaded when restoring options (#21419)
- **tui**: Resume main thread if suspending isn't implemented (#20523)
- **tui**: Set cursor color param as string when required #21407
- **tui**: More work in the TUI
- **tui**: Do not set ui_client_termname if it is already set (#21607)
- **tui**: Make a copy of data->params before unibi_format() (#21643)
- **tui**: Do not invoke loop recursively for pad()
- **tui**: Set stdin as "blocking" on exit (#21973)
- **tui**: Detach/attach on suspend/resume (#22040)
- **tui**: Exit on input eof
- **tui**: Set taskbar, icon in Windows #22270
- **tui**: Only forward stdin_fd on first attach (#22293)
- **tui**: Properly check if stdin is a tty (#22321)
- **tui**: Avoid stack-use-after-scope with cursor color (#22435)
- **tutor**: Failing to get buf name #20933
- **ui**: Msg_ext_set_kind for nvim_echo (#20476)
- **ui**: Setting 'cmdheight' with global statusline (#20515)
- **ui**: Send grid_resize events before triggering VimResized (#20760)
- **ui**: Fix some cases of stale highlight definitions
- **ui**: Allow resize commands to set 'cmdheight' to 0
- **ui**: Fix fragile UI_CALL macro invocation (#21656)
- **ui**: Convert title_pos string in nvim_win_get_config
- **ui**: Set stc to empty in floatwin with minimal style (#21720)
- **ui**: Command line issues with external messages (#21709)
- **ui**: Re-organize tty fd handling and fix issues
- **ui**: Make sure screen is valid after resizing
- **ui**: Recording change doesn't trigger statusline redraw
- **ui**: Ruler is not redrawn in cmdline with redrawstatus
- **ui-ext**: Correct message kind in history before vim.ui_attach()
- **ui-ext**: Log and clear error in ui_comp_event (#21147)
- **ui-ext**: Force cursor update after resize in char-based UI
- **unittest**: Delete unused duplicated code
- **unittests**: Do not consider process crash to be a success
- **unittests**: Fix TUI broken test previously ignored
- **vim-patches**: Ensure libfuse is installed
- **vim.diff**: Correctly apply hunk offsets with linematch (#20931)
- **vim.diff**: Fix fastforward off-by-1 (#20937)
- **vim.ui.input**: Return empty string when inputs nothing (#20883)
- **vim.version**: Incorrect version.cmp()
- **vim.version**: Prerelease compare
- **win_close**: Remove float grid after closing buffer (#21551)
- **win_update**: Don't use unintialized memory in edge case (#22266)
- **windows**: Set console icon later in startup
- **windows**: Consistent normalization in fs.find

BUILD SYSTEM!
- Remove unused variable CMAKE_C_COMPILER_ARG1
- Remove code for cross-compilation
- Remove url for 32-bit winyank
- Remove unnecessary translation-related code
- Rely on builtin cmake downloading rather than custom script
- Define EP_PREFIX property
- Only generate compilation database for the nvim target (#20449)
- Remove EXITFREE for debug builds
- Generate compilation database for older cmake versions
- Add clang-tidy configuration file (#15601)
- Fix incorrect clang-tidy identifier rules (#20650)
- Rely on default cmake installation if possible
- Give example on complex regexes
- Preprocess vim patches with uncrustify #20786
- Copy each treesitter parser library individually #20797
- Fix plural messages missing from .po files (#20830)
- Make update-po support optwin.vim (#20840)
- Remove python linting #20851
- Add EXCLUDE option to add_glob_target
- Always ignore user's cmake preset (#20935)
- Allow IWYU to fix includes for all .c files
- Restrict `git describe` to top level source directory (#20993)
- Fix help tags generation when SHELL=fish (#21562)
- Add git sha to version when built with nix flake (#21210)
- Remove workaround for old luajit versions
- Remove workaround for ancient clang versions
- Use modern cmake (#21589)
- Include our libraries before system libraries (#21746)
- Enable iwyu with target properties instead of variables (#21797)
- Exclude tui/terminfo_defs.h from lintc-clint (#21822)
- Enable cmake workflow presets (#21860)
- Remove nvim as a dependency of unittests (#21903)
- Various cmake fixes (#21902)
- Bump MSVC warning to level two (#21890)
- Use CMAKE_POSITION_INDEPENDENT_CODE instead of -fPIC (#21947)
- Make generated source files reproducible #21586
- Remove unnecessary unit test code (#21940)
- Use cmake for all platforms for unibilium and libtermkey (#21926)
- Simplify treesitter installation (#21969)
- Use upstream CMakeLists.txt for unibilium (#21976)
- Delete pthreads import (#21732)
- Remove GNU make check (#21977)
- Remove tests for libtermkey (#21983)
- Use cmake to build treesitter on all platforms (#21984)
- Introduce default build variables (#21991)
- Use cmake to build libvterm on all platform (#21986)
- Check if libvterm version meets requirement (#22010)
- Find unibilium without relying on libfindmacros (#22015)
- Fix dependencies in find modules (#22017)
- Enable ccache by default if available (#22020)
- Enable ccache project-wide (#22045)
- Add uninstall make target (#22059)
- Remove unnecessary file generation (#22099)
- Update release data
- Stop relying on CMAKE_BUILD_TYPE to determine the build type (#22051)
- Unbreak building neovim with multi-config generators (#22104)
- Don't build libnvim when running the CI (#22149)
- Remove duplicate INTERFACE keyword (#22106)
- Prefer -D <variable>=<value> over -D<variable>=<value> (#22164)
- Replace check-single-includes with clang-tidy (#22061)
- Remove unused function get_test_target (#22176)
- Reuse source files with interface library (#22177)
- Create test/CMakeLists.txt and move test-related code (#22179)
- Remove codecov related files (#20859)
- Mark uninteresting variables as advanced (#22208)
- Enable MSVC level 3 warnings (#21934)
- Don't check environment variable to detect CI (#22234)
- Treat clang-tidy warnings as errors (#22238)
- Remove ENABLE_COMPILER_SUGGESTIONS option (#22249)
- Only use HOSTNAME_PRG if HOSTNAME is undefined (#22288)
- Use custom command to create single versiondef (#22290)
- Use libuv config file (#22209)
- Test multi-config generator (#22310)
- Build all dependencies in parallel (#22329)
- Remove unused dependency penlight (#22334)
- Build luajit in parallel (#22327)
- Set libtermkey project language to C (#22410)
- Remove pkgconfig-related code (#22422)
- Remove libfindmacros library (#22423)
- Cmake cleanup (#22251)
- Unset variables ending with "URL" if USE_EXISTING_SRC_DIR is ON
- Show build type specific compiler flags when using --version
- Fix unknown pragma warning with mingw (#22533)
- Consistently use the provided option paths
- Fix USE_EXISTING_SRC_DIR option
- Silence git describe error output
- Remove workaround for incorrectly packaged libluv
- Enable unit testing on release builds (#22554)
- Fix build warning when using gcc 4.9.2
- Explicitly add dependency include dir for header generation
- Sanitizers for gcc
- Set CMAKE_C_STANDARD to 99 for all dependencies
- Drop curl.exe on Windows
- Download wintools executables separately
- Cmake cleanup
- **MSVC**: Enable assertions on RelWithDebInfo build type (#22326)
- **Windows**: Fix redoing version generation (#21880)
- **Windows**: Make bundling nvim-qt optional (#21866)
- **Windows**: Allow building without custom md5sum
- **bump_deps.lua**: Run command -v in shell (#22030)
- **ci**: Let ASAN print tracebacks for more errors (SIGABORT, SIGILL)
- **cmake**: Add modelines to enable syntax highlighting
- **deps**: Restore support for USE_EXISTING_SRC_DIR (#20491)
- **deps**: Add build type for libuv (#20575)
- **deps**: Disable shared library for libvterm. (#20566)
- **deps**: Bump tree-sitter to v0.20.8 (#22663)
- **deps**: Bump luarocks to v3.9.2
- **deps**: Bump coxpcall to 1.17.0-1
- **deps**: Bump luacheck to 1.1.0-1
- **deps**: Bump mpack to 1.0.10
- **deps**: Bump lua parser to v0.0.14 (#20897)
- **deps**: Switch vim parser to maintained fork (#22896)
- **deps**: Bump vimdoc parser to v2.0.0 (#22870)
- **deps**: Set query parser to release (#22603)
- **deps**: Bump libvterm to v0.3.1
- **deps**: Bump msgpack-c to v6.0.0 (#22522)
- **deps**: Bump win32yank to v0.1.1 (#22700)
- **deps**: Bump actions/stale from 7 to 8
- **deps**: Switch to Launchpad for libvterm and libtermkey (#22811)
- **editorconfig**: Set indent_size to 4 for python files (#21135)
- **lint**: Remove clint.py rules for braces #20880
- **lint**: Add more shell scripts to lintsh
- **lintsh**: Double quote to prevent word splitting (#21571)
- **luarocks**: Update busted version to v2.1.1 (#22029)
- **nix**: Change the pkgs to final, add new version of libvterm (#20410)
- **nix**: Update nixpkgs
- **nix**: Clean up nix flake (#21565)
- **nix**: Remove pylint as it has been removed (#21572)
- **nix**: Fixed build (#22918)
- **vim-patch.sh**: Handle added/removed files properly
- **vim-patch.sh**: Checkout files with path for uncrustify (#20863)
- **windows**: Export extern symbols for use in FFI #22756
- **windows**: Specify Windows 8 as the minimum version (#22173)
- **windows**: Work around luarocks not finding its own md5sum

DOCUMENTATION
- Refer to vim.lsp.start() in LSP issue template #20422
- Fix incorrect :help tag (#20511)
- Added proper annotations to functions in shared.lua
- Fix typos
- Fix/remove invalid URLs #20647
- "supported platforms" matrix #19615
- Update vimdoc parser #20747
- ":che" is ":checkhealth" #20147
- .git-blame-ignore-revs (#20820)
- Swap CursorLineFold and CursorLineSign (#20875)
- Add language annotation to Nvim manual
- Add missing docs from some Vim patches (#21296)
- Dark/light color/accessibilty pass for generated html docs #21345
- Add links to extmarks and namespaces (#21378)
- Remove "How-to disable mouse" menu item #21394
- Add security policy (#17338)
- Fix order of numbers in syntax.txt (#21581)
- Clarify line about converse of lua-heredoc (#21592)
- Fix treesitter parsing errors
- Add 'statuscolumn' docstrings (#21717)
- Builtin TUI is no longer channel 0 (#21794)
- Treesitter.add_directive, add_predicate #21206
- Docs: use codeblocks in runtime/doc/options.txt (#21919)
- Clarify :runtime behavior without [where] again (#22003)
- Clarify "pipe" mode for sockconnect
- Reword news.txt to ensure a consistent style (#22215)
- Remove mentions of 'balloonexpr' #22049
- Remove the test badge from the README (#22350)
- Mention getmousepos() for click execute function label
- Naming conventions, guidelines
- Fix more treesitter parsing errors
- Use build/bin/nvim instead of nvim in gen_vimdoc (#22398)
- Fix vim.treesitter tags
- Lua2dox.lua debugging
- Module-level docstrings (@defgroup) #22498
- Add missing highlight groups for floats
- Add removed features in news.txt
- Fix g:terminal_color_x terminal colors #22746
- More details about vim.region (#21116)
- How to debug TUI using gdb/lldb #22771
- Add vim.treesitter.query.get_query() to deprecated.txt
- **README**: Add Kotlin as a language which can use the API (#21567)
- **README**: Fix CI status badge (#22308)
- **api**: Pattern is not expanded for autocommands (#20812)
- **api**: Fix treesitter parsing errors
- **api**: Tweak data arg for nvim_create_autocmd (#22008)
- **api**: Link to nvim_set_hl_ns from nvim_set_hl (#22678)
- **dev-style**: Remove rule about variable declarations (#20446)
- **dev-style**: Remove rules covered by uncrustify
- **diagnostic**: Number → integer (#22512)
- **docstrings**: Fix runtime type annotations
- **editorconfig**: Update news.txt
- **editorconfig**: Add editorconfig.txt
- **editorconfig**: Number → integer (#22514)
- **filetype**: Number → integer (#22516)
- **gen**: Support language annotation in docstrings
- **gitignore**: Correct oldtest path
- **help**: Consistent headers for local additions
- **highlight**: Fix type annotations (#22272)
- **html**: Render @see items as a list #22675
- **inspect**: Number → integer (#22511)
- **lsp**: Add formatting APIs to deprecated.txt (#20487)
- **lsp**: Update buf_notify and rpc.notify params types (#21753)
- **lsp**: Fix type annotation on convert_input_to_markdown_lines (#21772)
- **lsp**: Format arguments to start_client() (#21980)
- **lsp**: Update cmd_env description (#22438)
- **lsp**: Change type annotations from number → integer (#22510)
- **lsp**: Type annotation for lsp.client (#22509)
- **lsp**: More precise type annotations (#22621)
- **lsp**: Opt-out of default LSP "gq" #22615
- **lua**: Add clarifications for fs.find() and fs.normalize() (#21132)
- **lua**: Correct the tags for vim.opt_local and vim.opt_global (#21138)
- **lua**: Correct vim.spell.check example (#21311)
- **lua**: Add guide to using Lua in Neovim (#21137)
- **lua**: Add `vim.json` (#21538)
- **lua**: Fix treesitter parsing errors
- **lua**: Adjust some type annotations
- **lua**: Lua-guide: <Nop> is for rhs of vim.keymap.set(), not lhs (#21814)
- **lua**: Use luaref tag instead of www.lua.org #21813
- **lua**: Number → integer (#22517)
- **luvref**: Fix treesitter parsing errors
- **luvref**: Update to version bump
- **maintain**: CI strategy #20778
- **maintain**: Add note on updating luvref.txt
- **manual**: Fix treesitter parsing errors
- **news**: Add news.txt and link from README (#20426)
- **options**: Remove mentions of 'imactivatefunc' and 'imstatusfunc'
- **shell**: Mention "&" for piping with powershell #20459
- **support**: Update tested versions (#21126)
- **test**: Using cmake directly (without make) #22781
- **treesitter**: Fix predicate syntax (#21016)
- **treesitter**: Change links for `eq?` and `set!` to codeblocks  (#21047)
- **treesitter**: Use full function names in tags (#21321)
- **treesitter**: Fix parse errors
- **treesitter**: Number → integer (#22513)
- **treesitter**: Add query injections
- **tutor**: Fix TODO line demo (#21965)
- **uri**: Number → integer (#22515)
- **usr**: Make usr_05.txt more coherent with Nvim changes (#22428)
- **usr_05**: Update sentence about Nvim default behavior of Q (#20817)
- **vim.fs**: Normalize Windows example was incorrect (#21966)
- **website**: Soft wrap code blocks #21644

REFACTOR
- Remove char_u type and replace with char, uint8_t, etc
- remove STRNCMP (#21208) and STRLCPY (#21235)
- Remove clint error suppression as all errors has been fixed #21782
- Explicitly convert HANDLE to intptr_t for _open_osfhandle()
- Clang-tidy fixes to silence clangd warning (#20683)
- Fix uncrustify lint errors
- Move do_mouse() and its helpers to mouse.c (#20895)
- Fix clang-tidy warnings
- Click definition functions #20923
- Remove stray emsg check after #20992 (#20996)
- Move tabline code to statusline.c (#21008)
- Convert drawline.c draw states to enum (#21067)
- Remove __STDC_ISO_10646__ check
- Deprecate 'secure' option
- Remove old TODO comments that aren't relevant anymore (#21144)
- Maybe suppress a PVS warning
- Rework parameter validation in vim.secure.trust() (#21223)
- Buffer_ensure_loaded()
- Move ex_retab() to indent.c
- Remove COMMA (#21260)
- Make sure getting a callback doesn't modify argument
- Rename mch_msg => os_msg
- Rename mch_get_acl => os_get_acl
- Eliminate os_unix.c #21621
- Extract code to open stdin for reading
- Eliminate bump-deps.sh using "nvim -l"
- Fix IWYU mapping file and use IWYU (#21802)
- Format with stylua (#21821)
- Remove E5500, adjust tests
- Fix sign conversion warning from gcc (#21833)
- Use uint8_t for blobs and ga_append() (#21916)
- Use flexible arrays instead of the length-of-one trick (#22072)
- Reduce scope of locals as per the style guide (#22206)
- Move init_default_autocmds to lua
- Rename show_tree => inspect_tree #22474
- Move ga_loaded to runtime.c (#22626)
- Do more in TRY_WRAP
- Add const and remove unnecessary casts (#22841)
- Use bool type for global variables (#22842)
- Rename local API alias from a to api
- Make error message definitions const
- Remove use of reserved c++ keywords
- **PVS**: Suppress false positive V547 in drawline.c (#21875)
- **PVS/V1048**: Remove unnecessary assignment (#21870)
- **PVS/V1048**: Remove redundant assignment (#21871)
- **PVS/V1048**: Remove duplicated assignments (#21873)
- **PVS/V581**: Merge identical if statements (#22390)
- **api**: Do not allocate temporaries for internal events
- **api**: VALIDATE macros #22187 #22256 #22262
- **build**: Remove unused stdlib function and include checks
- **build**: Graduate HAVE_LOCALE_H feature
- **build**: Graduate libtreesitter features which are 1+ years old
- **build**: Graduate msgpack-c FLOAT32 "feature" since forever
- **build**: Graduate unibilium VAR_FROM feature from 2017
- **build**: Graduate -Wvla, -fno-common and -Og "features"
- **build**: Make installation of runtime/ more effective
- **checkhealth**: Convert "nvim" check to Lua
- **clint**: Convert short to int16_t (#20815)
- **column**: Remove unused build_statuscol_str() arguments
- **completion**: Don't add and remove '^' for Lua (#22702)
- **diagnostic**: Remove deprecated function (#20423)
- **diagnostic**: DRY for loop #21521
- **diff.c**: Reduce scope of variables (#20781)
- **diff.c**: Break up ex_diffgetput()
- **diff.c**: Allocate hunks directly in ga_array
- **diff.c**: Factor out hunk extraction
- **diff.c**: Factor out hunk processing
- **diff.c**: Simplify diff_buf_idx()
- **diff.c**: Internal does not need diffstyle
- **diff.c**: Factor out diffblock deletion
- **diff.c**: Copy lines via memmove
- **drawline.c**: Leadcol/trailcol
- **drawline.c**: Move number column helpers function together
- **drawscreen.c**: Reduce scopes of locals (#20668)
- **eval**: Make get_lval() explicitly check for v:lua
- **eval.c**: Factor out get_number_tv() (#21893)
- **exit**: Pass error message to preserve_exit() (#22097)
- **extmarks**: Some minor internal API changes
- **f_has**: Remove wrong comment (#21561)
- **fileio.c**: Reduce scope of locals
- **fileio.c**: Refactor match_file_path()
- **fileio.c**: Refactor vim_rename()
- **fileio.c**: Refactor buf_write_bytes
- **fileio.c**: Refactor buf_write_bytes (2)
- **fileio.c**: Remove HAS_BW_FLAGS
- **fileio.c**: Factor out autocmd handling from buf_write()
- **fileio.c**: More bools
- **fileio.c**: Reduce scope of locals
- **fileio.c**: Do not use macros for error handling
- **fileio.c**: Factor out buf_write post autocmds
- **fileio.c**: Factor out file info calc
- **fileio.c**: Make unreadable expression readable
- **fileio.c**: Factor out backup creation
- **fileio.c**: Remove HAVE_ACL ifdefs
- **fileio.c**: Normalize ifdefs
- **fs**: Replace vim.fn/vim.env in vim.fs (#20379)
- **highlight**: Rename FloatBorderTitle #20988
- **highlight**: Reshape the HL_UNDER* bits into a 3-bit integer mask
- **highlight_group.c**: Reduce scope of locals
- **intro**: Avoid Coverity warning (#22000)
- **loader**: Use vim.fs
- **loader**: Remove BufWritePost autocmd
- **loader**: Add typing for package.loaders
- **loader**: Simplify tracking logic
- **loader**: Cache hash information
- **log**: Reduce compile time LOG_LEVEL granularity
- **lsp**: Remove deprecated lsp functions (#20421)
- **lsp**: Extract a _create_server method in lsp_spec
- **lsp**: Remove deprecated vim.lsp.buf_get_clients calls (#21337)
- **lsp**: Remove workaround for missing bit module (#22373)
- **lsp**: Remove deprecated code (#22389)
- **lsp**: Remove _resolve_capabilities_compat (#22628)
- **lsp**: Do not parse verbose output when overwriting options (#22810)
- **lua**: Move _G.arg init to nlua_init()
- **lua**: Get all marks instead of iterating over namespaces
- **lua2dox**: Format with stylua
- **main.c**: Remove unreachable use_builtin_ui conditions (#22338)
- **man**: Pass env directly to spawn() (#20591)
- **man**: Add type annotations
- **memory**: Simplify new alignment logic
- **option.c**: Reduce scope of locals
- **option.c**: Add get_varp_from and get_varp_scope_from
- **option.c**: De-nest set_option_value
- **option.c**: Use intermediate for options ref
- **option.c**: Add do_set_num
- **option.c**: Add do_set_bool
- **option.c**: Simplify do_set_string
- **option.c**: Factor out common skip check
- **option.c**: Factor out loop code from do_set()
- **option.c**: Remove goto
- **option.c**: Change nextchar to uint8_t
- **option.c**: Use skiptowhite_esc
- **option.c**: Factor out set op parsing
- **option.c**: Factor out option prefix parsing
- **option.c**: Factor out option name parsing
- **option.c**: Factor out opt_idx validation
- **option.c**: De-nest code in do_set_option
- **option.c**: Move bool prefix check
- **option.c**: Add do_set_option_value
- **option.c**: Factor out some nextchar checks
- **option.c**: Factor out string option special case handling
- **options**: Don't pass negative number to illegal_char() (#21999)
- **optionstr.c**: Reduce scope of locals
- **optionstr.c**: Break up did_set_string_option 1-52
- **optionstr.c**: Remove some simple did_set_* functions
- **optionstr.c**: Add did_set_string_option_for
- **optionstr.c**: Break up did_option_listflags
- **optionstr.c**: Remove some redundant parens
- **optionstr.c**: Break up did_set_expropt
- **optionstr.c**: Move handling of formatlistpat
- **optionstr.c**: Align comments (#22070)
- **params**: Open -s and -w script files after parsing commands
- **pty**: Remove old logic for inheriting termios from host terminal
- **redraw**: No type argument in update_screen()
- **redraw**: Various simplifications
- **redraw**: Make cursor position redraw use the "redraw later" pattern
- **runtime**: Use vim.version to compare versions #22550
- **runtime.c**: Factor out find_script_by_name() (#22620)
- **screen**: Screen.c delenda est
- **sleep**: Simplify rube goldberg implementation of :sleep
- **spell**: Use uint8_t for "byts" variables (#22519)
- **statusline**: Move statusline defs to statusline_defs.h
- **tag**: Remove return type from do_tag()
- **test**: Create an lsp-specific helpers.lua file
- **tests**: Lift retry() into assert_log()
- **tests**: Run unittests using main nvim binary in interpreter mode
- **tests**: Move lua-client into core and use it for functionaltests
- **treesitter**: Add vim.treesitter.get_node() (#22360)
- **treesitter**: Use string.format to create lines
- **treesitter**: Simplify some range functions
- **treesitter**: Delegate region calculation to treesitter (#22553)
- **treesitter**: Use byte ranges from treesitter (#22589)
- **treesitter**: Add Range type aliase for Range4|Range6
- **treesitter**: Delegate region calculation to treesitter (#22576)
- **treesitter**: Move inspect_tree impl
- **tui**: Use nvim_echo() for verbose terminfo
- **tui/input.c**: Remove unused multithreading code (#22342)
- **ui**: Statusbar invalidation to win_set_inner_size()
- **ui**: Devirtualize the ui layer
- **ui**: Cleanup 'redrawdebug', introduce "flush" mode
- **ui**: Don't reimplement redrawing in focus gained handling
- **ui**: Remove some superfluous ui_flush() calls
- **ui**: Ui_log() can now just be a function
- **uncrustify**: Move macros definitions to enable formatting
- **uncrustify**: Improved formatting rules
- **vim.gsplit**: Remove "keepsep"
- **vim.version**: Cleanup
- **vim.version**: Use lazy.nvim semver module
- **vim.version**: Use lazy.nvim semver module
- **win_close**: Remove "force", don't pass on "free_buf" (#21921)
- **win_line**: Rename attr to vi_attr (#21487)
- **win_line**: Move some variables into a struct (#22490)
- **window**: Remove aucmd_win check from one_window() (#21972)
- **window.c**: Reduce scope of locals (#20301)
- **windows**: Move os_icon_xx functions

TESTING
- Introduce skip() #21010
- Remove skip for 32-bit MSVC (#21030)
- Don't skip parser_spec on windows (#20294)
- Add a Lua test for swap file created before boot
- Fix failing tui_spec.lua tests (#21117)
- Use isCI to simplify CI detection (#21134)
- Simplify platform detection (#21020)
- Adding/removing winbar should not cause win_pos events (#21226)
- Use luv.os_uname for fast platform detection (#21157)
- Add more tests for float window bufpos (#21318)
- Convert another test in test_matchadd_conceal.vim to Lua (#21353)
- Remove unused variable (#21552)
- Add test cases for command line issues
- Add more tests for Unicode
- Avoid consecutive mouse input at different positions (#21781)
- Align Test_shell_options, Test_shellslash with Nvim default
- Avoid noise in NVIM_LOG_FILE
- Exepath() returns correct path with cmd.exe, powershell #21928
- Remove unused field ext_float (#22243)
- Make expect_unchanged() less confusing (#22255)
- Make {MATCH:} behave less unexpectedly in screen:expect()
- Don't search entire repo for files
- Move oldtests to test directory (#22536)
- Use a wider screen in the rightleft winhl test (#22641)
- Unskip working Windows tests (#22537)
- Re-bundle cat on windows (#21255)
- Windows not detected in msys shells #22671
- Use exec_capture() in more places (#22787)
- Fix flaky watchfiles tests (#22637)
- Replace lfs with luv and vim.fs
- Improve editor/fold_spec.lua and editor/put_spec.lua (#22916)
- **Windows**: Normalize paths for test summary
- **api**: Migrate screenchar() test in in window API to screen test
- **editorconfig**: Add editorconfig tests
- **exit_spec**: Make sure that autocommands are triggered (#22188)
- **fileio_spec**: Avoid expect_exit() without calling clear() (#21810)
- **float_spec**: Add missing sum_scroll_delta #22648
- **help**: Drop treesitter parse error to 0
- **highlight_spec**: Fix warning in Visual highlight test (#22719)
- **legacy/prompt_buffer_spec**: Align script with oldtest more (#22354)
- **lsp**: Call clear() before willSave tests (#21336)
- **lsp**: Add a screen:expect() between insert() and feed_command() (#21577)
- **lua/diagnostic_spec**: Remove unnecessary after_each()
- **lua/fs_spec**: Fix vim.fs.dir() test (#21503)
- **lua/ui_spec**: Fix Ctrl-C test flakiness (#21039)
- **old**: Test_lambda.vim garbagecollect() -> test_garbagecollect_now()
- **old**: Remove stray test42 files (#20966)
- **old**: Make Test_help_tagjump() test order match upstream
- **old**: Add missing lines from Vim patch 8.2.0522 (#21048)
- **old**: Make ":h local-additions" work properly in test_help.vim
- **old**: Skip Vim9 script with less divergence
- **old**: Change $TMPDIR from Xtest-tmpdir to X-test-tmpdir (#21346)
- **old**: Make test_signs.vim closer to upstream (#21479)
- **old**: Run some part of 'cpoptions' tests
- **old**: Make getting an unused PID work (#22529)
- **old**: Move memfile_test.c to test/old/ (#22567)
- **old**: Unskip working tests on Windows (#22650)
- **shada**: Fix shada syntax definitions test
- **statuscolumn**: Add more tests for wrapped lines (#21718)
- **statuscolumn**: %l should follow default wrap behavior (#21766)
- **statuscolumn_spec**: Remove unnecessary feed('lh')
- **statusline**: UI elements are not redrawn on K_EVENT unnecessarily
- **syn_attr_spec**: Add more information (#21912)
- **termxx_spec**: Fix TermClose bdelete test flakiness (#22463)
- **treesitter/parser_spec**: Correct time unit (#22471)
- **tui_spec**: Don't use nested terminal for resize at startup (#21583)
- **tui_spec**: Avoid race between nvim_paste and nvim_input (#21639)
- **tui_spec**: Improve cursor_address test (#21700)
- **tui_spec**: Doesn't use Unicode in cursor_address test (#21703)
- **tui_spec**: Make rapid resize test test what it wants to test (#21933)
- **tui_spec**: Don't expect exact screen in rapid resize test (#21935)
- **tui_spec**: Remove unnecessary arguments for remote UI
- **tui_spec**: Use RPC request to setup autocommands
- **ui**: Wait for another success with failure after success
- **undo_spec**: Add more tests for writing in Insert mode
- **unit**: Use file:close() properly (#21505)
- **vim.fs.normalize**: Enable test on Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants