summaryrefslogtreecommitdiff
path: root/hm/editors
diff options
context:
space:
mode:
Diffstat (limited to 'hm/editors')
-rw-r--r--hm/editors/editors.nix8
-rw-r--r--hm/editors/helix.nix14
-rw-r--r--hm/editors/nixvim.nix107
-rw-r--r--hm/editors/nvf.nix48
4 files changed, 177 insertions, 0 deletions
diff --git a/hm/editors/editors.nix b/hm/editors/editors.nix
new file mode 100644
index 0000000..bca92dd
--- /dev/null
+++ b/hm/editors/editors.nix
@@ -0,0 +1,8 @@
+{ ... }:
+{
+ imports = [
+ ./helix.nix
+ ./nixvim.nix
+ # ./nvf.nix
+ ];
+}
diff --git a/hm/editors/helix.nix b/hm/editors/helix.nix
new file mode 100644
index 0000000..05412a8
--- /dev/null
+++ b/hm/editors/helix.nix
@@ -0,0 +1,14 @@
+{ config, lib, pkgs, ... }:
+let
+ cfg = config.szpont.hm.editors.helix;
+in
+{
+ options.szpont.hm.editors.helix.enable = lib.mkEnableOption "enables helix editor";
+
+ config = lib.mkIf cfg.enable {
+ programs.helix = {
+ enable = true;
+ package = pkgs.helix;
+ };
+ };
+}
diff --git a/hm/editors/nixvim.nix b/hm/editors/nixvim.nix
new file mode 100644
index 0000000..a80a674
--- /dev/null
+++ b/hm/editors/nixvim.nix
@@ -0,0 +1,107 @@
+{ inputs, config, lib, pkgs, ... }:
+let
+ cfg = config.szpont.hm.editors.nixvim;
+in
+{
+ imports = [ inputs.nixvim.homeModules.nixvim ];
+
+ options.szpont.hm.editors.nixvim.enable = lib.mkEnableOption "enables nixvim config framework";
+
+ config = lib.mkIf cfg.enable {
+
+ programs.nixvim = {
+ enable = true;
+ package = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default;
+
+ viAlias = true;
+ vimAlias = true;
+ defaultEditor = true;
+ waylandSupport = true;
+ colorschemes.gruvbox.enable = true;
+
+ plugins = {
+ lualine.enable = true;
+ oil.enable = true;
+ lazygit.enable = true;
+ persistence.enable = true;
+ nvim-autopairs.enable = true;
+ neoscroll.enable = true;
+ bufferline.enable = true;
+ web-devicons.enable = true;
+
+ treesitter = {
+ enable = true;
+ settings = {
+ indent.enable = true;
+ };
+ };
+
+ telescope = {
+ enable = true;
+ extensions = {
+ fzf-native = {
+ enable = true;
+ };
+ };
+ };
+
+ notify = {
+ enable = true;
+ settings = {
+ backgroundColour = "#1e1e2e";
+ fps = 60;
+ render = "default";
+ timeout = 500;
+ topDown = true;
+ };
+ };
+
+ hardtime = {
+ # enable = true;
+ settings = {
+ # disableMouse = true;
+ # enabled = false;
+ restrictionMode = "hint";
+ hint = true;
+ maxCount = 40;
+ maxTime = 1000;
+ };
+ };
+
+ nix.enable = true;
+ lsp = {
+ enable = true;
+ servers = {
+ nil_ls.enable = true;
+ clangd.enable = true;
+ };
+ };
+ };
+
+ opts = {
+ number = true;
+ relativenumber = true;
+ termguicolors = true;
+ # mouse = "a";
+ ignorecase = true;
+ smartcase = true;
+ expandtab = true;
+ shiftwidth = 2;
+ encoding = "utf-8";
+ fileencoding = "utf-8";
+ undofile = true;
+ swapfile = true;
+ backup = false;
+ autoread = true;
+ cursorline = true;
+ ruler = true;
+ gdefault = true;
+ scrolloff = 5;
+ clipboard = {
+ providers.wl-copy.enable = true;
+ register = "unnamedplus";
+ };
+ };
+ };
+ };
+}
diff --git a/hm/editors/nvf.nix b/hm/editors/nvf.nix
new file mode 100644
index 0000000..91348a9
--- /dev/null
+++ b/hm/editors/nvf.nix
@@ -0,0 +1,48 @@
+{ inputs, config, lib, pkgs, ... }:
+let
+ cfg = config.szpont.hm.editors.nvf;
+in
+{
+ options.szpont.hm.editors.nvf.enable = lib.mkEnableOption "enables nvf configuration framework";
+
+ config = lib.mkIf cfg.enable {
+ programs.nvf = {
+ enable = true;
+
+ settings.vim = {
+ package = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default;
+
+ viAlias = true;
+ vimAlias = true;
+
+ theme = {
+ enable = true;
+ name = "gruvbox";
+ style = "dark";
+ };
+
+ statusline = {
+ lualine = {
+ enable = true;
+ theme = "gruvbox-material";
+ };
+ };
+
+ autopairs.nvim-autopairs.enable = true;
+
+ lsp.enable = true;
+
+ languages = {
+ nix = {
+ enable = true;
+ format = {
+ enable = true;
+ type = "alejandra";
+ };
+ };
+ clang.enable = true;
+ };
+ };
+ };
+ };
+}