mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-08 19:57:15 +00:00
treesitter: attempt to adapt to (breaking) Nixpkgs changes (#1315)
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
* feat: update from builtGrammars to grammarPlugins * fix: renamed packages * chore: revert back the configs part * wip: try using config * chore: update flake * docs: update release-note --------- Co-authored-by: raf <raf@notashelf.dev>
This commit is contained in:
parent
1bf757685b
commit
e0f6fe7a2a
12 changed files with 26 additions and 15 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ in {
|
|||
description = "Enable Markdown treesitter";
|
||||
};
|
||||
mdPackage = mkGrammarOption pkgs "markdown";
|
||||
mdInlinePackage = mkGrammarOption pkgs "markdown-inline";
|
||||
mdInlinePackage = mkGrammarOption pkgs "markdown_inline";
|
||||
};
|
||||
|
||||
lsp = {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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`
|
||||
|
|
|
|||
|
|
@ -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}})
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue