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; inherit (lib.nvim.dag) entryBefore entryAfter;
cfg = config.vim.treesitter; cfg = config.vim.treesitter;
usingNvimCmp = config.vim.autocomplete.nvim-cmp.enable;
self = import ./treesitter.nix {inherit pkgs lib;}; self = import ./treesitter.nix {inherit pkgs lib;};
mappingDefinitions = self.options.vim.treesitter.mappings; mappingDefinitions = self.options.vim.treesitter.mappings;
@ -21,17 +20,6 @@ in {
vim = { vim = {
startPlugins = ["nvim-treesitter"]; 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 = { autocomplete.nvim-cmp = {
sources = {treesitter = "[Treesitter]";}; sources = {treesitter = "[Treesitter]";};
sourcePlugins = ["cmp-treesitter"]; sourcePlugins = ["cmp-treesitter"];