From aefd0e189efb15eabee9bd73b97673970fb66704 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sat, 1 Mar 2025 14:01:58 -0800 Subject: [PATCH] feat: Add Emmet --- flake.lock | 19 ++++++++++++++++++- flake.nix | 8 +++++++- lua/plugins/nvim-emmet.lua | 9 +++++++++ 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/nvim-emmet.lua diff --git a/flake.lock b/flake.lock index 8020045..fb7a086 100644 --- a/flake.lock +++ b/flake.lock @@ -228,11 +228,28 @@ "type": "github" } }, + "plugins-nvim-emmet": { + "flake": false, + "locked": { + "lastModified": 1717158539, + "narHash": "sha256-LgKASQ1xBL8ugxK1g4R3BLQ3ha05cFtZaSYvd2Hy73c=", + "owner": "olrtg", + "repo": "nvim-emmet", + "rev": "cde4fb2968704aae5c18b7f8a9bc2508767bb78d", + "type": "github" + }, + "original": { + "owner": "olrtg", + "repo": "nvim-emmet", + "type": "github" + } + }, "root": { "inputs": { "neovim-nightly-overlay": "neovim-nightly-overlay", "nixCats": "nixCats", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "plugins-nvim-emmet": "plugins-nvim-emmet" } }, "treefmt-nix": { diff --git a/flake.nix b/flake.nix index bf7457d..6a35119 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,11 @@ url = "github:nix-community/neovim-nightly-overlay"; }; + "plugins-nvim-emmet" = { + url = "github:olrtg/nvim-emmet"; + flake = false; + }; + # see :help nixCats.flake.inputs # If you want your plugin to be loaded by the standard overlay, # i.e. if it wasnt on nixpkgs, but doesnt have an extra build step. @@ -112,7 +117,7 @@ # NOTE: lazy doesnt care if these are in startupPlugins or optionalPlugins # also you dont have to download everything via nix if you dont want. # but you have the option, and that is demonstrated here. - startupPlugins = with pkgs.vimPlugins; { + startupPlugins = with pkgs.vimPlugins; with pkgs.neovimPlugins; { general = [ # LazyVim lazy-nvim @@ -189,6 +194,7 @@ # Custom rose-pine diffview-nvim + nvim-emmet ]; }; diff --git a/lua/plugins/nvim-emmet.lua b/lua/plugins/nvim-emmet.lua new file mode 100644 index 0000000..f04ac0e --- /dev/null +++ b/lua/plugins/nvim-emmet.lua @@ -0,0 +1,9 @@ +return { + { + 'nvim-emmet', + keys = { + { 'xe', mode = { 'n', 'v' }, require('nvim-emmet').wrap_with_abbreviation, desc = 'Wrap with Emmet abbr' }, + }, + ft = { 'html', 'css', 'scss', 'vue', 'blade' }, + }, +}