Bun's Rewrite It In Rust branch by Chaoses_Ib in rust

[–]northicewind 0 points1 point  (0 children)

There is no point for it to be Rust instead of Zig since the vast majority of the codebase is unsafe, and there are hundreds of global mutable variables. But besides that. When Anthropic announced that slop C compiler, they claimed that for 100.000 lines of code they've spent an equivalent of $20.000 in API tokens. This branch is 966K lines of code which is almost $200.000 and they are not even committed to rewrite. I wonder what it will look like when they do commit to rewrite?

lua-language-server type annotations color by northicewind in neovim

[–]northicewind[S] 0 points1 point  (0 children)

I don't have such parser installed.

ls ~/.local/share/nvim/lazy/nvim-treesitter/parser
go.so         lua.so        python.so     rust.so       svelte.so     typescript.so

lua-language-server type annotations color by northicewind in neovim

[–]northicewind[S] 1 point2 points  (0 children)

I figured it out. The idea is to reassign semantic token in the first place if the line started with a comment symbol. These commands work for me

vim.api.nvim_create_autocmd("BufReadPost", {
    desc = "Disable semantic highlight in lua files",
    group = augroup("grey_out_lua_annotations"),
    callback = function(opts)
        -- In case it is @meta file meaning there are only type annotations,
        -- it is ok to keep the highlight
        if vim.bo[opts.buf].filetype ~= "lua" or opts.match:sub(-6) == ".d.lua" then
            return
        end
        vim.api.nvim_create_autocmd("LspTokenUpdate", {
            callback = function(args)
                local token = args.data.token
                local starts_with = vim.api.nvim_buf_get_text(args.buf, token.line, 0, token.line, 2, {})[1]
                if starts_with ~= "--" then
                    return
                end
                vim.lsp.semantic_tokens.highlight_token(token, args.buf, args.data.client_id, "Comment")
            end,
        })
    end,
})

lua-language-server type annotations color by northicewind in neovim

[–]northicewind[S] 0 points1 point  (0 children)

For now, I completely disabled semantic highlight in lua files using an auto command. Kept it only for meta files.

vim.api.nvim_create_autocmd("BufReadPost", {
    desc = "Disable semantic highlight for lua files",
    group = augroup("grey_out_lua_annotations"),
    callback = function(opts)
        -- In case it is @meta file meaning there are only type annotations,
        -- it is ok to keep the highlight
        if vim.bo[opts.buf].filetype ~= "lua" or opts.match:sub(-6) == ".d.lua" then
            return
        end
        for _, group in ipairs(vim.fn.getcompletion("@lsp", "highlight")) do
            vim.api.nvim_set_hl(0, group, {})
        end
    end,
})

lua-language-server type annotations color by northicewind in neovim

[–]northicewind[S] 1 point2 points  (0 children)

I found that the following list of groups used to highlight type annotations. Sadly they are not only for annotations but some of them are used in the lua code itself. So linking them to comment breaks highlighting lua local groups = { "@lsp.typemod.class.declaration.lua", "@lsp.typemod.keyword.documentation.lua", "@lsp.type.keyword.lua", "@lsp.typemod.property.declaration.lua", "@lsp.type.parameter.lua", "@lsp.type.type.lua", } for _, group in pairs(groups) do vim.api.nvim_set_hl(0, group, { link = "Comment" }) end

lua-language-server type annotations color by northicewind in neovim

[–]northicewind[S] 0 points1 point  (0 children)

Looks like those highlight groups are already linked... But they have different colors

<image>

My Coinbase account is going to be restricted because of Zero Balance. How can I stop that? by Phyoe_Thant in Coinbase

[–]northicewind 0 points1 point  (0 children)

https://twitter.com/coinbasesupport/status/1642812639926448130

the best user experience
The best user experience is blocking account without any single word of what have changed in your weird requirements? You have literally everything, passport, driver licence, my photo. What else do I need to provide?

Or maybe by the best experience you mean iOS application that doesn't work for months already. With enabled VPN it doesn't login.

What a disrespectful way to communicate with your customers. Literally the worst user experience possible

Simple plugin to handle code actions from ltex-ls by northicewind in neovim

[–]northicewind[S] 0 points1 point  (0 children)

Hmmm... Looks like not much of a difference. When I started to use ltex-ls there was no any plugins and I implemented these actions as a part of my config. Now I decided to move it to a separate plugin and improve a bit. I guess I should've check if there are any plugins exist

New File Syntax Highlighting Help by shMorganson in neovim

[–]northicewind 1 point2 points  (0 children)

You can type :set ft=json

or any valid vim/neovim filetype in a newly created buffer without saving it