mirror of
https://github.com/fred-drake/neovim.git
synced 2026-06-05 14:59:28 -05:00
Added IaC support
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
let
|
||||
# Read all files in the current directory
|
||||
files = builtins.readDir ./.;
|
||||
|
||||
# Filter out default.nix and non-.nix files
|
||||
nixFiles = builtins.filter
|
||||
(name: name != "default.nix" && builtins.match ".*\\.nix" name != null)
|
||||
(builtins.attrNames files);
|
||||
|
||||
# Create a list of import statements
|
||||
imports = map (name: ./. + "/${name}") nixFiles;
|
||||
in {
|
||||
# Import all configuration modules automatically
|
||||
imports = imports;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{pkgs, ...}: {
|
||||
plugins = {
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
formatters_by_ft = {
|
||||
terraform = ["tofu_fmt"];
|
||||
tf = ["tofu_fmt"];
|
||||
};
|
||||
};
|
||||
};
|
||||
lsp.servers = {
|
||||
ansiblels.enable = true;
|
||||
dockerls.enable = true;
|
||||
helm-ls.enable = true;
|
||||
nginx-language-server.enable = true;
|
||||
terraformls.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
extraPlugins = [
|
||||
# Set ansible.yaml files
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "nvim-ansible";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "mfussenegger";
|
||||
repo = "nvim-ansible";
|
||||
rev = "9c3b4a771b8c8d7b4f2171466464d978cb3846f7";
|
||||
hash = "sha256-N1yOL77WpP66A2zrKxi7IOO5uRzAaeGa0Y/yWaIFiws=";
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user