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 }