feat(nvim): add config options to disable some LSPs
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
aeae84f66d
commit
5cb0b971cc
6 changed files with 29 additions and 4 deletions
|
@ -43,6 +43,12 @@
|
|||
programs.neovim = {
|
||||
enable = true;
|
||||
user = "nix-on-droid";
|
||||
|
||||
ideConfig = {
|
||||
enableJava = false;
|
||||
enableNix= false;
|
||||
enablePython = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue