From a37bce1194fd5b1ed28a682ec23592aebb2a2b12 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 13 Sep 2025 16:20:20 +0200 Subject: [PATCH 1/2] languages/nix: fix missing init_options when format enabled --- modules/plugins/languages/nix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/plugins/languages/nix.nix b/modules/plugins/languages/nix.nix index 83022adf..76310459 100644 --- a/modules/plugins/languages/nix.nix +++ b/modules/plugins/languages/nix.nix @@ -72,6 +72,7 @@ else noFormat }, cmd = ${packageToCmd cfg.lsp.package "nixd"}, + options = ${toLuaObject cfg.lsp.options}, ${optionalString cfg.format.enable '' settings = { nixd = { @@ -87,7 +88,6 @@ command = {"${cfg.format.package}/bin/nixfmt"}, }, ''} - options = ${toLuaObject cfg.lsp.options}, }, }, ''} From d8a4fa62bd697bc094b5f2e83e42b72ed2225db4 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Sat, 13 Sep 2025 16:24:49 +0200 Subject: [PATCH 2/2] docs: reformat autocmds.md --- docs/manual/configuring/autocmds.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/manual/configuring/autocmds.md b/docs/manual/configuring/autocmds.md index 92df10f7..e547ace2 100644 --- a/docs/manual/configuring/autocmds.md +++ b/docs/manual/configuring/autocmds.md @@ -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" ]` | +| 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` | +| `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}