docs: removed warning from c files about early build issues

This commit is contained in:
DarthMooMancer
2025-05-07 10:45:21 -04:00
parent bb9efdbd8a
commit cac1fdb02c
4 changed files with 16 additions and 36 deletions
+10 -16
View File
@@ -6,26 +6,23 @@ local Layout = require("nui.layout")
local event = require("nui.utils.autocmd").event
local Path = require("plenary.path")
---@type table
local M = {}
---@type table
M.loaded_languages = {}
---@param lang string
---@param opts table?
---@return boolean
---@type table
M.keybinds = {}
-- Load language opts based on filetype
function M.load_language_module(lang, opts)
if M.loaded_languages[lang] then return true end
local ok, lang_module = pcall(require, "Polydev.languages." .. lang)
if ok and lang_module.setup then
local lang_opts = opts and opts[lang] or {}
lang_module.setup(lang_opts)
M.loaded_languages[lang] = lang_module
return true
end
return false
local ok, mod = pcall(require, "Polydev.languages." .. lang)
if not ok or type(mod.setup) ~= "function" then return false end
mod.setup(opts and opts[lang] or {})
M.loaded_languages[lang] = mod
return true
end
-- Get entries in a given path
@@ -392,9 +389,6 @@ local function open_filtered_table()
render()
end
---@type table
M.keybinds = {}
local function setupKeybinds(opts)
M.opts = {}