From b669dc080558f40c1476dde0e942415c28b1e4af Mon Sep 17 00:00:00 2001 From: iFargle Date: Wed, 7 Feb 2024 13:57:42 +0900 Subject: [PATCH] Test --- .../software/cli/neovim/custom/plugins.lua | 62 +++++++++++++++++++ .../common/software/cli/neovim/default.nix | 5 ++ 2 files changed, 67 insertions(+) create mode 100644 home-manager/common/software/cli/neovim/custom/plugins.lua diff --git a/home-manager/common/software/cli/neovim/custom/plugins.lua b/home-manager/common/software/cli/neovim/custom/plugins.lua new file mode 100644 index 00000000..ec92ca0e --- /dev/null +++ b/home-manager/common/software/cli/neovim/custom/plugins.lua @@ -0,0 +1,62 @@ + +local overrides = require("custom.configs.overrides") + +---@type NvPluginSpec[] +local plugins = { + + -- Override plugin definition options + + { + "neovim/nvim-lspconfig", + dependencies = { + -- format & linting + { + "jose-elias-alvarez/null-ls.nvim", + config = function() + require "custom.configs.null-ls" + end, + }, + }, + config = function() + require "plugins.configs.lspconfig" + require "custom.configs.lspconfig" + end, -- Override to setup mason-lspconfig + }, + + -- override plugin configs + { + "williamboman/mason.nvim", + opts = overrides.mason + }, + + { + "nvim-treesitter/nvim-treesitter", + opts = overrides.treesitter, + }, + + { + "nvim-tree/nvim-tree.lua", + opts = overrides.nvimtree, + }, + + -- Install a plugin + { + "max397574/better-escape.nvim", + event = "InsertEnter", + config = function() + require("better_escape").setup() + end, + }, + + -- vim-fugitive for integrated Git + { + "tpope/vim-fugitive", + event = "VeryLazy", + }, + -- fzf fuzzyfinder + { + "vijaymarupudi/nvim-fzf", + } +} + +return plugins \ No newline at end of file diff --git a/home-manager/common/software/cli/neovim/default.nix b/home-manager/common/software/cli/neovim/default.nix index dd01664d..609f2188 100644 --- a/home-manager/common/software/cli/neovim/default.nix +++ b/home-manager/common/software/cli/neovim/default.nix @@ -39,4 +39,9 @@ source = "${pkgs.vimPlugins.nvchad}/"; target = "./nvim"; }; + + xdg.configFile."nvim-custom-plugins" = { + enable = true; + target = "./nvim/lua/custom/plugins.lua"; + text = builtins.readFile ./custom/plugins.lua; }