mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-17 07:43:21 +00:00
Compare commits
4 commits
bbc99da250
...
8692d195c4
| Author | SHA1 | Date | |
|---|---|---|---|
|
8692d195c4 |
|||
|
b75bd3b8a8 |
|||
|
4604bcd984 |
|||
|
f5c5ea9211 |
2 changed files with 11 additions and 8 deletions
|
|
@ -39,7 +39,8 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# For some reason treesitter highlighting does not work on start if this is set before syntax on
|
# For some reason treesitter highlighting does not work on start if this
|
||||||
|
# is set before 'syntax on' or similar.
|
||||||
pluginRC.treesitter-fold = mkIf cfg.fold (entryBefore ["basic"] ''
|
pluginRC.treesitter-fold = mkIf cfg.fold (entryBefore ["basic"] ''
|
||||||
-- This is required by treesitter-context to handle folds
|
-- This is required by treesitter-context to handle folds
|
||||||
vim.o.foldmethod = "expr"
|
vim.o.foldmethod = "expr"
|
||||||
|
|
@ -54,8 +55,8 @@ in {
|
||||||
pluginRC.treesitter = entryAfter ["basic"] ''
|
pluginRC.treesitter = entryAfter ["basic"] ''
|
||||||
require('nvim-treesitter.config').setup {
|
require('nvim-treesitter.config').setup {
|
||||||
-- Disable imperative treesitter options that would attempt to fetch
|
-- Disable imperative treesitter options that would attempt to fetch
|
||||||
-- grammars into the read-only Nix store. To add additional grammars here
|
-- grammars into the read-only Nix store. To add additional grammars
|
||||||
-- you must use the `config.vim.treesitter.grammars` option.
|
-- here, you must use the `config.vim.treesitter.grammars` option.
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
ensure_installed = {},
|
ensure_installed = {},
|
||||||
|
|
@ -74,9 +75,8 @@ in {
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Indentation module for Treesitter
|
-- Indentation module for Treesitter
|
||||||
-- Keymaps are set to false here as they are
|
-- Keymaps are set to false here as they are handled by `vim.maps`
|
||||||
-- handled by `vim.maps` entries calling lua
|
-- entries calling Lua functions achieving the same functionality.
|
||||||
-- functions achieving the same functionality.
|
|
||||||
incremental_selection = {
|
incremental_selection = {
|
||||||
enable = ${toLuaObject cfg.incrementalSelection.enable},
|
enable = ${toLuaObject cfg.incrementalSelection.enable},
|
||||||
disable = ${toLuaObject cfg.incrementalSelection.disable},
|
disable = ${toLuaObject cfg.incrementalSelection.disable},
|
||||||
|
|
@ -85,7 +85,6 @@ in {
|
||||||
node_incremental = false,
|
node_incremental = false,
|
||||||
scope_incremental = false,
|
scope_incremental = false,
|
||||||
node_decremental = false,
|
node_decremental = false,
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,11 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
# Build a given Treesitter grammar.
|
# Build a given Treesitter grammar.
|
||||||
buildTreesitterPlug = grammars: vimPlugins.nvim-treesitter.withPlugins (_: grammars);
|
buildTreesitterPlug = grammars:
|
||||||
|
vimPlugins.nvim-treesitter.withPlugins (_: grammars)
|
||||||
|
// {
|
||||||
|
installQueries = true;
|
||||||
|
};
|
||||||
|
|
||||||
pluginBuilders = {
|
pluginBuilders = {
|
||||||
nvim-treesitter = buildTreesitterPlug config.vim.treesitter.grammars;
|
nvim-treesitter = buildTreesitterPlug config.vim.treesitter.grammars;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue