From 3790e322e1bc932862bc1e85700e486627b064eb Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Fri, 20 Sep 2024 13:16:03 +0200 Subject: [PATCH] Started a neovim config --- flake.lock | 30 ++++++++++---------- home-manager/apps.nix | 2 +- home-manager/nvim/lualine.nvim | 44 ++++++++++++++++++++++++++++++ home-manager/{ => nvim}/neovim.nix | 1 + home-manager/plasma.nix | 2 +- 5 files changed, 62 insertions(+), 17 deletions(-) create mode 100644 home-manager/nvim/lualine.nvim rename home-manager/{ => nvim}/neovim.nix (85%) diff --git a/flake.lock b/flake.lock index 575c7d1..13e046f 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1725694918, - "narHash": "sha256-+HsjshXpqNiJHLaJaK0JnIicJ/a1NquKcfn4YZ3ILgg=", + "lastModified": 1726611255, + "narHash": "sha256-/bxaYvIK6/d3zqpW26QFS0rqfd0cO4qreSNWvYLTl/w=", "owner": "nix-community", "repo": "home-manager", - "rev": "aaebdea769a5c10f1c6e50ebdf5924c1a13f0cda", + "rev": "d2493de5cd1da06b6a4c3e97f4e7d5dd791df457", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1725634671, - "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", + "lastModified": 1726463316, + "narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=", "owner": "nixos", "repo": "nixpkgs", - "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", + "rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1721524707, - "narHash": "sha256-5NctRsoE54N86nWd0psae70YSLfrOek3Kv1e8KoXe/0=", + "lastModified": 1725762081, + "narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "556533a23879fc7e5f98dd2e0b31a6911a213171", + "rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05", "type": "github" }, "original": { @@ -62,11 +62,11 @@ ] }, "locked": { - "lastModified": 1725727445, - "narHash": "sha256-f5TrY73wfL4kvRmEtZXpzgCuxVFlNqMUNY6QSX16IPA=", + "lastModified": 1726509788, + "narHash": "sha256-PmCmO8NDKzwHrTp9Ox/rcLiCYivqIpZlnLk8wZRjv2I=", "owner": "pjones", "repo": "plasma-manager", - "rev": "1b9c8200d6438c98c427536abbc5b6fd6a5250c8", + "rev": "5a0c70a007837e2db01e0bb68971792e8653d32c", "type": "github" }, "original": { @@ -91,11 +91,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1725540166, - "narHash": "sha256-htc9rsTMSAY5ek+DB3tpntdD/es0eam2hJgO92bWSys=", + "lastModified": 1726524647, + "narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "d9d781523a1463965cd1e1333a306e70d9feff07", + "rev": "e2d404a7ea599a013189aa42947f66cede0645c8", "type": "github" }, "original": { diff --git a/home-manager/apps.nix b/home-manager/apps.nix index fd6f2b6..4e4e624 100644 --- a/home-manager/apps.nix +++ b/home-manager/apps.nix @@ -7,7 +7,7 @@ ... }: { imports = [ - ./neovim.nix + ./nvim/neovim.nix ./plasma.nix ]; diff --git a/home-manager/nvim/lualine.nvim b/home-manager/nvim/lualine.nvim new file mode 100644 index 0000000..ff0a131 --- /dev/null +++ b/home-manager/nvim/lualine.nvim @@ -0,0 +1,44 @@ +lua << END + +require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} + +END diff --git a/home-manager/neovim.nix b/home-manager/nvim/neovim.nix similarity index 85% rename from home-manager/neovim.nix rename to home-manager/nvim/neovim.nix index 213f94a..9286beb 100644 --- a/home-manager/neovim.nix +++ b/home-manager/nvim/neovim.nix @@ -8,6 +8,7 @@ vimAlias = true; extraConfig = '' + programs.neovim.extraConfig = lib.fileContents ./init.vim; set number relativenumber ''; diff --git a/home-manager/plasma.nix b/home-manager/plasma.nix index d4ae904..8662f7c 100644 --- a/home-manager/plasma.nix +++ b/home-manager/plasma.nix @@ -1,4 +1,4 @@ -{ +{ programs.plasma = { enable = true; shortcuts = {