ccaglak / namespace.nvim

Neovim Php Namespace Resolver
MIT License
26 stars 4 forks source link

extention dosn't work for me on lazyvim #3

Closed mk990 closed 10 months ago

mk990 commented 10 months ago

i add it to lazyvim in this dir lua/plugin/namespace.lua

return {
    {
        "ccaglak/namespace.nvim",
        keys = {
            { "<leader>la", "<cmd>GetClasses<cr>", desc = "Get Classes" },
            { "<leader>lc", "<cmd>GetClass<cr>", desc = "Get Class" },
            { "<leader>ls", "<cmd>AsClass<cr>", desc = "As Class" },
            { "<leader>ln", "<cmd>Namespace<cr>", desc = "Namespace" },
        },
        dependencies = {
            "nvim-lua/plenary.nvim",
        },
    },
}

i can get commands but its not working

ccaglak commented 10 months ago

i add it to lazyvim in this dir lua/plugin/namespace.lua

return {
    {
        "ccaglak/namespace.nvim",
        keys = {
            { "<leader>la", "<cmd>GetClasses<cr>", desc = "Get Classes" },
            { "<leader>lc", "<cmd>GetClass<cr>", desc = "Get Class" },
            { "<leader>ls", "<cmd>AsClass<cr>", desc = "As Class" },
            { "<leader>ln", "<cmd>Namespace<cr>", desc = "Namespace" },
        },
        dependencies = {
            "nvim-lua/plenary.nvim",
        },
    },
}

i can get commands but its not working

Hi mk990, I have tested on lazyvim and it works on mac. you must have ripgrep installed and php json treesitters parsers. if everything checks. Whats your operating system?

mk990 commented 10 months ago

i use linux also i installed ripgrep , php json in treesitters any way to check log file or debug ??

ccaglak commented 10 months ago

i will look into it, i just updated package check it out it might have fixed the issue

ccaglak commented 10 months ago

i apoligize, i messed it up. everything is good now. i will run a virtual machine to see how it works on linux tomorrow

mk990 commented 10 months ago

yes i see that but its not working in linux any way to debug it?

ccaglak commented 10 months ago

getClass.lua is the main file

_G.dd = function(...)
    local obj = select("#", ...) == 1 and select(1, ...) or { ... }
    local s = type(obj) == "string" and obj or vim.inspect(obj)
    if vim.in_fast_event() then
        vim.schedule(function()
            print(s)
        end)
    else
        print(s)
    end
end

make sure you have .git or composer.json vendor in your project root check the values

ccaglak commented 10 months ago

which distro do you use

mk990 commented 10 months ago

archlinux

ccaglak commented 10 months ago

tomorrow around this time it will be fixed. thanks

mk990 commented 10 months ago

thank you

ccaglak commented 10 months ago

update it, and try again

mk990 commented 10 months ago

no not working

ccaglak commented 10 months ago

i've found one bug in namespace generater but everything else was working just fine. my virtualmachine was arch 24.01 tested on both neovim 9-10 with lazyvim conf.

mk990 commented 10 months ago

no i update and it not working it something wrong with my config

return {
    {
        "ccaglak/namespace.nvim",
        keys = {
            { "<leader>la", "<cmd>GetClasses<cr>", desc = "Get Classes" },
            { "<leader>lc", "<cmd>GetClass<cr>", desc = "Get Class" },
            { "<leader>ls", "<cmd>AsClass<cr>", desc = "As Class" },
            { "<leader>ln", "<cmd>Namespace<cr>", desc = "Namespace" },
        },
        dependencies = {
            "nvim-lua/plenary.nvim",
        },
    },
}