treesitter: remove redundant code

This commit is contained in:
Ching Pei Yang 2024-11-03 19:00:51 +01:00
parent d3ff60bd4c
commit 6ef34511b1
No known key found for this signature in database
GPG key ID: B3841364253DC4C8

View file

@ -11,7 +11,6 @@
inherit (lib.nvim.dag) entryBefore entryAfter;
cfg = config.vim.treesitter;
usingNvimCmp = config.vim.autocomplete.nvim-cmp.enable;
self = import ./treesitter.nix {inherit pkgs lib;};
mappingDefinitions = self.options.vim.treesitter.mappings;
@ -21,17 +20,6 @@ in {
vim = {
startPlugins = ["nvim-treesitter"];
lazy.plugins = {
cmp-treesitter = mkIf usingNvimCmp {
package = "cmp-treesitter";
after = ''
local path = vim.fn.globpath(vim.o.packpath, 'pack/*/opt/cmp-treesitter')
require("rtp_nvim").source_after_plugin_dir(path)
'';
};
nvim-cmp.after = mkIf usingNvimCmp "require('lz.n').trigger_load('cmp-treesitter')";
};
autocomplete.nvim-cmp = {
sources = {treesitter = "[Treesitter]";};
sourcePlugins = ["cmp-treesitter"];