fisheva / Eva-Theme

A comfortable and semantic theme.
https://marketplace.visualstudio.com/items?itemName=fisheva.eva-theme
MIT License
452 stars 38 forks source link

fix LDoc annotation #122

Closed sharpchen closed 4 months ago

sharpchen commented 4 months ago

Code sample

---@alias Record table<string, any>
---@type Record
local t = {
    key = 'value'
}
--- merge two tables
---@param this table
---@param other table
---@return table
table.merge = function(this, other)
    for key, value in pairs(other) do
        if not this[key] then
            this[key] = value
        end
    end
    return this
end

Scopes

Screenshots

before after
after before
fisheva commented 4 months ago

I don't know Lua. Does it mean they are Class not Data type ?

sharpchen commented 4 months ago

LDoc is similar to jsdoc, can define type alias in comment. The table is the built-in type structure in lua, but the identifier can be any custom type defined in LDoc. Since textmate for lua doesn't provide more detailed rules for built-in type(like table, string) and I do think color for types has a wider range for this, so I made it like so.

sharpchen commented 4 months ago

And I'm currently developing the Eva-Theme for Neovim and I apologize for not seeking permission beforehand. If you think it's not the appropriate time or I'm not the right person for this, I will remove the repository.

fisheva commented 4 months ago

I'm sorry! I haven't replied to your first reply about the Neovim version yet. I didn't even notice that it was you, I'm so sorry!

I originally planned to reply to you there after I figured out how to synchronize the organization and personal repository. I'm trying these days after work.

I want to say, of course, you can! From the historical pull requests you submitted, I can see your meticulousness and seriousness. I feel so happy and honored to gain a teammate like you!

fisheva commented 4 months ago

I asked ChatGPT about how to synchronize organizational and personal repository and tried following the steps it told me, but it has failed so far. WX20240520-220613@2x

When I clicked on this workflow record, it went to the "Oops! 500" page. I am planning to consult the GitHub Contact Support. WX20240520-220821@2x

fisheva commented 4 months ago

The content of this pull request has been updated to version 2.6.3.

When I successfully complete the workflow of automatically synchronizing organizational and personal repositories, I will open a Neovim version repository in the Eva Theme organization and organize my synchronization process into a document, telling you how to operate it. Wait my news, thanks!

fisheva commented 4 months ago

If you have completed the preliminary version of Eva Theme for Neovim and released it in Neovim's plugin market, you can send me the plugin link and I will write it into README. WX20240520-231210@2x

sharpchen commented 4 months ago

Ok, glad to hear that. I'm going to style bold, italic and italic bold variants next, I wonder:

fisheva commented 4 months ago

I updated a new document: font-style-rules.

All token colors are the same in all variants.

sharpchen commented 4 months ago

should key word operator like and/or in some languages be italic or bold?

fisheva commented 4 months ago

In bold variant, and/or are bold. In italic variant, words and/or are italic, but symbol operators like && || (JS) are normal.

fisheva commented 4 months ago

I posted a question on the Github community: How to Automatically Sync Personal and Organization Repositories Using GitHub Actions?

sharpchen commented 4 months ago

I just done the first release :)

If you have completed the preliminary version of Eva Theme for Neovim and released it in Neovim's plugin market, you can send me the plugin link and I will write it into README.

NeoVim doesn't have any plugin market, github itself is the place we fetch plugins, so a repository link is suffice.

fisheva commented 4 months ago

Great! Your links are now here. 企业微信截图_20240528185743