diff options
| author | schererleander <leander@schererleander.de> | 2025-05-11 02:07:58 +0200 |
|---|---|---|
| committer | schererleander <leander@schererleander.de> | 2025-05-11 02:07:58 +0200 |
| commit | e1ccc891650e3494355e5bcc70254a8e2f5fbd0b (patch) | |
| tree | ce92d5acccb30d92ae443dedbf026e4e2b214ecd | |
| parent | aba1e0c7102c23d217f7a682b98df5fb1aac202e (diff) | |
use nvf
| -rw-r--r-- | flake.lock | 330 | ||||
| -rw-r--r-- | flake.nix | 11 | ||||
| -rw-r--r-- | hosts/darwin/home.nix | 4 | ||||
| -rw-r--r-- | hosts/nixos/home.nix | 4 | ||||
| -rw-r--r-- | modules/default.nix | 5 | ||||
| -rw-r--r-- | modules/neovim/default.nix | 46 | ||||
| -rw-r--r-- | modules/neovim/lua/autocmds.lua | 8 | ||||
| -rw-r--r-- | modules/neovim/lua/init.lua | 4 | ||||
| -rw-r--r-- | modules/neovim/lua/keymaps.lua | 0 | ||||
| -rw-r--r-- | modules/neovim/lua/options.lua | 45 | ||||
| -rw-r--r-- | modules/neovim/lua/plugins.lua | 268 | ||||
| -rw-r--r-- | modules/nixvim.nix | 13 | ||||
| -rw-r--r-- | modules/nvf.nix | 90 |
13 files changed, 446 insertions, 382 deletions
@@ -69,6 +69,27 @@ "flake-parts": { "inputs": { "nixpkgs-lib": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ "nur", "nixpkgs" ] @@ -87,6 +108,24 @@ "type": "github" } }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": [ @@ -107,6 +146,42 @@ "type": "indirect" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -128,6 +203,34 @@ "type": "github" } }, + "ixx": { + "inputs": { + "flake-utils": [ + "nixvim", + "nuschtosSearch", + "flake-utils" + ], + "nixpkgs": [ + "nixvim", + "nuschtosSearch", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1737371634, + "narHash": "sha256-fTVAWzT1UMm1lT+YxHuVPtH+DATrhYfea3B0MxG/cGw=", + "owner": "NuschtOS", + "repo": "ixx", + "rev": "a1176e2a10ce745ff8f63e4af124ece8fe0b1648", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "ref": "v0.0.7", + "repo": "ixx", + "type": "github" + } + }, "mac-app-util": { "inputs": { "cl-nix-lite": "cl-nix-lite", @@ -150,6 +253,47 @@ "type": "github" } }, + "mnw": { + "locked": { + "lastModified": 1746338991, + "narHash": "sha256-GbyoHjf14LOxZQc+0NFblI4xf/uwGrYo3W8lwE4HcwI=", + "owner": "Gerg-L", + "repo": "mnw", + "rev": "c65407ee9387ef75985dad3e30f58c822c766ec1", + "type": "github" + }, + "original": { + "owner": "Gerg-L", + "repo": "mnw", + "type": "github" + } + }, + "nil": { + "inputs": { + "flake-utils": [ + "nvf", + "flake-utils" + ], + "nixpkgs": [ + "nvf", + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1741118843, + "narHash": "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=", + "owner": "oxalica", + "repo": "nil", + "rev": "577d160da311cc7f5042038456a0713e9863d09e", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "nil", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -224,6 +368,21 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1732617236, @@ -274,6 +433,22 @@ }, "nixpkgs_5": { "locked": { + "lastModified": 1746576598, + "narHash": "sha256-FshoQvr6Aor5SnORVvh/ZdJ1Sa2U4ZrIMwKBX5k2wu0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b3582c75c7f21ce0b429898980eddbbf05c68e55", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { "lastModified": 1746663147, "narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=", "owner": "nixos", @@ -288,10 +463,46 @@ "type": "github" } }, - "nur": { + "nixpkgs_7": { + "locked": { + "lastModified": 1746152631, + "narHash": "sha256-zBuvmL6+CUsk2J8GINpyy8Hs1Zp4PP6iBWSmZ4SCQ/s=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "032bc6539bd5f14e9d0c51bd79cfe9a055b094c3", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixvim": { "inputs": { "flake-parts": "flake-parts", "nixpkgs": "nixpkgs_5", + "nuschtosSearch": "nuschtosSearch" + }, + "locked": { + "lastModified": 1746879234, + "narHash": "sha256-L5pwOBj/qAMhCC5QXmWSw8QrcL26bNztwpLhONaFfd8=", + "owner": "nix-community", + "repo": "nixvim", + "rev": "e527939f79caa0636c7d5331e4e6c70857a1fbe0", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixvim", + "type": "github" + } + }, + "nur": { + "inputs": { + "flake-parts": "flake-parts_2", + "nixpkgs": "nixpkgs_6", "treefmt-nix": "treefmt-nix_2" }, "locked": { @@ -307,6 +518,52 @@ "type": "indirect" } }, + "nuschtosSearch": { + "inputs": { + "flake-utils": "flake-utils_2", + "ixx": "ixx", + "nixpkgs": [ + "nixvim", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745046075, + "narHash": "sha256-8v4y6k16Ra/fiecb4DxhsoOGtzLKgKlS+9/XJ9z0T2I=", + "owner": "NuschtOS", + "repo": "search", + "rev": "066afe8643274470f4a294442aadd988356a478f", + "type": "github" + }, + "original": { + "owner": "NuschtOS", + "repo": "search", + "type": "github" + } + }, + "nvf": { + "inputs": { + "flake-parts": "flake-parts_3", + "flake-utils": "flake-utils_3", + "mnw": "mnw", + "nil": "nil", + "nixpkgs": "nixpkgs_7", + "systems": "systems_5" + }, + "locked": { + "lastModified": 1746852864, + "narHash": "sha256-4pE761eSft4GUboGMdseBC7WvfY81CMHuCuxnVy9PwI=", + "owner": "notashelf", + "repo": "nvf", + "rev": "fee3bbe536b5bf484aedebafa5130b485068b64f", + "type": "github" + }, + "original": { + "owner": "notashelf", + "repo": "nvf", + "type": "github" + } + }, "root": { "inputs": { "firefox-addons": "firefox-addons", @@ -316,16 +573,40 @@ "nixcord": "nixcord", "nixpkgs": "nixpkgs_4", "nixpkgs-darwin": "nixpkgs-darwin", + "nixvim": "nixvim", "nur": "nur", + "nvf": "nvf", "spicetify-nix": "spicetify-nix" } }, + "rust-overlay": { + "inputs": { + "nixpkgs": [ + "nvf", + "nil", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1741055476, + "narHash": "sha256-52vwEV0oS2lCnx3c/alOFGglujZTLmObit7K8VblnS8=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "aefb7017d710f150970299685e8d8b549d653649", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "spicetify-nix": { "inputs": { "nixpkgs": [ "nixpkgs" ], - "systems": "systems_3" + "systems": "systems_6" }, "locked": { "lastModified": 1746738008, @@ -385,6 +666,51 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -15,7 +15,10 @@ spicetify-nix.url = "github:Gerg-L/spicetify-nix"; spicetify-nix.inputs.nixpkgs.follows = "nixpkgs"; - + + nvf.url = "github:notashelf/nvf"; + nixvim.url = "github:nix-community/nixvim"; + nixcord.url = "github:kaylorben/nixcord"; mac-app-util.url = "github:hraban/mac-app-util"; @@ -33,6 +36,7 @@ specialArgs = { inherit inputs; }; modules = [ ./hosts/nixos/configuration.nix + home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -43,7 +47,9 @@ home-manager.sharedModules = [ inputs.nixcord.homeModules.nixcord - ]; + inputs.nixvim.homeManagerModules.nixvim + inputs.nvf.homeManagerModules.nvf + ]; } ]; }; @@ -70,4 +76,3 @@ }; }; } - diff --git a/hosts/darwin/home.nix b/hosts/darwin/home.nix index 4f0fad9..11b0c96 100644 --- a/hosts/darwin/home.nix +++ b/hosts/darwin/home.nix @@ -35,7 +35,7 @@ zsh.enable = true; tmux.enable = true; git.enable = true; - neovim.enable = true; + nvf.enable = true; # No aarh64-darwin #chromium.enable = true; @@ -44,4 +44,4 @@ vscode.enable = true; home.stateVersion = "24.11"; -}
\ No newline at end of file +} diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix index c149d5f..a6226e2 100644 --- a/hosts/nixos/home.nix +++ b/hosts/nixos/home.nix @@ -69,7 +69,6 @@ foot.enable = true; wezterm.enable = true; - neovim.enable = true; git.enable = true; zsh.enable = true; tmux.enable = true; @@ -80,6 +79,7 @@ zathura.enable = true; firefox.enable = true; + nvf.enable = true; vscode.enable = true; home.stateVersion = "24.11"; -}
\ No newline at end of file +} diff --git a/modules/default.nix b/modules/default.nix index 6449f63..e26dd1f 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -7,7 +7,6 @@ ./tmux.nix ./emacs.nix ./waybar.nix - ./neovim/default.nix ./nextcloud.nix ./spicetify.nix ./zathura.nix @@ -16,5 +15,7 @@ ./nixcord.nix ./wezterm.nix ./firefox.nix + ./nvf.nix + ./nixvim.nix ]; -}
\ No newline at end of file +} diff --git a/modules/neovim/default.nix b/modules/neovim/default.nix deleted file mode 100644 index e352b57..0000000 --- a/modules/neovim/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.neovim; -in { - options.neovim.enable = lib.mkEnableOption "Enable and setup neovim"; - - config = lib.mkIf cfg.enable { - programs.neovim = { - enable = true; - vimAlias = true; - - extraPackages = with pkgs; [ - lua-language-server - ]; - - plugins = with pkgs.vimPlugins; [ - lazy-nvim - nvim-lspconfig - friendly-snippets - telescope-nvim - - (nvim-treesitter.withPlugins (plugins: with plugins; [ - tree-sitter-bash - tree-sitter-c - tree-sitter-json - tree-sitter-lua - tree-sitter-python - tree-sitter-nix - tree-sitter-vim - tree-sitter-vimdoc - tree-sitter-yaml - tree-sitter-markdown - tree-sitter-markdown_inline - ])) - ]; - }; - - xdg.configFile."nvim/lua".source = ./lua; - - home.sessionVariables = rec { - EDITOR = "nvim"; - GIT_EDITOR = EDITOR; - }; - }; -}
\ No newline at end of file diff --git a/modules/neovim/lua/autocmds.lua b/modules/neovim/lua/autocmds.lua deleted file mode 100644 index f7e6923..0000000 --- a/modules/neovim/lua/autocmds.lua +++ /dev/null @@ -1,8 +0,0 @@ -vim.cmd('highlight WinSeparator guibg=None ctermbg=None') -vim.cmd('highlight VertSplit guibg=NONE ctermbg=NONE') --- hide background lsp coloum -vim.cmd('highlight SignColumn guibg=NONE ctermbg=None') - --- transparent background -vim.cmd('highlight Normal guibg=NONE ctermbg=NONE') -vim.cmd('highlight NormalNC guibg=NONE ctermbg=NONE') diff --git a/modules/neovim/lua/init.lua b/modules/neovim/lua/init.lua deleted file mode 100644 index 2d394bf..0000000 --- a/modules/neovim/lua/init.lua +++ /dev/null @@ -1,4 +0,0 @@ -require("autocmds") -require("keymaps") -require("options") -require("plugins") diff --git a/modules/neovim/lua/keymaps.lua b/modules/neovim/lua/keymaps.lua deleted file mode 100644 index e69de29..0000000 --- a/modules/neovim/lua/keymaps.lua +++ /dev/null diff --git a/modules/neovim/lua/options.lua b/modules/neovim/lua/options.lua deleted file mode 100644 index 891668f..0000000 --- a/modules/neovim/lua/options.lua +++ /dev/null @@ -1,45 +0,0 @@ -local options = { - list = false, - backup = false, -- creates a backup file - clipboard = "unnamedplus", -- allows neovim to access the system clipboard - conceallevel = 2, -- so that `` is visible in markdown files - fileencoding = "utf-8", -- the encoding written to a file - hidden = true, -- required to keep multiple buffers and open multiple buffers - hlsearch = true, -- highlight all matches on previous search pattern - ignorecase = true, -- ignore case in search patterns - mouse = "a", -- allow the mouse to be used in neovim - laststatus = 3, - showmode = false, -- we don't need to see things like -- INSERT -- anymore - smartcase = true, -- smart case - smartindent = true, -- make indenting smarter again - splitbelow = true, -- force all horizontal splits to go below current window ↕️ - splitright = true, -- force all vertical splits to go to the right of current window ↔️ - swapfile = false, -- creates a swapfile - termguicolors = true, -- set term gui colors (most terminals support this) - timeoutlen = 100, -- time to wait for a mapped sequence to complete (in milliseconds) - undofile = true, -- enable persistent undo - updatetime = 300, -- faster completion (4000ms default) ⚡ - writebackup = false, -- if a file is being edited by another program, it is not allowed to be edited - expandtab = true, -- use tabs instead of spaces ␣ - pumheight = 10, - cmdheight = 2, - shiftwidth = 2, -- the number of spaces inserted for each indentation - tabstop = 2, -- insert 2 spaces for a tab ⇥ - cursorline = false, -- highlight the current line (disabled for now) - number = false, -- set numbered lines - relativenumber = false, -- set relative numbered lines - numberwidth = 4, -- set number column width to 2 (default 4) - wrap = false, -- display lines as one long lines -} - -vim.opt.shortmess:append 'c' - -for k, v in pairs(options) do - vim.opt[k] = v -end - -vim.wo.list = false -vim.cmd 'set whichwrap+=<,>,[,],h,l' - --- lazy load -vim.loader.enable() diff --git a/modules/neovim/lua/plugins.lua b/modules/neovim/lua/plugins.lua deleted file mode 100644 index 7c2d956..0000000 --- a/modules/neovim/lua/plugins.lua +++ /dev/null @@ -1,268 +0,0 @@ -require("lazy").setup({ - { - "ellisonleao/gruvbox.nvim", - priority = 1000, - config = function () - require("gruvbox").setup({}) - vim.cmd("colorscheme gruvbox") - end - }, - - { - "hrsh7th/nvim-cmp", - dependencies = { - "neovim/nvim-lspconfig", - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "L3MON4D3/LuaSnip", - "onsails/lspkind-nvim" - }, - config = function() - local signs = { - Error = " ", - Warn = " ", - Hint = " ", - Info = " ", - } - for type, icon in pairs(signs) do - local hl = "DiagnosticSign" .. type - vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) - end - - local capabilities = require("cmp_nvim_lsp").default_capabilities() - - local on_attach = function(client, bufnr) - local opts = { noremap = true, silent = true, buffer = bufnr } - vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) - vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) - vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts) - vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts) - vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, opts) - vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts) - vim.keymap.set("n", "<leader>wl", function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts) - vim.keymap.set("n", "<leader>D", vim.lsp.buf.type_definition, opts) - vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts) - vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts) - vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) - vim.keymap.set("n", "<leader>e", vim.diagnostic.open_float, opts) - vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) - vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) - vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, opts) - end - - local lspconfig = require("lspconfig") - - lspconfig.lua_ls.setup({ - capabilities = capabilities, - on_attach = on_attach, - settings = { - Lua = { - diagnostics = { - globals = { "vim" }, - }, - workspace = { - library = vim.api.nvim_get_runtime_file("", true), - }, - telemetry = { - enable = false, - }, - }, - }, - }) - - local cmp = require("cmp") - local luasnip = require("luasnip") - local lspkind = require("lspkind") - require("luasnip.loaders.from_vscode").lazy_load() - - cmp.setup({ - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert({ - ["<C-d>"] = cmp.mapping.scroll_docs(-4), - ["<C-f>"] = cmp.mapping.scroll_docs(4), - ["<C-Space>"] = cmp.mapping.complete(), - ["<C-e>"] = cmp.mapping.close(), - ["<CR>"] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }), - ["<Tab>"] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, { "i", "s" }), - ["<S-Tab>"] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }), - }), - formatting = { - format = lspkind.cmp_format({ - mode = "symbol_text", - maxwidth = 50, - ellipsis_char = "..." - }), - }, - sources = { - { name = "nvim_lsp" }, - { name = "luasnip" }, - { name = "buffer" }, - { name = "path" }, - }, - }) - - cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'buffer' }, - }) - }) - - cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) - }) - end, - }, - - { - "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", - event = "BufRead", - config = function() - require("nvim-treesitter.configs").setup({ - auto_install = true, - ensure_installed = { "c", "lua", "vim", "python", "java", "javascript", "typescript", "css", "html" }, - highlight = { enable = true, use_languagetree = true }, - indent = { enable = true }, - }) - end, - }, - - { - "nvim-tree/nvim-tree.lua", - enabled = false, - config = function() - require("nvim-tree").setup({ - view = { width = 20, side = "left" }, - disable_netrw = true, - hijack_cursor = true, - update_cwd = true, - hijack_directories = { auto_open = true }, - renderer = { - root_folder_label = false, - indent_markers = { - enable = true, - icons = { corner = "└ ", edge = "│ ", none = " " }, - }, - }, - }) - end, - }, - - { - "nvim-telescope/telescope.nvim", - dependencies = { "nvim-lua/plenary.nvim" }, - keys = { - { "<C-s>", ":silent Telescope current_buffer_fuzzy_find<CR>", desc = "Open Telescope" }, - }, - config = function() - require("telescope").setup({ - defaults = { mapping = {} }, - pickers = {}, - extensions = {}, - }) - end, - }, - - { - "lewis6991/gitsigns.nvim", - config = function() - require("gitsigns").setup() - end, - }, - - { - "echasnovski/mini.nvim", - version = false, - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function() - require("mini.starter").setup({ - header = table.concat({ - " /l、 ", - "(゚、 。 7 ", - " l ~ ヽ ", - " じしf_,)ノ ", - }, "\n"), - footer = "", - content_hooks = { - require("mini.starter").gen_hook.adding_bullet("» "), - require("mini.starter").gen_hook.aligning("center", "center"), - }, - }) - end, - }, - - { - "windwp/nvim-autopairs", - event = "InsertEnter", - config = function() - require("nvim-autopairs").setup {} - end, - }, - - { - "tamton-aquib/staline.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function() - require("staline").setup { - sections = { - left = { 'file_name', 'branch' }, - mid = { 'lsp' }, - right = { 'line_column' }, - }, - special_table = { - NvimTree = { 'NvimTree', ' ' }, - packer = { 'Packer', ' ' }, - starter = { '', '' }, - lazy = { '', '' }, - mason = { '', '' }, - }, - lsp_symbols = { - Error = " ", - Info = " ", - Warn = " ", - Hint = "", - }, - defaults = { - true_colors = true, - line_column = ' ☰ %l/%L %c', - branch_symbol = " ", - exclude_fts = { 'NvimTree' }, - }, - } - vim.cmd('highlight Statusline guibg=none') - vim.cmd('highlight StatuslineNC guibg=none') - end, - }, -}) diff --git a/modules/nixvim.nix b/modules/nixvim.nix new file mode 100644 index 0000000..dd418b2 --- /dev/null +++ b/modules/nixvim.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.nixvim; +in { + options.nixvim.enable = lib.mkEnableOption "Setup nixvim"; + + config = lib.mkIf cfg.enable { + programs.nixvim = { + enable = true; + }; + }; +} diff --git a/modules/nvf.nix b/modules/nvf.nix new file mode 100644 index 0000000..791b211 --- /dev/null +++ b/modules/nvf.nix @@ -0,0 +1,90 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.nvf; +in { + options.nvf.enable = lib.mkEnableOption "Setup nvf"; + + config = lib.mkIf cfg.enable { + programs.nvf = { + enable = true; + settings = { + vim = { + theme.enable = true; + theme.name = "gruvbox"; + theme.transparent = true; + theme.style = "dark"; + + options = { + tabstop = 2; + shiftwidth = 2; + expandtab = true; + autoindent = true; + mouse = "a"; + }; + + telescope.enable = true; + autocomplete.nvim-cmp.enable = true; + + mini = { + starter = { + enable = true; + setupOpts = { + header = " /l、 \n" + + "(゚、 。 7 \n" + + " l ~ ヽ \n" + + " じしf_,)ノ \n"; + footer = " "; + }; + }; + }; + + autopairs.nvim-autopairs = { + enable = true; + }; + + git.enable = true; + + lsp = { + enable = true; + + formatOnSave = true; + lspkind.enable = true; + }; + + languages = { + enableTreesitter = true; + + nix.enable = true; + }; + + visuals = { + nvim-web-devicons.enable = true; + }; + + snippets.luasnip.enable = true; + + binds = { + whichKey.enable = true; + cheatsheet.enable = true; + }; + + ui = { + borders.enable = false; + }; + + autocmds = [ + { + enable = true; + event = ["VimEnter"]; + command = "highlight Statusline guibg=none | highlight StatuslineNC guibg=none"; + desc = "Transparent statusline"; + } + ]; + + statusline.lualine.enable = true; + }; + }; + }; + }; +} |
