From 55b02cc258d7630746ee0620d706b424d6ddb2a5 Mon Sep 17 00:00:00 2001 From: rafiq Date: Thu, 27 Feb 2025 05:08:44 +0800 Subject: [PATCH] feat(nvf): add initial configuration settings --- flake.nix | 4 ++-- modules/nvf.nix | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 modules/nvf.nix diff --git a/flake.nix b/flake.nix index 59e15b5..01c13a6 100644 --- a/flake.nix +++ b/flake.nix @@ -36,10 +36,10 @@ }; }; - # NVF Configurations + # Packages packages.x86_64-linux.nvf = (inputs.nvf.lib.neovimConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; - modules = [ ( {pkgs, ...}: {} ) ]; + modules = [ ./modules/nvf.nix ]; }).neovim; }; diff --git a/modules/nvf.nix b/modules/nvf.nix new file mode 100644 index 0000000..cdfc38a --- /dev/null +++ b/modules/nvf.nix @@ -0,0 +1,53 @@ +{ pkgs, ... }: + +{ + config.vim = { + theme.enable = true; + + options = { + # Indentation + expandtab = true; + shiftwidth = 2; + tabstop = 2; + shiftround = true; + smarttab = true; + smartindent = true; + + # Visual Settings + cursorline = true; + + # signcolumn = "no"; + }; + + # Built-Ins + autocomplete.blink-cmp.enable = true; + autopairs.nvim-autopairs.enable = true; + binds.whichKey.enable = true; + comments.comment-nvim.enable = true; + + # Languages + languages = { + markdown.enable = true; + }; + + languages.nix = { + enable = true; + format.enable = true; + lsp.enable = true; + treesitter.enable = true; + extraDiagnostics.enable = true; + }; + + # Lazy Loaded Plugins + lazy.plugins = { + # aerial.nvim = { package = aerial.nvim; after = "print('aerial loaded')"; }; + }; + # Load Plugins after Built-Ins + extraPlugins = with pkgs.vimPlugins; { + #harpoon = { package = harpoon; setup = "require('harpoon').setup {}"; }; + }; + # Add directly to init.lua + # Attribute names denote the section names + #luaConfigRC = { aquarium = "vim.cmd('colorscheme aquarium')"; }; + }; +}