diff --git a/home-manager/features/config/neovim/lua/plugins/auto-session.lua b/home-manager/features/config/neovim/lua/plugins/auto-session.lua new file mode 100644 index 0000000..e63a3f7 --- /dev/null +++ b/home-manager/features/config/neovim/lua/plugins/auto-session.lua @@ -0,0 +1,14 @@ +return { + 'rmagatti/auto-session', + lazy = false, + + ---enables autocomplete for opts + ---@module "auto-session" + ---@type AutoSession.Config + opts = { + suppressed_dirs = { '~/', '~/Projects', '~/Downloads', '/' }, + -- log_level = 'debug', + show_auto_restore_notif = true, + cwd_change_handling = true, + } +} diff --git a/home-manager/features/config/neovim/lua/plugins/decay.lua b/home-manager/features/config/neovim/lua/plugins/decay.lua new file mode 100644 index 0000000..cfc8ed5 --- /dev/null +++ b/home-manager/features/config/neovim/lua/plugins/decay.lua @@ -0,0 +1,6 @@ +return { + "decaycs/decay.nvim", + name = "decay", + lazy = false, + priority = 1000, +} diff --git a/home-manager/features/config/neovim/lua/plugins/rnvimr.lua b/home-manager/features/config/neovim/lua/plugins/rnvimr.lua new file mode 100644 index 0000000..dfbf394 --- /dev/null +++ b/home-manager/features/config/neovim/lua/plugins/rnvimr.lua @@ -0,0 +1,4 @@ +return { + "kevinhwang91/rnvimr", + lazy = false, +} diff --git a/home-manager/features/config/neovim/lua/plugins/surround.lua b/home-manager/features/config/neovim/lua/plugins/surround.lua new file mode 100644 index 0000000..241ec2c --- /dev/null +++ b/home-manager/features/config/neovim/lua/plugins/surround.lua @@ -0,0 +1,10 @@ +return { + "kylechui/nvim-surround", + version = "*", -- Use for stability; omit to use `main` branch for the latest features + event = "VeryLazy", + config = function() + require("nvim-surround").setup({ + -- Configuration here, or leave empty to use defaults + }) + end +} \ No newline at end of file diff --git a/home-manager/features/config/neovim/lua/plugins/telescope.lua b/home-manager/features/config/neovim/lua/plugins/telescope.lua new file mode 100644 index 0000000..bf1514a --- /dev/null +++ b/home-manager/features/config/neovim/lua/plugins/telescope.lua @@ -0,0 +1,5 @@ +return { + 'nvim-telescope/telescope.nvim', + tag = '0.1.8', + dependencies = { 'nvim-lua/plenary.nvim' } +} diff --git a/home-manager/features/config/neovim/lua/plugins/treesitter.lua b/home-manager/features/config/neovim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..f3a862e --- /dev/null +++ b/home-manager/features/config/neovim/lua/plugins/treesitter.lua @@ -0,0 +1,37 @@ +return { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function () + local configs = require("nvim-treesitter.configs") + + configs.setup({ + -- Make sure these are installed + ensure_installed = { + -- Programming languages + "javascript", + "typescript", + "haskell", + "rust", + "lua", + "bash", + + -- Config files + "vim", + "hyprlang", + "toml", + "yaml", + "dockerfile", + + -- Other + "markdown", + }, + -- Use async install + sync_install = false, + -- Install missing parsers when entering a buffer. + auto_install = true, + + highlight = { enable = true }, + indent = { enable = true }, + }) + end +} diff --git a/home-manager/features/neovim.nix b/home-manager/features/neovim.nix index 0f8cc23..d0d7590 100644 --- a/home-manager/features/neovim.nix +++ b/home-manager/features/neovim.nix @@ -11,11 +11,6 @@ let }; in { - home.file.".config/nvim" = { - source = ./config/neovim; - recursive = true; - }; - programs.neovim = { enable = true; viAlias = true; @@ -23,13 +18,14 @@ in defaultEditor = true; plugins = with pkgs.vimPlugins; [ - nvim-treesitter.withAllGrammars - surround-nvim - telescope-nvim - plenary-nvim # dependency of telescope - rnvimr - (fromGitHub "decaycs/decay.nvim" "HEAD" "457014541ebcfb29bd660592a0b02f22c9e2d0e2") - auto-session + # treesitterWithGrammars + lazy-nvim + # surround-nvim + # telescope-nvim + # plenary-nvim # dependency of telescope + # rnvimr + # (fromGitHub "decaycs/decay.nvim" "HEAD" "457014541ebcfb29bd660592a0b02f22c9e2d0e2") + # auto-session ]; extraPackages = with pkgs; [ @@ -39,4 +35,9 @@ in fd # finder for telescope ]; }; + + home.file.".config/nvim" = { + source = ./config/neovim; + recursive = true; + }; }