Something went wrong. Try again.
A Neovim plugin for interactive OpenTofu applies
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960--- Main entry point for tfapply.nvim--- Handles plugin initialization and public API
local M = {}
local has_setup = false
--- Setup the plugin with user configuration--- @param opts table|nil User configuration optionsfunction M.setup(opts) if has_setup then return end has_setup = true
-- Check Neovim version requirement (0.10+) if vim.fn.has('nvim-0.10') == 0 then vim.notify('tfapply.nvim requires Neovim 0.10 or newer', vim.log.levels.ERROR) return end
-- Merge user configuration with defaults local config = require('tfapply.config') config.merge_with(opts or {})
-- Validate configuration local valid, err = config.validate() if not valid then vim.notify('tfapply.nvim: Invalid configuration - ' .. err, vim.log.levels.ERROR) return endend
--- Run terraform apply (full apply)function M.apply() require('tfapply.commands').apply()end
--- Run terraform apply on the resource under cursorfunction M.apply_hover() require('tfapply.commands').apply_hover()end
--- Run terraform apply on all resources in current filefunction M.apply_file() require('tfapply.commands').apply_file()end
--- Run terraform initfunction M.init() require('tfapply.commands').init()end
--- Close the terraform terminal windowfunction M.close_terminal() require('tfapply.terminal').close()end
return M