Merge branch 'v0.8' into markdown-oxide

This commit is contained in:
Ching Pei Yang 2025-09-26 01:28:10 +02:00 committed by GitHub
commit ef508ea10d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 583 additions and 394 deletions

View file

@ -38,17 +38,17 @@ Autocommands (`autocmd`) trigger actions based on events happening within Neovim
(e.g., saving a file, entering a buffer). Each entry in the list is a submodule
with the following options:
| Option | Type | Default | Description | Example |
| :--------- | :-------------------- | :------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------- |
| `enable` | `bool` | `true` | Enables or disables this autocommand definition. | `true` |
| `event` | `nullOr (listOf str)` | `null` | **Required.** List of Neovim events that trigger this autocommand (e.g., `BufWritePre`, `FileType`). | `[ "BufWritePre" ]` |
| `pattern` | `nullOr (listOf str)` | `null` | List of file patterns (globs) to match against (e.g., `*.py`, `*`). If `null`, matches all files for the given event. | `[ "*.lua", "*.nix" ]` |
| `callback` | `nullOr luaInline` | `null` | A Lua function to execute when the event triggers. Use `lib.nvim.types.luaInline` or `lib.options.literalExpression "mkLuaInline '''...'''"`. **Cannot be used with `command`.** | `lib.nvim.types.luaInline "function() print('File saved!') end"` |
| `command` | `nullOr str` | `null` | A Vimscript command to execute when the event triggers. **Cannot be used with `callback`.** | `"echo 'File saved!'"` |
| `group` | `nullOr str` | `null` | The name of an `augroup` (defined in `vim.augroups`) to associate this autocommand with. | `"MyCustomAuGroup"` |
| `desc` | `nullOr str` | `null` | A description for the autocommand (useful for introspection). | `"Format buffer on save"` |
| `once` | `bool` | `false` | If `true`, the autocommand runs only once and then automatically removes itself. | `false` |
| `nested` | `bool` | `false` | If `true`, allows this autocommand to trigger other autocommands. | `false` |
| Option | Type | Default | Description | Example |
| :--------- | :-------------------- | :------ | :---------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------- |
| `enable` | `bool` | `true` | Enables or disables this autocommand definition. | `true` |
| `event` | `nullOr (listOf str)` | `null` | **Required.** List of Neovim events that trigger this autocommand (e.g., `BufWritePre`, `FileType`). | `[ "BufWritePre" ]` |
| `pattern` | `nullOr (listOf str)` | `null` | List of file patterns (globs) to match against (e.g., `*.py`, `*`). If `null`, matches all files for the given event. | `[ "*.lua", "*.nix" ]` |
| `callback` | `nullOr luaInline` | `null` | A Lua function to execute when the event triggers. Use `lib.generators.mkLuaInline`. **Cannot be used with `command`.** | `lib.generators.mkLuaInline "function() print('File saved!') end"` |
| `command` | `nullOr str` | `null` | A Vimscript command to execute when the event triggers. **Cannot be used with `callback`.** | `"echo 'File saved!'"` |
| `group` | `nullOr str` | `null` | The name of an `augroup` (defined in `vim.augroups`) to associate this autocommand with. | `"MyCustomAuGroup"` |
| `desc` | `nullOr str` | `null` | A description for the autocommand (useful for introspection). | `"Format buffer on save"` |
| `once` | `bool` | `false` | If `true`, the autocommand runs only once and then automatically removes itself. | `false` |
| `nested` | `bool` | `false` | If `true`, allows this autocommand to trigger other autocommands. | `false` |
:::{.warning}
@ -71,7 +71,7 @@ Vimscript) for the same autocommand. Choose one.
pattern = [ "*.lua" ];
group = "UserSetup";
desc = "Notify after saving Lua file";
callback = lib.nvim.types.luaInline ''
callback = lib.generators.mkLuaInline ''
function()
vim.notify("Lua file saved!", vim.log.levels.INFO)
end

View file

@ -291,6 +291,10 @@
`null` value to disable them if conform is enabled.
- Add [markdown-oxide](https://github.com/Feel-ix-343/markdown-oxide) option to
markdown language module.
- Fix Helm-YAML language module integration. YAML diagnostics will now remain in
`helmfile`s when both are enabled.
- Fix YAML language module not activating LSP keybinds if the Helm language
module was also enabled.
[TheColorman](https://github.com/TheColorman):
@ -546,3 +550,16 @@
[derethil](https://github.com/derethil):
- Fix `vim.lazy.plugins.<name>.enabled` Lua evaluation.
[Jules](https://github.com/jules-sommer):
[nvim-highlight-colors]: https://github.com/brenoprata10/nvim-highlight-colors
- Add [nvim-highlight-colors] plugin in `vim.ui.nvim-highlight-colors` with
`enable` and `setupOpts`
[simon-wg](https://github.com/simon-wg):
- Update `python` language module to use correct lsp binary.
- Fix `python` pyright and basedpyright language servers not using default on
attach behavior.