kawre / leetcode.nvim

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

injector not working for python3 #55

Closed odev-swe closed 8 months ago

odev-swe commented 8 months ago

Hi @kawre and sorry to disturb you, recently i just use your plugin to do my leetcode exercise but i found that when I use python3 as a language is not work when comes to List (doesn't import at the starting point)

return {
    "kawre/leetcode.nvim",
    build = ":TSUpdate html",
    dependencies = {
        "nvim-telescope/telescope.nvim",
        "nvim-lua/plenary.nvim", -- required by telescope
        "MunifTanjim/nui.nvim",

        -- optional
        "nvim-treesitter/nvim-treesitter",
        "rcarriga/nvim-notify",
        "nvim-tree/nvim-web-devicons",
    },
    opts = {
        -- configuration goes here
        lang = "python3",
        injector = { ---@type table<lc.lang, lc.inject>
            ["python"] = {
                before = "from typing import List",
            },

            ["python3"] = {
                before = "from typing import List",
            },
        },
    },
}

Problem not showing the code suggestion since List is not imported

Screenshot 2024-01-31 at 9 22 23 PM
kawre commented 8 months ago

It only injects the code when you create a new file, so if you open a problem that you have already created a file for it will not inject it.

If it still doesn't work let me know

odev-swe commented 8 months ago

@kawre Oh it's working perfectly fine, thank you for the fast response