-
Notifications
You must be signed in to change notification settings - Fork 40
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
Plugin won't open after 2f9b199e5493c556569ecca5ad08c924706110ea #15
Comments
What is your neovim version |
Try removing |
@kawre NVIM v0.10.0-dev-1378+gc49cfd89fd (neovim-git on arch linux) Same result after removing VeryLazy and updating leetcode.nvim to latest. |
Ok, it actually works if I specify But as I say this necesity was introduced only after the commit I mention. |
It's because i've changed Probably |
Fixed version just in case someone finds this on google return {
-- leetcode.nvim
-- https://github.com/kawre/leetcode.nvim
-- You found an easter egg!
-- To use it, uncomment this, exit nvim and write "nvim leetcode.nvim"
{
"kawre/leetcode.nvim",
lazy = false,
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
"rcarriga/nvim-notify",
},
opts = {
-- HOW TO ENABLE TYPESCRIPT/JAVASCRIPT LINTING FOR THIS PLUGIN
-- -----------------------------------------------------------
-- * Install the eslint packages:
-- npm install @typescript-eslint/eslint-plugin @typescript-eslint/parser
-- * Then copy paste this into ~/.local/share/nvim/leetcode/.eslintrc.json
-- https://pastebin.com/raw/aQXjpLuE
lang = "typescript",
},
config = function(_, opts)
-- Require it only if neovim starts with the argument 'leetcode.nvim'
if vim.tbl_contains(vim.fn.argv(), 'leetcode.nvim') then
require("leetcode").setup(opts)
end
end,
},
} |
@Zeioth The problem with this is that it doesn't achieve anything actually. Having a function checking whether to lazy load |
Did you try it? It works as expected on my end. It might be redundant though if the plugin is already doing the same. |
@kawre it would be cool being able to use the plugin with |
@Zeioth If you are sure that some of the dependencies will load anyway, you can remove them from the dependencies list. Right now my You can also play around with lazy loading and see how it works, as i said before. |
Ok I've been able to fix this by requiring the plugin in {
"kawre/leetcode.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
"rcarriga/nvim-notify",
},
init = function(_, opts)
-- Require only when needed
if vim.tbl_contains(vim.fn.argv(), 'leetcode.nvim') then
require("leetcode").setup(opts)
end
end,
opts = {
lang = "typescript",
},
}, So same fix I had, but on init, to ensure it is applied on startup. |
This is the last commit where I can use
nvim leetcode.nvim
.Any other commit I've tried after that one, won't start leetcode.nvim
My config
Screenshots
Working commit
![screenshot_2023-10-22_03-06-16_573320584](https://private-user-images.githubusercontent.com/3357792/277140297-6113a42f-8df2-487e-8c0f-5618d6d1c755.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NTU5NTMsIm5iZiI6MTcyMzc1NTY1MywicGF0aCI6Ii8zMzU3NzkyLzI3NzE0MDI5Ny02MTEzYTQyZi04ZGYyLTQ4N2UtOGMwZi01NjE4ZDZkMWM3NTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTVUMjEwMDUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Y2ZjMGVjMjBlYWQxY2UzMGE2NGY2MTkxYTllZmU0MzRkMDg5ODEzYzA0ZjE1MGQ2MjZlMmU1NDJkM2ViYjc4MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.8HnR5bXaJhrkddD3_M_3tZfZSleV1rmS7r11Uk7W30s)
After that
![screenshot_2023-10-22_03-06-39_148783201](https://private-user-images.githubusercontent.com/3357792/277140300-e25db491-d965-43d1-9086-f9fae5d22c04.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NTU5NTMsIm5iZiI6MTcyMzc1NTY1MywicGF0aCI6Ii8zMzU3NzkyLzI3NzE0MDMwMC1lMjVkYjQ5MS1kOTY1LTQzZDEtOTA4Ni1mOWZhZTVkMjJjMDQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MTVUMjEwMDUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjExMzUzZjQ2MmYxNTVjOTlmNjRlMWUwNzk0YzI4NzllMThhZGE2NTA4NjNmMWJhOWZkYzRmY2EzMDU3ZmZlYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ZdwMlVXv0dQZ_GprH8NSKyFPGqNuwDnsRIGWD0A1viM)
The text was updated successfully, but these errors were encountered: