From ca0520cd1ea9fe21fce167d8e8ea6af09d29e76c Mon Sep 17 00:00:00 2001 From: newbie Date: Wed, 3 Jan 2024 14:18:04 +0800 Subject: [PATCH] updtae --- init.lua | 1 - lua/customcmd.lua | 6 ------ lua/lsp/pyright.lua | 3 +++ 3 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 lua/customcmd.lua diff --git a/init.lua b/init.lua index eaf63c6..1b6d36d 100644 --- a/init.lua +++ b/init.lua @@ -24,7 +24,6 @@ end G.opt.rtp:prepend(lazypath) require("keymap") -require("customcmd") if G.g.vscode then require('vscode') diff --git a/lua/customcmd.lua b/lua/customcmd.lua deleted file mode 100644 index 059a745..0000000 --- a/lua/customcmd.lua +++ /dev/null @@ -1,6 +0,0 @@ --- G.api.nvim_buf_create_user_command( "*.py", "R" , "!python3 %", { complete = true }) --- G.cmd[[command! R !python3 %]] --- G.cmd[[command! -range C ,]] - - - diff --git a/lua/lsp/pyright.lua b/lua/lsp/pyright.lua index 97aeadd..ca5e390 100644 --- a/lua/lsp/pyright.lua +++ b/lua/lsp/pyright.lua @@ -1,2 +1,5 @@ return { + on_attach = function() + G.cmd[[command! R !python3 %]] + end }