Skip to content

Commit

Permalink
chore(build): auto-generate vimdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 9, 2023
1 parent ac9bafe commit 6c19600
Showing 1 changed file with 55 additions and 97 deletions.
152 changes: 55 additions & 97 deletions doc/quarto.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
*quarto.txt* For Neovim >= 0.8.0 Last change: 2023 April 04
*quarto.txt* For Neovim >= 0.8.0 Last change: 2023 April 09

==============================================================================
Table of Contents *quarto-table-of-contents*

1. quarto-nvim |quarto-quarto-nvim|
- Setup |quarto-quarto-nvim-setup|
- Usage |quarto-quarto-nvim-usage|
- Configure |quarto-quarto-nvim-configure|
- Language support |quarto-quarto-nvim-language-support|
- Available Commnds |quarto-quarto-nvim-available-commnds|
- Recommended Plugins |quarto-quarto-nvim-recommended-plugins|
Expand All @@ -15,129 +14,70 @@ Table of Contents *quarto-table-of-contents*
1. quarto-nvim *quarto-quarto-nvim*

Quarto-nvim provides tools for working on quarto <https://quarto.org/>
manuscripts in neovim.
manuscripts in Neovim.

**Note**Some functionality has been refactored into its own library otter.nvim
<https://github.com/jmbuhr/otter.nvim> for better extensibility.
Quarto-nvim requires Neovim >= **v0.9.0**
(https://github.com/neovim/neovim/releases/tag/stable).


SETUP *quarto-quarto-nvim-setup*

Install the plugin from GitHub with your favourite neovim plugin manager. With
example configuration:
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`).

PACKER.NVIM ~
As such, we recommend you 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.

>lua
use { 'quarto-dev/quarto-nvim',
requires = {
'jmbuhr/otter.nvim',
'hrsh7th/nvim-cmp',
'neovim/nvim-lspconfig',
'nvim-treesitter/nvim-treesitter'
},
config = function()
require 'quarto'.setup {
lspFeatures = {
enabled = true,
languages = { 'r', 'python', 'julia' },
diagnostics = {
enabled = true,
triggers = { "BufWrite" }
},
completion = {
enabled = true
}
}
}
end
}
<


LAZY.NVIM ~
Plugins and their configuration to look out for in this file are:

>lua
{ 'quarto-dev/quarto-nvim',
dependencies = {
'jmbuhr/otter.nvim',
'hrsh7th/nvim-cmp',
'neovim/nvim-lspconfig',
'nvim-treesitter/nvim-treesitter'
},
config = function()
require 'quarto'.setup {
lspFeatures = {
enabled = true,
languages = { 'r', 'python', 'julia' },
diagnostics = {
enabled = true,
triggers = { "BufWrite" }
},
completion = {
enabled = true
}
}
}
end
},
<


VIM-PLUG ~

>vim
Plug 'quarto-dev/quarto-nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'jmbuhr/otter.nvim'
Plug 'hrsh7th/nvim-cmp'
Plug 'nvim-treesitter/nvim-treesitter'
{
'quarto-dev/quarto-nvim',
'jmbuhr/otter.nvim',
'hrsh7th/nvim-cmp',
'neovim/nvim-lspconfig',
'nvim-treesitter/nvim-treesitter'
}
<


USAGE *quarto-quarto-nvim-usage*


PREVIEW ~

Use the command

>vim
QuartoPreview
<

or access the function from lua, e.g. to create a keybinding:

>lua
local quarto = require'quarto'
vim.keymap.set('n', '<leader>qp', quarto.quartoPreview, {silent = true, noremap = true})
<

Then use the keyboard shortcut to open `quarto preview` for the current file or
project in the active working directory in the neovim integrated terminal in a
new tab.

CONFIGURE ~

CONFIGURE *quarto-quarto-nvim-configure*
You can pass a lua table with options to the setup function as shown in
quarto-nvim-kickstarter/..quarto.lua
<https://github.com/jmbuhr/quarto-nvim-kickstarter/blob/main/lua/plugins/quarto.lua>

You can pass a lua table with options to the setup function. It will be merged
with the default options, which are shown below in the example:
It will be merged with the default options, which are shown below in the
example. If you want to use the defaults, simply call `setup` without arguments
or with an empty table.

>lua
require'quarto'.setup{
debug = false,
closePreviewOnExit = true,
lspFeatures = {
enabled = false,
languages = { 'r', 'python', 'julia' },
enabled = true,
languages = { 'r', 'python', 'julia', 'bash' },
chunks = 'curly', -- 'curly' or 'all'
diagnostics = {
enabled = true,
triggers = { "BufWrite" }
triggers = { "BufWritePost" }
},
completion = {
enabled = false,
enabled = true,
},
},
keymap = {
Expand All @@ -147,7 +87,25 @@ with the default options, which are shown below in the example:
}
<

If you only need `QuartoPreview`, you don’t have to call the setup function.

PREVIEW ~

Use the command

>vim
QuartoPreview
<

or access the function from lua, e.g. to create a keybinding:

>lua
local quarto = require'quarto'
vim.keymap.set('n', '<leader>qp', quarto.quartoPreview, {silent = true, noremap = true})
<

Then use the keyboard shortcut to open `quarto preview` for the current file or
project in the active working directory in the neovim integrated terminal in a
new tab.


LANGUAGE SUPPORT *quarto-quarto-nvim-language-support*
Expand Down

0 comments on commit 6c19600

Please sign in to comment.