fix: Respect nvim user config option
This commit is contained in:
committed by
Hunter Halloran
parent
1c71bf099e
commit
3b0c147b3f
@@ -73,7 +73,7 @@ in
|
||||
zsh
|
||||
git
|
||||
oh-my-posh
|
||||
inputs.lazyvim-nixvim.packages.${stdenv.hostPlatform.system}.nvim
|
||||
# inputs.lazyvim-nixvim.packages.${stdenv.hostPlatform.system}.nvim
|
||||
inputs.agenix.packages.${stdenv.hostPlatform.system}.default
|
||||
];
|
||||
}
|
||||
|
||||
24
sw/nvim.nix
24
sw/nvim.nix
@@ -1,4 +1,19 @@
|
||||
{ pkgs, ... }:
|
||||
{ user }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
nvimPackages =
|
||||
if user.useNvimPlugins then
|
||||
[
|
||||
inputs.lazyvim-nixvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim
|
||||
]
|
||||
else
|
||||
[ pkgs.neovim ];
|
||||
in
|
||||
{
|
||||
# ============================================================================
|
||||
# Neovim Configuration
|
||||
@@ -6,8 +21,10 @@
|
||||
# This module configures Neovim, specifically setting up TreeSitter parsers
|
||||
# to ensure syntax highlighting works correctly.
|
||||
|
||||
home.packages = nvimPackages;
|
||||
|
||||
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
|
||||
xdg.configFile."nvim/parser".source =
|
||||
xdg.configFile."nvim/parser".source = lib.mkIf user.useNvimPlugins (
|
||||
let
|
||||
parsers = pkgs.symlinkJoin {
|
||||
name = "treesitter-parsers";
|
||||
@@ -20,5 +37,6 @@
|
||||
)).dependencies;
|
||||
};
|
||||
in
|
||||
"${parsers}/parser";
|
||||
"${parsers}/parser"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user