docs: Update inline docs and make home-manager module exports
This commit is contained in:
committed by
Hunter Halloran
parent
3b0c147b3f
commit
0ffdfdf0d8
19
sw/nvim.nix
19
sw/nvim.nix
@@ -1,3 +1,10 @@
|
||||
# ============================================================================
|
||||
# Neovim Home Manager Configuration
|
||||
# ============================================================================
|
||||
# Provides conditional Neovim configuration based on user preferences.
|
||||
# - If useNvimPlugins=true: Full LazyVim distribution with plugins
|
||||
# - If useNvimPlugins=false: Plain Neovim without plugins
|
||||
|
||||
{ user }:
|
||||
{
|
||||
pkgs,
|
||||
@@ -6,23 +13,19 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
# Choose Neovim package based on user preference
|
||||
nvimPackages =
|
||||
if user.useNvimPlugins then
|
||||
[
|
||||
inputs.lazyvim-nixvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim
|
||||
]
|
||||
[ inputs.lazyvim-nixvim.packages.${pkgs.stdenv.hostPlatform.system}.nvim ]
|
||||
else
|
||||
[ pkgs.neovim ];
|
||||
in
|
||||
{
|
||||
# ============================================================================
|
||||
# Neovim Configuration
|
||||
# ============================================================================
|
||||
# This module configures Neovim, specifically setting up TreeSitter parsers
|
||||
# to ensure syntax highlighting works correctly.
|
||||
|
||||
home.packages = nvimPackages;
|
||||
|
||||
# Configure TreeSitter parsers for syntax highlighting
|
||||
# Only needed when using plugins (LazyVim includes TreeSitter)
|
||||
# https://github.com/nvim-treesitter/nvim-treesitter#i-get-query-error-invalid-node-type-at-position
|
||||
xdg.configFile."nvim/parser".source = lib.mkIf user.useNvimPlugins (
|
||||
let
|
||||
|
||||
Reference in New Issue
Block a user