From a6b4b729baf5c9472e9e069cd655edc8359bbada Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Fri, 12 Jul 2024 20:55:31 +0300 Subject: [PATCH] plugins: add nlsp-settings plugin --- module-list.nix | 1 + .../plugins/language-server/nlsp-settings.nix | 22 +++++++++++++++++++ modules/profiles/recommended-plugins.nix | 5 ++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 modules/plugins/language-server/nlsp-settings.nix diff --git a/module-list.nix b/module-list.nix index 840823a..a6aaca2 100644 --- a/module-list.nix +++ b/module-list.nix @@ -16,6 +16,7 @@ ./modules/plugins/interface/colorizer.nix ./modules/plugins/interface/lualine.nix ./modules/plugins/language-server/lspconfig.nix + ./modules/plugins/language-server/nlsp-settings.nix ./modules/plugins/navigation/hop-nvim.nix ./modules/plugins/navigation/telescope.nix ./modules/plugins/navigation/nvim-tree.nix diff --git a/modules/plugins/language-server/nlsp-settings.nix b/modules/plugins/language-server/nlsp-settings.nix new file mode 100644 index 0000000..3961c35 --- /dev/null +++ b/modules/plugins/language-server/nlsp-settings.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.plugins.language-server.nlsp-settings; +in +{ + options.plugins.language-server.nlsp-settings = with lib; { + enable = lib.mkEnableOption "nlsp-settings"; + + package = mkPackageOption pkgs.vimPlugins "nlsp-settings-nvim" { }; + + }; + + config = lib.mkIf cfg.enable { + plugin.nlsp-settings-nvim = { + enable = true; + name = "nlspsettings"; + package = cfg.package; + setupSettings = { }; + }; + }; +} diff --git a/modules/profiles/recommended-plugins.nix b/modules/profiles/recommended-plugins.nix index d06e4e2..5595503 100644 --- a/modules/profiles/recommended-plugins.nix +++ b/modules/profiles/recommended-plugins.nix @@ -40,7 +40,10 @@ let inherit (lib.nix2lua) nf; in }; }; - language-server.lspconfig.enable = lib.mkDefault true; + language-server = { + lspconfig.enable = lib.mkDefault true; + nlsp-settings.enable = lib.mkDefault true; + }; navigation = { hop-nvim.enable = lib.mkDefault true;