From d24e7c2235fb34010954352745b6a0fa0d3f8ab8 Mon Sep 17 00:00:00 2001 From: Tine Date: Thu, 22 Aug 2024 20:26:25 +0200 Subject: [PATCH] feat(nix): fmt and ls in nvim --- nix/core.nix | 7 +++++++ nvim/lua/code_helpers.lua | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/nix/core.nix b/nix/core.nix index a48e0b3..50dfa71 100644 --- a/nix/core.nix +++ b/nix/core.nix @@ -73,6 +73,11 @@ # Rust cargo + # Nix + nil + nixfmt-rfc-style + nix-prefetch-scripts + # Shell zsh shfmt @@ -103,6 +108,8 @@ talosctl cilium-cli kubelogin-oidc + kubebuilder + chart-testing ]; # Home Manager is pretty good at managing dotfiles. The primary way to manage diff --git a/nvim/lua/code_helpers.lua b/nvim/lua/code_helpers.lua index db1b701..8006a60 100644 --- a/nvim/lua/code_helpers.lua +++ b/nvim/lua/code_helpers.lua @@ -156,6 +156,7 @@ require("mason-lspconfig").setup({ "terraformls", -- terraform "tflint", -- terraform "yamlls", -- yaml + "nil_ls", -- nix }, automatic_installation = true, }) @@ -240,6 +241,9 @@ require("formatter").setup({ proto = { require("formatter.filetypes.proto").buf_format, }, + nix = { + require("formatter.filetypes.nix").nixfmt, + }, terraform = { --require("formatter.filetypes.terraform").terraformfmt, function()