feat(nvim): add config options to disable some LSPs
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2025-01-09 09:56:48 -05:00
parent aeae84f66d
commit 5cb0b971cc
6 changed files with 29 additions and 4 deletions

View file

@ -43,6 +43,12 @@
programs.neovim = {
enable = true;
user = "nix-on-droid";
ideConfig = {
enableJava = false;
enableNix= false;
enablePython = false;
};
};
}

View file

@ -19,6 +19,25 @@ in {
user = mkOption {
type = types.str;
};
ideConfig = {
enableBash = mkOption {
type = types.bool;
default = true;
};
enableJava = mkOption {
type = types.bool;
default = true;
};
enableNix = mkOption {
type = types.bool;
default = true;
};
enablePython = mkOption {
type = types.bool;
default = true;
};
};
};
config = mkIf cfg.enable {

View file

@ -8,7 +8,7 @@
cfg = config.programs.neovim;
in {
config = mkIf cfg.enable {
config = mkIf (cfg.enable && cfg.ideConfig.enableBash) {
programs = {
# I love doing typos
bash.shellAliases = {

View file

@ -10,7 +10,7 @@
javaSdk = pkgs.temurin-bin-21;
in {
config = mkIf cfg.enable {
config = mkIf (cfg.enable && cfg.ideConfig.enableJava) {
programs = {
# We keep the packages here because java is a bit complicated
java = {

View file

@ -23,7 +23,7 @@ self: {
then "nixosConfigurations.${hostName}.options"
else "nixOnDroidConfigurations.default";
in {
config = mkIf cfg.enable {
config = mkIf (cfg.enable && cfg.ideConfig.enableNix) {
assertions = [
{
assertion = hasPrefix "${mainHmCfg.home.homeDirectory}/" flakeEnv;

View file

@ -15,7 +15,7 @@
})
++ py.python-lsp-server.optional-dependencies.all;
in {
config = mkIf cfg.enable {
config = mkIf (cfg.enable && cfg.ideConfig.enablePython) {
programs = {
neovim = {
withPython3 = true;