kawre / leetcode.nvim

A Neovim plugin enabling you to solve LeetCode problems.
MIT License
1.05k stars 46 forks source link

Problem List issues #8

Closed kawre closed 11 months ago

kawre commented 11 months ago

If your problem list is not loading correctly after updating leetcode.nvim, it's because i've updated the structure of it. To fix it either go to Menu > Cache > Update or delete .problemlist in leetcode.nvim home directory so it automatically gets updated next time you try to access it.

BenjaminHor commented 11 months ago

I noticed that my problem list as well as the problem descriptions no longer have color, they're just displayed as plain text. Screenshot 2023-10-12 at 20 39 15

kawre commented 11 months ago

@BenjaminHor Does this still happen when you restart neovim?

BenjaminHor commented 11 months ago

Yes, I am currently on

branch master
commit 401582b
kawre commented 11 months ago

@BenjaminHor what is your neovim version?

BenjaminHor commented 11 months ago
NVIM v0.9.2
Build type: Release
LuaJIT 2.1.0-beta3
kawre commented 11 months ago

Can you tell me the name of the theme you are using

BenjaminHor commented 11 months ago

bluz71/vim-nightfly-colors

kawre commented 11 months ago

Can you show me your leetcode.nvim config

BenjaminHor commented 11 months ago
return {
    "kawre/leetcode.nvim",
    build = ":TSUpdate html",
    -- enabled = false,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
        "nvim-telescope/telescope.nvim",
        "nvim-lua/plenary.nvim", -- required by telescope
        "MunifTanjim/nui.nvim",

        -- optional
        -- "nvim-tree/nvim-web-devicons",

        -- recommended
        "rcarriga/nvim-notify",
    },
    opts = {
        -- configuration goes here
        domain = "com", -- For now "com" is the only one supported

        ---@type lc.lang
        lang = "python3",

        ---@type lc.sql_lang
        sql = "mysql",

        ---@type string
        directory = vim.fn.stdpath("data") .. "/leetcode/",

        ---@type boolean
        logging = true,

        console = {
            open_on_runcode = true,
            size = {
                width = "50%", ---@type string | integer
                height = "50%", ---@type string | integer
            },
            dir = "row", ---@type "col" | "row"
        },

        description = {
            width = "40%", ---@type string | integer
        },
        arg = "leet",
    },
    config = function(_, opts)
        vim.keymap.set("n", "<leader>lq", "<cmd>LcTabs<cr>")
        vim.keymap.set("n", "<leader>lm", "<cmd>LcMenu<cr>")
        vim.keymap.set("n", "<leader>lc", "<cmd>LcConsole<cr>")
        vim.keymap.set("n", "<leader>ll", "<cmd>LcLanguage<cr>")
        vim.keymap.set("n", "<leader>ld", "<cmd>LcDescriptionToggle<cr>")
        vim.keymap.set("n", "<leader>lr", "<cmd>LcRun<cr>")
        vim.keymap.set("n", "<leader>ls", "<cmd>LcSubmit<cr>")
        vim.keymap.set("n", "<leader>lp", "<cmd>LcList<cr>")
        require("leetcode").setup(opts)
    end,
}
kawre commented 11 months ago

So it just randomly stopped highlighting or after some update? Does the rest of the plugin work?

BenjaminHor commented 11 months ago

The rest of the plugin works fine for me, it's just the highlighting that has stopped. It's not a big deal to be honest but I wanted to bring it up just in case.

kawre commented 11 months ago

If you boot into leetcode.nvim and run :hi can you find any LeetCode... highlights? image

BenjaminHor commented 11 months ago

None whatsoever whereas there are highlights for other plugins.

Screenshot 2023-10-13 at 14 27 45

kawre commented 11 months ago

@BenjaminHor can you add branch = "dev" inside leetcode.nvim lazy config and tell me if it changed anything?

kawre commented 11 months ago

Fix is on master branch now. Let me know if it fixed your issue..

BenjaminHor commented 11 months ago

It looks good, thanks so much!