From 411c58f2790efb11607a35d179b8f99854c192d6 Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Thu, 27 Feb 2025 11:03:16 -0500 Subject: [PATCH 01/17] docs(neovim): add configuration guide for Neovim as LSP client Introduce a new documentation file for configuring Neovim as a Language Server Protocol (LSP) client using nvim-lspconfig and conform.nvim. This guide provides step-by-step instructions for setting up Air as an LSP client and enabling automatic formatting on save. Update the main editors documentation to include a link to the new Neovim guide, expanding the list of supported editors. --- docs/editor-neovim.qmd | 74 ++++++++++++++++++++++++++++++++++++++++++ docs/editors.qmd | 8 +++-- 2 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 docs/editor-neovim.qmd diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd new file mode 100644 index 00000000..29d0bb1c --- /dev/null +++ b/docs/editor-neovim.qmd @@ -0,0 +1,74 @@ +--- +title: "Neovim" +editor: + markdown: + wrap: sentence + canonical: true +--- + +# Installing the air client + +First, install the Air client by following the instructions on the [Air CLI documentation](https://posit-dev.github.io/air/cli.html). + +# Configuration + +Air can be configured as a Language Server Protocol (LSP) client via [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) or as a formatter plugin via [conform.nvim](https://github.com/stevearc/conform.nvim). + +## LSP Configuration with nvim-lspconfig + +To configure Air as an LSP client, add the following to your `nvim/lua/plugins/lspconfig.lua`: + +```lua +-- Custom server configuration for 'air' +require("lspconfig.configs").air = { + default_config = { + cmd = { vim.fn.expand("$HOME/.local/bin/air"), "language-server" }, + filetypes = { "r" }, + root_dir = function(fname) + local git_dir = vim.fs.find(".git", { path = fname, upward = true })[1] + return git_dir and vim.fs.dirname(git_dir) or vim.loop.os_homedir() + end, + settings = {}, + }, +} +``` + +To enable automatic formatting on save, add the following to your `nvim/after/plugin/lsp.lua` (or other appropriate location): + +```lua +vim.api.nvim_create_autocmd("BufWritePre", { + pattern = { "*.R", "*.r" }, + callback = function() + vim.lsp.buf.format({ + async = true, + filter = function(client) + return client.name == "air" + end, + }) + end, +}) +``` + +## conform.nvim configuration + +Air can be configured as a formatter plugin via [conform.nvim](https://github.com/stevearc/conform.nvim). This allows you to format R code with Air inside code chunks in Quarto and RMarkdown documents. It can be configured by adding the following to your `nvim/lua/plugins/conform.lua`: + +```lua +return { + "stevearc/conform.nvim", + enabled = true, + config = function() + local conform = require("conform") + + conform.setup({ + notify_on_error = true, + format_on_save = { + lsp_fallback = true, + }, + formatters_by_ft = { + r = { "air" }, + }, + }) + end, +} +``` diff --git a/docs/editors.qmd b/docs/editors.qmd index 204ed5e4..4fc132dd 100644 --- a/docs/editors.qmd +++ b/docs/editors.qmd @@ -11,8 +11,10 @@ Many do, including [Positron](https://positron.posit.co/), [VS Code](https://cod Air also provides some support for code editors that allow for external formatters, such as [RStudio](https://posit.co/products/open-source/rstudio/). Follow one of our editor specific guides to get set up with Air in your preferred editor: -- [VS Code](editor-vscode.qmd) +- [VS Code](editor-vscode.qmd) -- [Positron](editor-vscode.qmd) +- [Positron](editor-vscode.qmd) -- [RStudio](editor-rstudio.qmd) +- [RStudio](editor-rstudio.qmd) + +- [neovim](editor-neovim.qmd) From 009df8d61ea224816cb4153b0f69d0c4071d4c35 Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Thu, 27 Feb 2025 12:59:28 -0500 Subject: [PATCH 02/17] docs(neovim): simplify LSP client configuration for Air by using default setup method --- docs/editor-neovim.qmd | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 29d0bb1c..beccaed4 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -19,18 +19,7 @@ Air can be configured as a Language Server Protocol (LSP) client via [nvim-lspco To configure Air as an LSP client, add the following to your `nvim/lua/plugins/lspconfig.lua`: ```lua --- Custom server configuration for 'air' -require("lspconfig.configs").air = { - default_config = { - cmd = { vim.fn.expand("$HOME/.local/bin/air"), "language-server" }, - filetypes = { "r" }, - root_dir = function(fname) - local git_dir = vim.fs.find(".git", { path = fname, upward = true })[1] - return git_dir and vim.fs.dirname(git_dir) or vim.loop.os_homedir() - end, - settings = {}, - }, -} +require("lspconfig").air.setup({}) ``` To enable automatic formatting on save, add the following to your `nvim/after/plugin/lsp.lua` (or other appropriate location): From a13afafa811b6fd6b40430abb38b672d873656ac Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Thu, 27 Feb 2025 16:40:28 -0500 Subject: [PATCH 03/17] Update docs/editor-neovim.qmd Co-authored-by: Tymoteusz Makowski --- docs/editor-neovim.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index beccaed4..57b5abd0 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -16,7 +16,7 @@ Air can be configured as a Language Server Protocol (LSP) client via [nvim-lspco ## LSP Configuration with nvim-lspconfig -To configure Air as an LSP client, add the following to your `nvim/lua/plugins/lspconfig.lua`: +To configure Air's language server, add the following to your config: ```lua require("lspconfig").air.setup({}) From 6ae2a0bd03bba94b935a17a20d8b95af1c44c5c2 Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Thu, 27 Feb 2025 16:40:43 -0500 Subject: [PATCH 04/17] Update docs/editor-neovim.qmd Co-authored-by: Tymoteusz Makowski --- docs/editor-neovim.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 57b5abd0..fe5c7834 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -22,7 +22,7 @@ To configure Air's language server, add the following to your config: require("lspconfig").air.setup({}) ``` -To enable automatic formatting on save, add the following to your `nvim/after/plugin/lsp.lua` (or other appropriate location): +To format files with Air on save, add the following to your configuration: ```lua vim.api.nvim_create_autocmd("BufWritePre", { From bb94158f3c965d865f2c8707e3f2287ee3637b3c Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Thu, 27 Feb 2025 16:42:32 -0500 Subject: [PATCH 05/17] Update docs/editor-neovim.qmd Tx! Co-authored-by: Tymoteusz Makowski --- docs/editor-neovim.qmd | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index fe5c7834..0f5957fc 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -29,7 +29,6 @@ vim.api.nvim_create_autocmd("BufWritePre", { pattern = { "*.R", "*.r" }, callback = function() vim.lsp.buf.format({ - async = true, filter = function(client) return client.name == "air" end, From e06f58621c349e2bf1b0ecc1c9ce8338c43ca18d Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Thu, 27 Feb 2025 16:53:27 -0500 Subject: [PATCH 06/17] docs(editor-neovim): simplify conform.nvim configuration example and add link to documentation for further guidance --- docs/editor-neovim.qmd | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 0f5957fc..83a0a4eb 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -42,21 +42,11 @@ vim.api.nvim_create_autocmd("BufWritePre", { Air can be configured as a formatter plugin via [conform.nvim](https://github.com/stevearc/conform.nvim). This allows you to format R code with Air inside code chunks in Quarto and RMarkdown documents. It can be configured by adding the following to your `nvim/lua/plugins/conform.lua`: ```lua -return { - "stevearc/conform.nvim", - enabled = true, - config = function() - local conform = require("conform") - - conform.setup({ - notify_on_error = true, - format_on_save = { - lsp_fallback = true, - }, - formatters_by_ft = { - r = { "air" }, - }, - }) - end, -} +require("conform").setup({ + formatters_by_ft = { + r = { "air" }, + }, +}) ``` + +See the [conform.nvim documentation](https://github.com/stevearc/conform.nvim?tab=readme-ov-file#installation) for more information on how to configure conform.nvim with your favorite plugin manager. From 001b82d97a71494fa1b6e88722b8d59e836a5d91 Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Fri, 28 Feb 2025 06:45:00 -0500 Subject: [PATCH 07/17] Update docs/editor-neovim.qmd Co-authored-by: Lionel Henry --- docs/editor-neovim.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 83a0a4eb..76144e78 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -6,7 +6,7 @@ editor: canonical: true --- -# Installing the air client +# Installing the Air server First, install the Air client by following the instructions on the [Air CLI documentation](https://posit-dev.github.io/air/cli.html). From 088da04cb9ec7b3ea29fab7e818b4526fa05db0d Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Fri, 28 Feb 2025 06:45:15 -0500 Subject: [PATCH 08/17] Update docs/editor-neovim.qmd Co-authored-by: Lionel Henry --- docs/editor-neovim.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 76144e78..29ac05a0 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -8,7 +8,7 @@ editor: # Installing the Air server -First, install the Air client by following the instructions on the [Air CLI documentation](https://posit-dev.github.io/air/cli.html). +First, install Air by following the instructions on the [Air CLI documentation](https://posit-dev.github.io/air/cli.html). The CLI binary bundles the Air server as well as a command line formatting tool. # Configuration From 68bf19af162574d10730ca12602c06b24fb9ac2d Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Fri, 28 Feb 2025 06:45:24 -0500 Subject: [PATCH 09/17] Update docs/editor-neovim.qmd Co-authored-by: Lionel Henry --- docs/editor-neovim.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 29ac05a0..6cff4d3c 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -12,7 +12,7 @@ First, install Air by following the instructions on the [Air CLI documentation]( # Configuration -Air can be configured as a Language Server Protocol (LSP) client via [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) or as a formatter plugin via [conform.nvim](https://github.com/stevearc/conform.nvim). +Air can be configured as a Language Server Protocol (LSP) server via [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) or as a formatter plugin via [conform.nvim](https://github.com/stevearc/conform.nvim). ## LSP Configuration with nvim-lspconfig From 19bb536340eebddd6f966e4d128ce5884ffc2e54 Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Fri, 28 Feb 2025 06:45:38 -0500 Subject: [PATCH 10/17] Update docs/editor-neovim.qmd Co-authored-by: Lionel Henry --- docs/editor-neovim.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 6cff4d3c..3ab1393e 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -16,7 +16,7 @@ Air can be configured as a Language Server Protocol (LSP) server via [nvim-lspco ## LSP Configuration with nvim-lspconfig -To configure Air's language server, add the following to your config: +To configure the client side to use Air's language server, add the following to your config: ```lua require("lspconfig").air.setup({}) From 4705d77bbd76bd30c844296eb0778be0b1ff3347 Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Fri, 28 Feb 2025 06:46:01 -0500 Subject: [PATCH 11/17] Update docs/editor-neovim.qmd Co-authored-by: Lionel Henry --- docs/editor-neovim.qmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 3ab1393e..8b587ff5 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -22,6 +22,8 @@ To configure the client side to use Air's language server, add the following to require("lspconfig").air.setup({}) ``` +This is the recommended way to use Air. While the language server currently only supports formatting, it will gain more features in future. + To format files with Air on save, add the following to your configuration: ```lua From 810dfe02ccae329407b57622748411d272041803 Mon Sep 17 00:00:00 2001 From: Philippe Massicotte Date: Fri, 28 Feb 2025 07:36:44 -0500 Subject: [PATCH 12/17] docs(editor-neovim): update LSP configuration to auto-format R code on save and disable conflicting formatter --- docs/editor-neovim.qmd | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 8b587ff5..ca5707ce 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -16,25 +16,30 @@ Air can be configured as a Language Server Protocol (LSP) server via [nvim-lspco ## LSP Configuration with nvim-lspconfig -To configure the client side to use Air's language server, add the following to your config: +To configure the client side to use Air's language server, add the following to your configuration. This ensures that Air automatically formats R code when you save a file: ```lua -require("lspconfig").air.setup({}) +require("lspconfig").air.setup({ + on_attach = function(_, bufnr) + vim.api.nvim_create_autocmd("BufWritePre", { + buffer = bufnr, + callback = function() + vim.lsp.buf.format() + end, + }) + end, +}) ``` This is the recommended way to use Air. While the language server currently only supports formatting, it will gain more features in future. -To format files with Air on save, add the following to your configuration: +If both `Air` and `languageserver` are installed, you can use the following configuration to disable languageserver formatting, ensuring that only Air handles formatting: ```lua -vim.api.nvim_create_autocmd("BufWritePre", { - pattern = { "*.R", "*.r" }, - callback = function() - vim.lsp.buf.format({ - filter = function(client) - return client.name == "air" - end, - }) +require("lspconfig").r_language_server.setup({ + on_attach = function(client, _) + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false end, }) ``` From 2c167cf887f2d97822ecd859d187a851b9c04002 Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Mon, 3 Mar 2025 16:40:42 -0500 Subject: [PATCH 13/17] Let Visual Editor do its thing --- docs/editor-neovim.qmd | 19 ++++++++++++------- docs/editors.qmd | 8 ++++---- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index ca5707ce..99168cba 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -8,7 +8,8 @@ editor: # Installing the Air server -First, install Air by following the instructions on the [Air CLI documentation](https://posit-dev.github.io/air/cli.html). The CLI binary bundles the Air server as well as a command line formatting tool. +First, install Air by following the instructions on the [Air CLI documentation](https://posit-dev.github.io/air/cli.html). +The CLI binary bundles the Air server as well as a command line formatting tool. # Configuration @@ -16,9 +17,10 @@ Air can be configured as a Language Server Protocol (LSP) server via [nvim-lspco ## LSP Configuration with nvim-lspconfig -To configure the client side to use Air's language server, add the following to your configuration. This ensures that Air automatically formats R code when you save a file: +To configure the client side to use Air's language server, add the following to your configuration. +This ensures that Air automatically formats R code when you save a file: -```lua +``` lua require("lspconfig").air.setup({ on_attach = function(_, bufnr) vim.api.nvim_create_autocmd("BufWritePre", { @@ -31,11 +33,12 @@ require("lspconfig").air.setup({ }) ``` -This is the recommended way to use Air. While the language server currently only supports formatting, it will gain more features in future. +This is the recommended way to use Air. +While the language server currently only supports formatting, it will gain more features in future. If both `Air` and `languageserver` are installed, you can use the following configuration to disable languageserver formatting, ensuring that only Air handles formatting: -```lua +``` lua require("lspconfig").r_language_server.setup({ on_attach = function(client, _) client.server_capabilities.documentFormattingProvider = false @@ -46,9 +49,11 @@ require("lspconfig").r_language_server.setup({ ## conform.nvim configuration -Air can be configured as a formatter plugin via [conform.nvim](https://github.com/stevearc/conform.nvim). This allows you to format R code with Air inside code chunks in Quarto and RMarkdown documents. It can be configured by adding the following to your `nvim/lua/plugins/conform.lua`: +Air can be configured as a formatter plugin via [conform.nvim](https://github.com/stevearc/conform.nvim). +This allows you to format R code with Air inside code chunks in Quarto and RMarkdown documents. +It can be configured by adding the following to your `nvim/lua/plugins/conform.lua`: -```lua +``` lua require("conform").setup({ formatters_by_ft = { r = { "air" }, diff --git a/docs/editors.qmd b/docs/editors.qmd index 4fc132dd..d02963f9 100644 --- a/docs/editors.qmd +++ b/docs/editors.qmd @@ -11,10 +11,10 @@ Many do, including [Positron](https://positron.posit.co/), [VS Code](https://cod Air also provides some support for code editors that allow for external formatters, such as [RStudio](https://posit.co/products/open-source/rstudio/). Follow one of our editor specific guides to get set up with Air in your preferred editor: -- [VS Code](editor-vscode.qmd) +- [VS Code](editor-vscode.qmd) -- [Positron](editor-vscode.qmd) +- [Positron](editor-vscode.qmd) -- [RStudio](editor-rstudio.qmd) +- [RStudio](editor-rstudio.qmd) -- [neovim](editor-neovim.qmd) +- [neovim](editor-neovim.qmd) From 9a341b4b983ca677d08bc037a9cb644ae82ad9b8 Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Mon, 3 Mar 2025 17:10:34 -0500 Subject: [PATCH 14/17] Add to sidebar --- docs/_quarto.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_quarto.yml b/docs/_quarto.yml index 1e232ae6..681ce7a0 100644 --- a/docs/_quarto.yml +++ b/docs/_quarto.yml @@ -24,6 +24,7 @@ website: contents: - editor-rstudio.qmd - editor-vscode.qmd + - editor-neovim.qmd - text: "Configuration" href: configuration.qmd From c204d7271f4e76af920e0042c5120072318d0284 Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Mon, 3 Mar 2025 17:10:41 -0500 Subject: [PATCH 15/17] Capitalization --- docs/editors.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editors.qmd b/docs/editors.qmd index d02963f9..c553ad53 100644 --- a/docs/editors.qmd +++ b/docs/editors.qmd @@ -17,4 +17,4 @@ Follow one of our editor specific guides to get set up with Air in your preferre - [RStudio](editor-rstudio.qmd) -- [neovim](editor-neovim.qmd) +- [Neovim](editor-neovim.qmd) From cd1e96f8536f11c6e15137bd9b819c2829002584 Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Mon, 3 Mar 2025 17:11:22 -0500 Subject: [PATCH 16/17] Align with format of other `editor-` guides --- docs/editor-neovim.qmd | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 99168cba..221dac2e 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -6,19 +6,15 @@ editor: canonical: true --- -# Installing the Air server +Air provides first class support for Neovim, which supports the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/). -First, install Air by following the instructions on the [Air CLI documentation](https://posit-dev.github.io/air/cli.html). -The CLI binary bundles the Air server as well as a command line formatting tool. +# Installation -# Configuration +First, install the Air [command line tool](cli.qmd). -Air can be configured as a Language Server Protocol (LSP) server via [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) or as a formatter plugin via [conform.nvim](https://github.com/stevearc/conform.nvim). - -## LSP Configuration with nvim-lspconfig - -To configure the client side to use Air's language server, add the following to your configuration. -This ensures that Air automatically formats R code when you save a file: +We recommend configuring Air as an LSP server via [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). +While the Air language server currently only supports formatting, it will gain more features in future. +Add the following to your `init.lua`: ``` lua require("lspconfig").air.setup({ @@ -33,10 +29,11 @@ require("lspconfig").air.setup({ }) ``` -This is the recommended way to use Air. -While the language server currently only supports formatting, it will gain more features in future. +This ensures that Air automatically formats R code when you save a file. -If both `Air` and `languageserver` are installed, you can use the following configuration to disable languageserver formatting, ensuring that only Air handles formatting: +## languageserver + +If both Air and `languageserver` are installed, you can use the following configuration to disable `languageserver` formatting, ensuring that only Air handles formatting: ``` lua require("lspconfig").r_language_server.setup({ @@ -47,11 +44,19 @@ require("lspconfig").r_language_server.setup({ }) ``` -## conform.nvim configuration +# Features + +## Format on save + +With the `BufWritePre` hook recommended in the configuration step, Air will format your R files on every save. + + + +## Quarto -Air can be configured as a formatter plugin via [conform.nvim](https://github.com/stevearc/conform.nvim). -This allows you to format R code with Air inside code chunks in Quarto and RMarkdown documents. -It can be configured by adding the following to your `nvim/lua/plugins/conform.lua`: +As an LSP, Air itself does not provide direct support for Quarto or RMarkdown documents. +However, Air can additionally be configured as a formatter plugin for [conform.nvim](https://github.com/stevearc/conform.nvim), which supports ["injected language formatting"](https://github.com/stevearc/conform.nvim/blob/master/doc/advanced_topics.md#injected-language-formatting-code-blocks) for code blocks in Markdown, Quarto, and RMarkdown. +Conform can be configured by adding the following to your `nvim/lua/plugins/conform.lua`: ``` lua require("conform").setup({ From 3e05ef28bded64068281252d8ab806b485e5537a Mon Sep 17 00:00:00 2001 From: Davis Vaughan Date: Mon, 3 Mar 2025 17:14:23 -0500 Subject: [PATCH 17/17] Tweak --- docs/editor-neovim.qmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editor-neovim.qmd b/docs/editor-neovim.qmd index 221dac2e..35da6308 100644 --- a/docs/editor-neovim.qmd +++ b/docs/editor-neovim.qmd @@ -29,7 +29,7 @@ require("lspconfig").air.setup({ }) ``` -This ensures that Air automatically formats R code when you save a file. +While not required, the `BufWritePre` command ensures that Air automatically formats your R code when you save a file. ## languageserver