LuaLS / LuaLS/lua-language-server

Feature: Adding support for custom @tags

Đang mở
#3,314 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Lua
Star
4.4k
Fork
442
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách xác định trình xuất tài liệu và tài liệu JSON mà nó tạo ra, sau đó theo dõi cách các chú thích Lua được phân tích cú pháp và xuất ra. Xác định cách các mục custom_tags, bao gồm tiêu đề, cờ ẩn và các hàm định dạng, nên được biểu diễn trong JSON đã xuất; hoàn thành khi các tag tùy chỉnh có thể được phân tích cú pháp và hậu xử lý mà không yêu cầu sử dụng nội bộ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
lua
Lĩnh vực
documentation
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.