summaryrefslogtreecommitdiff
path: root/lua/intellij_to_vscode/intellij_to_vscode.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/intellij_to_vscode/intellij_to_vscode.lua')
-rw-r--r--lua/intellij_to_vscode/intellij_to_vscode.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/lua/intellij_to_vscode/intellij_to_vscode.lua b/lua/intellij_to_vscode/intellij_to_vscode.lua
new file mode 100644
index 0000000..a2bfa78
--- /dev/null
+++ b/lua/intellij_to_vscode/intellij_to_vscode.lua
@@ -0,0 +1,11 @@
+-- This file makes the plugin load on startup and provide command if not already created
+if vim.fn.exists(":ITVConvert") == 0 then
+ vim.api.nvim_create_user_command("ITVConvert", function()
+ local ok, err = pcall(function()
+ require("intellij_to_vscode").convert_all()
+ end)
+ if not ok then
+ vim.notify("ITVConvert failed: " .. tostring(err), vim.log.levels.ERROR)
+ end
+ end, {})
+end