From 4d72b7a14173ec456ae7c433cf0e57f47499f4c1 Mon Sep 17 00:00:00 2001 From: Julia Lange Date: Wed, 18 Feb 2026 12:36:16 -0800 Subject: [PATCH] Converted app.nix --- hmModules/apps/neovim/app.nix | 109 ++++++++++++---------------------- 1 file changed, 38 insertions(+), 71 deletions(-) diff --git a/hmModules/apps/neovim/app.nix b/hmModules/apps/neovim/app.nix index 6d078ae..e559634 100644 --- a/hmModules/apps/neovim/app.nix +++ b/hmModules/apps/neovim/app.nix @@ -50,6 +50,7 @@ # extraLuaConfig = '' # ${builtins.readFile ./options.lua} # ''; + # vim.g.rust_recommended_style = 0 programs.nixvim.colorschemes = with config.neovim.themes; { catppuccin = lib.mkIf catppuccin.enable { @@ -61,9 +62,9 @@ programs.nixvim.plugins = with config.neovim.plugins; { comment.enable = comments.enable; - + fugitive.enable = fugitive.enable; - + lualine = lib.mkIf lualine.enable { enable = true; icons_enabled = true; @@ -76,79 +77,45 @@ cmp = { enable = nvimcmp.enable; autoEnableSources = true; - settings.sources = lib.options luasnip.enable { name = "cmp-luasnip" }; + settings.sources = [ + { name = "nvim_lsp"; } + { name = "path"; } + { name = "buffer"; } + ] + lib.options luasnip.enable { name = "cmp-luasnip" }; }; - + telescope.enable = telescope.enable; + # telescope.fzf.enable = lib.mkEnableOption "Enables telescope-fzf"; + treesitter.enable = treesiter.enable; - # telescope = { - # enable = lib.mkEnableOption "Enables telescope"; - # fzf.enable = lib.mkEnableOption "Enables telescope-fzf"; - # }; - # treesitter.enable = lib.mkEnableOption "Enables treesitter"; - # wiki.enable = lib.mkEnableOption "Enables a wiki"; - # - # - # wiki = lopts cfgp.wiki.enable (with pkgs.vimPlugins; [ - # { - # plugin = vimwiki; - # type = "lua"; - # config = '' - # vim.g.vimwiki_list = { - # { - # path = '${config.xdg.userDirs.documents}/wiki', - # links_space_char = '_', - # ext = '.md', - # syntax = 'markdown', - # } - # } - # ''; - # } - # ]); - } + vimwiki = { + enable = wiki.enable; + list = [ + { + path = "${config.xdg.userDirs.documents}/wiki"; + links_space_char = "_"; + ext = ".md"; + syntax = "markdown"; + } + ]; + }; + }; - # extraPackages = with pkgs; [ - # (lib.mkIf config.neovim.languages.c.enable libclang) - # (lib.mkIf config.neovim.languages.go.enable gopls) - # (lib.mkIf config.neovim.languages.nix.enable nil) - # (lib.mkIf config.neovim.languages.rust.enable rust-analyzer) - # ]; - # - # # Additional packages are added through imports - # plugins = let - # lopts = lib.lists.optionals; - # cfgp = config.neovim.plugins; - # cfgl = config.neovim.languages; - # cfgt = config.neovim.themes; - # - # nix-pkg = lopts cfgl.nix.enable (with pkgs.vimPlugins; [ - # vim-nix - # ]); - # - # rust-pkg = lopts cfgl.rust.enable (with pkgs.vimPlugins; [ - # { - # plugin = rustaceanvim; - # type = "lua"; - # config = '' - # vim.g.rust_recommended_style = 0 - # ''; - # } - # ]); - # - # go-pkg = lopts cfgl.go.enable (with pkgs.vimPlugins; [ - # go-nvim - # ]); - # - # typescript-pkg = lopts cfgl.typescript.enable (with pkgs.vimPlugins; [ - # { - # plugin = typescript-tools-nvim; - # type = "lua"; - # config = '' - # require("typescript-tools").setup {} - # ''; - # } - # ]); - # }; + programs.nixvim.plugins = with config.neovim.languages; { + nix.enable = nix.enable; + rustaceanvim.enable = rust.enable; + typsecript-tools.enable = typescript.enable; + }; + programs.nixvim.lsp = { + enable = true; + servers = with config.neovim.languages; { + clangd.enable = c.enable; + gopls.enable = go.enable; + nil_ls.enable = nix.enable; + rust_analyzer.enable = rust.enable; + tsserver.enable = typescript.enable; + }; + }; }; }