LuaLS / LuaLS/lua-language-server
Feature: Adding support for custom @tags
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Lua
- Estrellas
- 4.4k
- Forks
- 442
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
One of the nice things with LDoc was the ability to define custom tags, so they could be used to give additional annotations.
As an example, this is the tags section of one of our projects.
custom_tags = {
{"baseclass", title = "BaseClass", hidden = true},
{"state", title = "State", hidden = true},
{"warns", title = "Warnings", format = function(...)
return "<span class='tag-warning'>" .. markup(...) .. "</span>"
end},
{"bugs", title = "Known Issues", format = function(...)
return "<span class='tag-bugs'>" .. markup(...) .. "</span>"
end},
{"deprecated", title = "Deprecated", format = function(str)
if str == "" then
return "<span class='tag-deprecated'>This function is deprecated and may be removed in a future version.</span>"
else
return "<span class='tag-deprecated'>This function is deprecated and may be removed in a future version.<br>" .. markup(str) .. "</span>"
end
end},
{"internal", title = "Internal", format = function(str)
if str == "" then
return "<span class='tag-internal'>This function is internal. Whilst you can call it, you probably shouldn't.</span>"
else
return "<span class='tag-internal'>This function is internal. Whilst you can call it, you probably shouldn't.<br>" .. markup(str) .. "</span>"
end
end}
}
Even if these aren't used internally, being able to define them for LuaLS to parse and export from the docs exporter in the json document would allow us to do post-processing on the files.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza localizando el exportador de documentación y el documento JSON que produce, y luego sigue cómo se analizan y exportan las anotaciones de Lua. Define cómo deben representarse en el JSON exportado las entradas de custom_tags, incluidos los títulos, los indicadores ocultos y las funciones de formato; se considerará terminado cuando las etiquetas personalizadas puedan analizarse y procesarse posteriormente sin requerir un uso interno.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- lua
- Área
- documentation
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100