diff --git a/CHANGELOG.md b/CHANGELOG.md index 562ab0a..9028ca8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.0.2](https://github.com/quarto-dev/quarto-nvim/compare/v1.0.1...v1.0.2) (2024-10-09) + + +### Bug Fixes + +* register markdown grammar for quarto and rmd until our own grammar is ready (https://github.com/jmbuhr/tree-sitter-pandoc-markdown) refs https://github.com/jmbuhr/otter.nvim/issues/179 ([1d10f13](https://github.com/quarto-dev/quarto-nvim/commit/1d10f135937613ca71a84975fe75b5b76a35065e)) + ## [1.0.1](https://github.com/quarto-dev/quarto-nvim/compare/v1.0.0...v1.0.1) (2024-06-30) diff --git a/README.md b/README.md index 7f4b95f..b50b166 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,26 @@ The playlist is extened as more features are added, so join us for a "Coffee wit ## Setup 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). +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, we recommend to experiment with the [quarto-nvim kickstarter configuration](https://github.com/jmbuhr/quarto-nvim-kickstarter) +Example `lazy.nvim` plugin specification: + +```lua +-- plugins/quarto.lua +return { + { + "quarto-dev/quarto-nvim", + dependencies = { + "jmbuhr/otter.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }, +} +``` + +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. @@ -32,21 +49,7 @@ Plugins and their configuration to look out for in either of those files are: } ``` -Quarto-nvim requires Neovim >= **v0.9.0** (). -If you are unable to update Neovim, you can specify a specific version of the plugins -involved instead of the latest stable version. -How you do this will vary depending on your plugin manager, but you can see one example using `lazy.nvim` here: - - -The `version = ...` lines to look out for are for the following plugins: - -```lua -{ - 'quarto-dev/quarto-nvim', - 'jmbuhr/otter.nvim', - 'nvim-treesitter/nvim-treesitter' -} -``` +Quarto-nvim requires the latest [Neovim stable version](https://github.com/neovim/neovim/releases/tag/stable) (>= `v0.10.0`). ## Usage diff --git a/doc/quarto.txt b/doc/quarto.txt index b2ce427..e7afeec 100644 --- a/doc/quarto.txt +++ b/doc/quarto.txt @@ -1,4 +1,4 @@ -*quarto.txt* For Neovim >= 0.8.0 Last change: 2024 June 30 +*quarto.txt* For Neovim >= 0.8.0 Last change: 2024 October 09 ============================================================================== Table of Contents *quarto-table-of-contents* @@ -36,6 +36,21 @@ manager like lazy.nvim , packer.nvim or VimPlug . +Example `lazy.nvim` plugin specification: + +>lua + -- plugins/quarto.lua + return { + { + "quarto-dev/quarto-nvim", + dependencies = { + "jmbuhr/otter.nvim", + "nvim-treesitter/nvim-treesitter", + }, + }, + } +< + Because Quarto provides a lot of functionality through integration with existing plugins, we recommend to experiment with the quarto-nvim kickstarter configuration and then pick @@ -55,22 +70,8 @@ Plugins and their configuration to look out for in either of those files are: } < -Quarto-nvim requires Neovim >= **v0.9.0** -(). If you are unable to -update Neovim, you can specify a specific version of the plugins involved -instead of the latest stable version. How you do this will vary depending on -your plugin manager, but you can see one example using `lazy.nvim` here: - - -The `version = ...` lines to look out for are for the following plugins: - ->lua - { - 'quarto-dev/quarto-nvim', - 'jmbuhr/otter.nvim', - 'nvim-treesitter/nvim-treesitter' - } -< +Quarto-nvim requires the latest Neovim stable version + (>= `v0.10.0`). USAGE *quarto-quarto-nvim-usage* diff --git a/ftplugin/quarto.lua b/ftplugin/quarto.lua index 9241a81..4cd21f3 100644 --- a/ftplugin/quarto.lua +++ b/ftplugin/quarto.lua @@ -1,5 +1,9 @@ vim.b.slime_cell_delimiter = '```' +-- TODO: Workaround while nvim-treesitter doesn't link those anymore +-- until our ouwn pandoc grammar is ready +vim.treesitter.language.register("markdown", { "quarto", "rmd" }) + local config = require('quarto.config').config local quarto = require 'quarto' diff --git a/lua/quarto/config.lua b/lua/quarto/config.lua index ece984c..c58c70f 100644 --- a/lua/quarto/config.lua +++ b/lua/quarto/config.lua @@ -6,7 +6,7 @@ M.defaultConfig = { lspFeatures = { enabled = true, chunks = 'curly', - languages = { 'r', 'python', 'julia', 'bash', 'html' }, + languages = nil, -- nil means all languages found in the document diagnostics = { enabled = true, triggers = { 'BufWritePost' }, @@ -16,8 +16,8 @@ M.defaultConfig = { }, }, codeRunner = { - enabled = false, - default_method = nil, -- "molten" or "slime" + enabled = true, + default_method = "slime", -- "molten" or "slime" ft_runners = {}, -- filetype to runner, ie. `{ python = "molten" }`. -- Takes precedence over `default_method` never_run = { 'yaml' }, -- filetypes which are never sent to a code runner