From 7e27f6f2250bd4e0faa5d5e626dce541a8bb22e4 Mon Sep 17 00:00:00 2001 From: Linnnus Date: Sun, 1 Oct 2023 22:43:58 +0200 Subject: Use alejandra formatter --- home/neovim/completion.nix | 7 ++++--- home/neovim/default.nix | 20 ++++++++++---------- home/neovim/filetype.nix | 8 ++------ home/neovim/lsp.nix | 9 +++++---- home/neovim/plugins.nix | 7 ++++--- 5 files changed, 25 insertions(+), 26 deletions(-) (limited to 'home/neovim') diff --git a/home/neovim/completion.nix b/home/neovim/completion.nix index f3be603..70d6e1a 100644 --- a/home/neovim/completion.nix +++ b/home/neovim/completion.nix @@ -1,8 +1,9 @@ # This module sets up auto completion for Neovim. - -{ pkgs, lib, ... }: - { + pkgs, + lib, + ... +}: { programs.neovim.plugins = with pkgs.vimPlugins; [ # This is the actual completion engine. { diff --git a/home/neovim/default.nix b/home/neovim/default.nix index ccf6dc5..4d49854 100644 --- a/home/neovim/default.nix +++ b/home/neovim/default.nix @@ -1,15 +1,15 @@ # This file contains the HM configuration options for Neovim. - -{ pkgs, lib, ... }: - { - imports = - [ - ./lsp.nix - ./filetype.nix - ./completion.nix - ./plugins.nix - ]; + pkgs, + lib, + ... +}: { + imports = [ + ./lsp.nix + ./filetype.nix + ./completion.nix + ./plugins.nix + ]; programs.neovim = { enable = true; diff --git a/home/neovim/filetype.nix b/home/neovim/filetype.nix index 66d5e68..8dc9536 100644 --- a/home/neovim/filetype.nix +++ b/home/neovim/filetype.nix @@ -1,8 +1,5 @@ # This module configures various syntax/filetype plugins for Neovim. - -{ pkgs, ... }: - -let +{pkgs, ...}: let vim-noweb = pkgs.vimUtils.buildVimPlugin { pname = "vim-noweb"; version = "26-08-2023"; # day of retrieval @@ -11,8 +8,7 @@ let hash = "sha256-c5eUZiKIjAfjJ33l821h5DjozMpMf0CaK03QIkSUfxg="; }; }; -in -{ +in { programs.neovim.plugins = with pkgs.vimPlugins; [ vim-nix vim-noweb diff --git a/home/neovim/lsp.nix b/home/neovim/lsp.nix index 5a80758..3aa3094 100644 --- a/home/neovim/lsp.nix +++ b/home/neovim/lsp.nix @@ -1,10 +1,11 @@ # This module sets up LSP server configurations for Neovim. It is waaay # overcomplicated as it kind of turned into an experiment in generating Lua # code from a Nix attrset. - -{ pkgs, lib, ... }: - { + pkgs, + lib, + ... +}: { programs.neovim.plugins = [ { plugin = pkgs.vimPlugins.nvim-lspconfig; @@ -87,7 +88,6 @@ } ]; } - # I spent like an hour writing this, only to find it was a pretty bad idea. # # nixToLua = s: @@ -107,3 +107,4 @@ # toString s # else # throw "Cannot convert ${builtins.typeOf s} to Lua value!"; + diff --git a/home/neovim/plugins.nix b/home/neovim/plugins.nix index 89cd6e7..1e0a707 100644 --- a/home/neovim/plugins.nix +++ b/home/neovim/plugins.nix @@ -1,8 +1,9 @@ # This module sets up and configures various miscellaneous plugins. - -{ pkgs, lib, ... }: - { + pkgs, + lib, + ... +}: { programs.neovim.plugins = [ { plugin = pkgs.vimPlugins.vim-localvimrc; -- cgit v1.2.3