From f755583cdec9be2ae1a256a7c21229b7d7ca754e Mon Sep 17 00:00:00 2001 From: Anton Nesterov Date: Sat, 9 Nov 2024 13:52:10 +0100 Subject: [PATCH] alias e %:h/ --- init.lua | 4 ++++ lazy-lock.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 2514f9e..d150cc4 100644 --- a/init.lua +++ b/init.lua @@ -1,2 +1,6 @@ -- bootstrap lazy.nvim, LazyVim and your plugins require("config.lazy") +vim.api.nvim_create_user_command("New", function(opts) + local cmd = "e %:h/" .. opts.args + vim.cmd(cmd) +end, { nargs = "+", desc = "New file in current directory" }) diff --git a/lazy-lock.json b/lazy-lock.json index 6edff87..42de648 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -34,7 +34,7 @@ "nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" }, "nvim-lspconfig": { "branch": "master", "commit": "d01864641c6e43c681c3e9f6cf4745c75fdd9dcc" }, "nvim-snippets": { "branch": "main", "commit": "56b4052f71220144689caaa2e5b66222ba5661eb" }, - "nvim-treesitter": { "branch": "master", "commit": "425b58968340bd5b4621c2a0d626c73556516d3d" }, + "nvim-treesitter": { "branch": "master", "commit": "0603b3e3d21ebe2fa82dc5361a3d500e0d3ad3a8" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },