From f7331462fa52dd6668bcfc55db29580403c2de79 Mon Sep 17 00:00:00 2001 From: Jannik Buhr <17450586+jmbuhr@users.noreply.github.com> Date: Sun, 30 Jun 2024 08:47:53 +0200 Subject: [PATCH 1/6] Update README.md --- README.md | 46 ++++++++++------------------------------------ 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 981aef4..28f7525 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,7 @@ The playlist is extened as more features are added, so join us for a "Coffee wit You can install `quarto-nvim` from GitHub with your favourite Neovim plugin manager like [lazy.nvim](https://github.com/folke/lazy.nvim), [packer.nvim](https://github.com/wbthomason/packer.nvim) or [VimPlug](https://github.com/junegunn/vim-plug). -Because Quarto provides a lot of functionality through integration with existing plugins, -some of those have to be told about the existence of `quarto-nvim` (like e.g. registering -it as a source for the autocompletion plugin `nvim-cmp`). - -As such, we recommend you to experiment with the [quarto-nvim kickstarter configuration](https://github.com/jmbuhr/quarto-nvim-kickstarter) +Because Quarto provides a lot of functionality through integration with existing plugins, we recommend to experiment with the [quarto-nvim kickstarter configuration](https://github.com/jmbuhr/quarto-nvim-kickstarter) and then pick the relevant parts from the [`lua/plugins/quarto.lua`](https://github.com/jmbuhr/quarto-nvim-kickstarter/blob/main/lua/plugins/quarto.lua) file to integrate it into your own existing configuration. @@ -85,16 +81,6 @@ require('quarto').setup{ -- Takes precedence over `default_method` never_run = { "yaml" }, -- filetypes which are never sent to a code runner }, - keymap = { - -- set whole section or individual keys to `false` to disable - hover = "K", - definition = "gd", - type_definition = "gD", - rename = "lR", - format = "lf", - references = "gr", - document_symbols = "gS", - } } ``` @@ -121,28 +107,18 @@ other features strictly require it. ## Language support +`quarto-nvim` automatically activates `otter.nvim` for quarto files if language features are enabled. + ### Demo https://user-images.githubusercontent.com/17450586/209436101-4dd560f4-c876-4dbc-a0f4-b3a2cbff0748.mp4 ### Usage -With the language features enabled, you can open the hover documentation -for R, python and julia code chunks with `K` (or configure a different shortcut). -You can got-to-definition with `gd`. +Uou can open the hover documentation for R, python and julia code chunks with `K`, got-to-definition with `gd` etc. +and get autocompletion via the lsp source for your completion plugin. -### Autocompletion - -`quarto-nvim` now comes with a completion source for [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) to deliver swift autocompletion for code in quarto code chunks. -With the quarto language features enabled, you can add the source in your `cmp` configuration: - -```lua --- ... - sources = { - { name = 'otter' }, - } --- ... -``` +A list of currently available language server requests can be found in the [otter.nvim documentation(https://github.com/jmbuhr/otter.nvim?tab=readme-ov-file#lsp-methods-currently-implemented). ### R diagnostics configuration @@ -201,6 +177,7 @@ current cell. Here are some example run mappings: + ```lua local runner = require("quarto.runner") vim.keymap.set("n", "rc", runner.run_cell, { desc = "run cell", silent = true }) @@ -232,11 +209,8 @@ QuartoSendLine ## Recommended Plugins -Quarto works great with a number of existing plugins in the neovim ecosystem. -You can find semi-opinionated but still minimal -configurations for `nvim` and `tmux`, -for use with Quarto, R and python in these two repositories: +Quarto works great with a number of plugins in the neovim ecosystem. +You can find my personal (and thus up-to-date) configuration for use with Quarto, R and python here: -- -- + From f932e1354d40e4280324766d8ad006040ab1381e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 30 Jun 2024 06:48:26 +0000 Subject: [PATCH 2/6] chore(build): auto-generate vimdoc --- doc/quarto.txt | 54 ++++++++++++++------------------------------------ 1 file changed, 15 insertions(+), 39 deletions(-) diff --git a/doc/quarto.txt b/doc/quarto.txt index a4a8036..ec27196 100644 --- a/doc/quarto.txt +++ b/doc/quarto.txt @@ -1,4 +1,4 @@ -*quarto.txt* For Neovim >= 0.8.0 Last change: 2024 June 29 +*quarto.txt* For Neovim >= 0.8.0 Last change: 2024 June 30 ============================================================================== Table of Contents *quarto-table-of-contents* @@ -37,11 +37,7 @@ manager like lazy.nvim , packer.nvim . Because Quarto provides a lot of functionality through integration with -existing plugins, some of those have to be told about the existence of -`quarto-nvim` (like e.g. registering it as a source for the autocompletion -plugin `nvim-cmp`). - -As such, we recommend you to experiment with the quarto-nvim kickstarter +existing plugins, we recommend to experiment with the quarto-nvim kickstarter configuration and then pick the relevant parts from the `lua/plugins/quarto.lua` @@ -113,16 +109,6 @@ or with an empty table. -- Takes precedence over `default_method` never_run = { "yaml" }, -- filetypes which are never sent to a code runner }, - keymap = { - -- set whole section or individual keys to `false` to disable - hover = "K", - definition = "gd", - type_definition = "gD", - rename = "lR", - format = "lf", - references = "gr", - document_symbols = "gS", - } } < @@ -153,6 +139,9 @@ Note: While you can use `QuartoPreview` without configuring the plugin via LANGUAGE SUPPORT *quarto-quarto-nvim-language-support* +`quarto-nvim` automatically activates `otter.nvim` for quarto files if language +features are enabled. + DEMO ~ @@ -162,25 +151,13 @@ https://user-images.githubusercontent.com/17450586/209436101-4dd560f4-c876-4dbc- USAGE ~ -With the language features enabled, you can open the hover documentation for R, -python and julia code chunks with `K` (or configure a different shortcut). You -can got-to-definition with `gd`. - - -AUTOCOMPLETION ~ +Uou can open the hover documentation for R, python and julia code chunks with +`K`, got-to-definition with `gd` etc. and get autocompletion via the lsp source +for your completion plugin. -`quarto-nvim` now comes with a completion source for nvim-cmp - to deliver swift autocompletion for code -in quarto code chunks. With the quarto language features enabled, you can add -the source in your `cmp` configuration: - ->lua - -- ... - sources = { - { name = 'otter' }, - } - -- ... -< +A list of currently available language server requests can be found in the +[otter.nvim +documentation(https://github.com/jmbuhr/otter.nvim?tab=readme-ov-file#lsp-methods-currently-implemented). R DIAGNOSTICS CONFIGURATION ~ @@ -278,12 +255,11 @@ AVAILABLE COMMANDS *quarto-quarto-nvim-available-commands* RECOMMENDED PLUGINS *quarto-quarto-nvim-recommended-plugins* -Quarto works great with a number of existing plugins in the neovim ecosystem. -You can find semi-opinionated but still minimal configurations for `nvim` and -`tmux`, for use with Quarto, R and python in these two repositories: +Quarto works great with a number of plugins in the neovim ecosystem. You can +find my personal (and thus up-to-date) configuration for use with Quarto, R and +python here: -- -- + Generated by panvimdoc From 038836019f04eef577fad3b76dcba9cb8c791968 Mon Sep 17 00:00:00 2001 From: Jannik Buhr <17450586+jmbuhr@users.noreply.github.com> Date: Sun, 30 Jun 2024 08:49:35 +0200 Subject: [PATCH 3/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 28f7525..7f4b95f 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ https://user-images.githubusercontent.com/17450586/209436101-4dd560f4-c876-4dbc- Uou can open the hover documentation for R, python and julia code chunks with `K`, got-to-definition with `gd` etc. and get autocompletion via the lsp source for your completion plugin. -A list of currently available language server requests can be found in the [otter.nvim documentation(https://github.com/jmbuhr/otter.nvim?tab=readme-ov-file#lsp-methods-currently-implemented). +A list of currently available language server requests can be found in the [otter.nvim documentation](https://github.com/jmbuhr/otter.nvim?tab=readme-ov-file#lsp-methods-currently-implemented). ### R diagnostics configuration From 5db240a9dadf6751feaa475bfb5d7b3dbeb25ab3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 30 Jun 2024 06:50:10 +0000 Subject: [PATCH 4/6] chore(build): auto-generate vimdoc --- doc/quarto.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/quarto.txt b/doc/quarto.txt index ec27196..b2ce427 100644 --- a/doc/quarto.txt +++ b/doc/quarto.txt @@ -156,8 +156,8 @@ Uou can open the hover documentation for R, python and julia code chunks with for your completion plugin. A list of currently available language server requests can be found in the -[otter.nvim -documentation(https://github.com/jmbuhr/otter.nvim?tab=readme-ov-file#lsp-methods-currently-implemented). +otter.nvim documentation +. R DIAGNOSTICS CONFIGURATION ~ From c87312856469c8aaa30b3097a1280eea58ab1902 Mon Sep 17 00:00:00 2001 From: Jannik Buhr Date: Sun, 30 Jun 2024 23:01:52 +0200 Subject: [PATCH 5/6] fix: use renamed table from otter.nvim. fixes #137. --- lua/quarto/runner/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/quarto/runner/init.lua b/lua/quarto/runner/init.lua index 76f9d14..8cd838e 100644 --- a/lua/quarto/runner/init.lua +++ b/lua/quarto/runner/init.lua @@ -84,12 +84,12 @@ local function run(range, multi_lang) end otterkeeper.sync_raft(buf) - local oa = otterkeeper._otters_attached[buf] + local oa = otterkeeper.rafts[buf] if oa == nil then vim.notify("[Quarto] it seems that the code runner isn't initialized for this buffer.", vim.log.levels.ERROR) return end - local chunks = otterkeeper._otters_attached[buf].code_chunks + local chunks = otterkeeper.rafts[buf].code_chunks local filtered = extract_code_cells_in_range(lang, chunks, range) From 09fabb62d414e56ee3245c558aaedbdc662b6493 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 30 Jun 2024 23:37:01 +0200 Subject: [PATCH 6/6] chore(main): release 1.0.1 (#138) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 919beaa..562ab0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.1](https://github.com/quarto-dev/quarto-nvim/compare/v1.0.0...v1.0.1) (2024-06-30) + + +### Bug Fixes + +* use renamed table from otter.nvim. fixes [#137](https://github.com/quarto-dev/quarto-nvim/issues/137). ([c873128](https://github.com/quarto-dev/quarto-nvim/commit/c87312856469c8aaa30b3097a1280eea58ab1902)) + ## [1.0.0](https://github.com/quarto-dev/quarto-nvim/compare/v0.18.2...v1.0.0) (2024-06-29)