Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/manual/release-notes/rl-0.9.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
# Release 0.9 {#sec-release-0-9}

## Breaking changes

- Nixpkgs merged a full and incompatible rewrite of vimPlugins.nvim-treesitter.
The changes affected how grammars are built and it caused issues when neovim
attempted to load languages and could not find files in expected locations.

## Changelog {#sec-release-0-9-changelog}

[suimong](https://github.com/suimong):

- Fix `vim.tabline.nvimBufferline` where `setupOpts.options.hover` requires
`vim.opt.mousemoveevent` to be set.

[thamenato](https://github.com/thamenato):

- Attempt to adapt nvim-treesitter to (breaking) Nixpkgs changes. Some treesitte grammars
were changed to prefer `grammarPlugins` over `builtGrammars`.

[jfeo](https://github.com/jfeo):

[ccc.nvim]: https://github.com/uga-rosa/ccc.nvim
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/types/languages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

mkGrammarOption = pkgs: grammar:
mkPackageOption pkgs ["${grammar} treesitter"] {
default = ["vimPlugins" "nvim-treesitter" "builtGrammars" grammar];
default = ["vimPlugins" "nvim-treesitter" "grammarPlugins" grammar];
};
in {
inherit diagnostics diagnosticSubmodule mkGrammarOption;
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/languages/csharp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ in {

treesitter = {
enable = mkEnableOption "C# treesitter" // {default = config.vim.languages.enableTreesitter;};
package = mkGrammarOption pkgs "c-sharp";
package = mkGrammarOption pkgs "c_sharp";
};

lsp = {
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/languages/markdown.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ in {
description = "Enable Markdown treesitter";
};
mdPackage = mkGrammarOption pkgs "markdown";
mdInlinePackage = mkGrammarOption pkgs "markdown-inline";
mdInlinePackage = mkGrammarOption pkgs "markdown_inline";
};

lsp = {
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/languages/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ in {
package = mkOption {
description = "Python treesitter grammar to use";
type = package;
default = pkgs.vimPlugins.nvim-treesitter.builtGrammars.python;
default = pkgs.vimPlugins.nvim-treesitter.grammarPlugins.python;
};
};

Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/languages/sql.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ in {

package = mkOption {
type = package;
default = pkgs.vimPlugins.nvim-treesitter.builtGrammars.sql;
default = pkgs.vimPlugins.nvim-treesitter.grammarPlugins.sql;
description = "SQL treesitter grammar to use";
};
};
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/notes/orgmode/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ in {

pluginRC.orgmode = entryAnywhere ''
-- Treesitter configuration
require('nvim-treesitter.configs').setup {
require('nvim-treesitter.config').setup {

-- If TS highlights are not enabled at all, or disabled via `disable` prop,
-- highlighting will fallback to default Vim syntax highlighting
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/treesitter/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ in {
'');

pluginRC.treesitter = entryAfter ["basic"] ''
require('nvim-treesitter.configs').setup {
require('nvim-treesitter.config').setup {
-- Disable imperative treesitter options that would attempt to fetch
-- grammars into the read-only Nix store. To add additional grammars here
-- you must use the `config.vim.treesitter.grammars` option.
Expand Down
6 changes: 3 additions & 3 deletions modules/plugins/treesitter/treesitter.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ in {
type = listOf package;
default = [];
example = literalExpression ''
with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [
with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [
regex
kdl
];
'';
description = ''
List of treesitter grammars to install. For grammars to be installed properly,
you must use grammars from `pkgs.vimPlugins.nvim-treesitter.builtGrammars`.
you must use grammars from `pkgs.vimPlugins.nvim-treesitter.grammarPlugins`.
You can use `pkgs.vimPlugins.nvim-treesitter.allGrammars` to install all grammars.

For languages already supported by nvf, you may use
Expand All @@ -56,7 +56,7 @@ in {
internal = true;
readOnly = true;
type = listOf package;
default = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [c lua vim vimdoc query];
default = with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [c lua vim vimdoc query];
description = ''
A list of treesitter grammars that will be installed by default
if treesitter has been enabled and {option}`vim.treeesitter.addDefaultGrammars`
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/treesitter/ts-textobjects/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ in {

# set up treesitter-textobjects after Treesitter, whose config we're adding to.
pluginRC.treesitter-textobjects = entryAfter ["treesitter"] ''
require("nvim-treesitter.configs").setup({textobjects = ${toLuaObject cfg.setupOpts}})
require("nvim-treesitter.config").setup({textobjects = ${toLuaObject cfg.setupOpts}})
'';
};
};
Expand Down
2 changes: 1 addition & 1 deletion modules/plugins/ui/noice/config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
cfg = config.vim.ui.noice;
tscfg = config.vim.treesitter;

defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars; [vim regex lua bash markdown];
defaultGrammars = with pkgs.vimPlugins.nvim-treesitter.grammarPlugins; [vim regex lua bash markdown];
in {
config = mkIf cfg.enable {
vim = {
Expand Down
Loading