Fix: indentation errors: add .editorconfig, health check, docs

This commit is contained in:
mathijs-bakker
2025-08-23 14:55:25 +02:00
committed by Mathijs Bakker
parent e1893bc5b7
commit bc46e06d31
5 changed files with 85 additions and 9 deletions

View File

@@ -46,6 +46,23 @@ local function has_exe(name)
return vim.fn.executable(name) == 1
end
local function check_indent()
health.start("Indentation")
local handle = io.popen("grep -P '\t' -R --include='*.gd' --include='*.cs' . 2>/dev/null | head -n 1")
if handle then
local result = handle:read("*a")
handle:close()
if result ~= "" then
health.warn(
"Mixed indentation detected (tabs found in .gd or .cs files). Godot expects spaces, 4 per indent. See :help godotdev-indent"
)
else
health.ok("Indentation style looks consistent (no tabs in .gd or .cs files).")
end
end
end
function M.check()
health.start("Godotdev.nvim")
@@ -132,6 +149,7 @@ Make sure the Godot editor is running with LSP server enabled.
else
health.info(" C# checks skipped (csharp=false)")
end
end
check_indent()
end
return M