mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 13:25:38 +00:00
nixd neovim setup
This commit is contained in:
parent
8cba026f10
commit
6cf5f08fd5
@ -11,6 +11,11 @@
|
||||
options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
|
||||
options.github = lib.mkEnableOption "Whether to enable GitHub features";
|
||||
options.kubernetes = lib.mkEnableOption "Whether to enable Kubernetes features";
|
||||
options.nixosConfiguration = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Configuration to use for nixd options checking";
|
||||
default = "default";
|
||||
};
|
||||
|
||||
config = {
|
||||
plugins = [
|
||||
@ -43,6 +48,21 @@
|
||||
use.lspconfig.nixd.setup = dsl.callWith {
|
||||
cmd = [ "${pkgs.nixd}/bin/nixd" ];
|
||||
capabilities = dsl.rawLua "require('cmp_nvim_lsp').default_capabilities()";
|
||||
# settings = {
|
||||
# nixd = {
|
||||
# options = {
|
||||
# nixos = {
|
||||
# expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).nixosConfigurations.${config.nixosConfiguration}.options";
|
||||
# };
|
||||
# home-manager = {
|
||||
# expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).homeConfigurations.${config.nixosConfiguration}.options";
|
||||
# };
|
||||
# darwin = {
|
||||
# expr = "(builtins.getFlake (\"git+file://\" + toString ./.)).darwinConfigurations.${config.nixosConfiguration}.options";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
};
|
||||
|
||||
use.lspconfig.pyright.setup = dsl.callWith {
|
||||
|
@ -13,6 +13,7 @@ let
|
||||
terraform = config.terraform.enable;
|
||||
github = true;
|
||||
kubernetes = config.kubernetes.enable;
|
||||
nixosConfiguration = config.networking.hostName; # Used for Nixd
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -32,6 +32,7 @@
|
||||
terraform ? false,
|
||||
github ? false,
|
||||
kubernetes ? false,
|
||||
nixosConfiguration ? "default",
|
||||
...
|
||||
}:
|
||||
|
||||
@ -44,6 +45,7 @@ pkgs.neovimBuilder {
|
||||
terraform
|
||||
github
|
||||
kubernetes
|
||||
nixosConfiguration
|
||||
;
|
||||
imports = [
|
||||
../config/align.nix
|
||||
|
Loading…
Reference in New Issue
Block a user