Update init.lua
This commit is contained in:
@@ -40,16 +40,6 @@ function M.setup(opts)
|
|||||||
vim.api.nvim_create_user_command("JavaRun", M.run, {})
|
vim.api.nvim_create_user_command("JavaRun", M.run, {})
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_key_for_action(action)
|
|
||||||
for key, cmd in pairs(M.config.keybinds) do
|
|
||||||
if cmd == action then
|
|
||||||
return key
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return nil -- Return nil if the action is not found
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- Open floating terminal
|
-- Open floating terminal
|
||||||
local function open_float_terminal(cmd)
|
local function open_float_terminal(cmd)
|
||||||
local ui = vim.api.nvim_list_uis()[1]
|
local ui = vim.api.nvim_list_uis()[1]
|
||||||
@@ -82,9 +72,6 @@ local function open_float_terminal(cmd)
|
|||||||
vim.api.nvim_win_set_option(win, "cursorline", true)
|
vim.api.nvim_win_set_option(win, "cursorline", true)
|
||||||
|
|
||||||
vim.fn.termopen(cmd)
|
vim.fn.termopen(cmd)
|
||||||
-- vim.cmd("startinsert")
|
|
||||||
|
|
||||||
-- local close_key = get_key_for_action("CloseTerminal")
|
|
||||||
|
|
||||||
vim.api.nvim_buf_set_keymap(buf, "n", M.close_key, "i<C-\\><C-n>:q<CR>", { noremap = true, silent = true })
|
vim.api.nvim_buf_set_keymap(buf, "n", M.close_key, "i<C-\\><C-n>:q<CR>", { noremap = true, silent = true })
|
||||||
return buf, win
|
return buf, win
|
||||||
@@ -131,8 +118,6 @@ public class Main {
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Create a new Java file
|
-- Create a new Java file
|
||||||
function M.create_new_file()
|
function M.create_new_file()
|
||||||
vim.ui.input({ prompt = "Enter class name: " }, function(class_name)
|
vim.ui.input({ prompt = "Enter class name: " }, function(class_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user