Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix LDoc annotation #122

Merged
merged 1 commit into from
May 20, 2024
Merged

fix LDoc annotation #122

merged 1 commit into from
May 20, 2024

Conversation

sharpchen
Copy link
Contributor

@sharpchen sharpchen commented May 19, 2024

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

  • support.type.lua
  • storage.type.annotation.lua

Screenshots

before after
after before

@fisheva
Copy link
Owner

fisheva commented May 20, 2024

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

@sharpchen
Copy link
Contributor Author

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
Copy link
Contributor Author

sharpchen commented May 20, 2024

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
Copy link
Owner

fisheva commented May 20, 2024

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
Copy link
Owner

fisheva commented May 20, 2024

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 fisheva merged commit f91f98c into fisheva:master May 20, 2024
@fisheva
Copy link
Owner

fisheva commented May 20, 2024

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
Copy link
Owner

fisheva commented May 20, 2024

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
Copy link
Contributor Author

sharpchen commented May 20, 2024

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

  • What kind of keyword or identifier are expected to be bold
  • What kind of keyword or identifier are expected to be italic
  • What kind of keyword or identifier are expected to be bold and italic
  • Is there any difference for token colors between italic/bold/italic-bold and normal variant?

@fisheva fisheva mentioned this pull request May 21, 2024
@fisheva
Copy link
Owner

fisheva commented May 21, 2024

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

All token colors are the same in all variants.

@sharpchen
Copy link
Contributor Author

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

@fisheva
Copy link
Owner

fisheva commented May 23, 2024

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

@fisheva
Copy link
Owner

fisheva commented May 27, 2024

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

@sharpchen
Copy link
Contributor Author

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
Copy link
Owner

fisheva commented May 28, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants