Open AgatZan opened 3 months ago
Awesome PR! Just a couple of questions:
Thanks for the awesome work, I was aiming to implementing stuff like this in a near future whenever I was a little more free from work.
Awesome PR! Just a couple of questions:
- Why did you revert the CI implementation?
- Could you provide an example of a custom selector in the README? or even here, so I can test it works properly.
- With the provided changes, I'm unable to make the plugin work. Could you provide your configuration to test it?
Thanks for the awesome work, I was aiming to implementing stuff like this in a near future whenever I was a little more free from work.
In general, in order to start covering the repository with tests
function(templatenames)
-- Sync call ui.select
-- See: https://github.com/mfussenegger/nvim-dap/blob/66d33b7585b42b7eac20559f1551524287ded353/lua/dap/ui.lua#L55
local co = coroutine.running()
local choicer = function(choice)
if not choice then
vim.notify(
"[esqueleto] No template selected, leaving buffer empty",
vim.log.levels.INFO
)
end
coroutine.resume(co, choice)
end
-- I don't know reason to use that
-- choicer = vim.schedule_wrap(choicer)
vim.ui.select(templatenames, { prompt = "Select skeleton to use:" }, choicer)
return coroutine.yield()
end
I took the very idea of implementing this from here
nevertheless, after checking, I have it open on simple files
Perfect, I will do some work now dedicated to CI/CD so I can release a new version.
I noticed it, just thought you may have implemented something custom on your config (like a Telescope selector or something like that). I'll give it a go to implement new selectors locally, but for now this works as intended.
Regarding point 3. I made a mistake on my side, that's why it didn't work. It works as intended so, don't worry.
Overall the PR is great, just some stylistic differences that can be revised. Will merge on the weekend after going through everything in the case I need some changes. Thanks!
Haven't merged this since its not working on my local version. Will try to see how I can incorporate this in the coming version. For now I will let it as is and get back to it whenever I finish the other things I'm developing for the plugin.
Could you provide a screen recording of this working? havent been able to make it work in my local version
Could you provide a screen recording of this working? havent been able to make it work in my local version
plugin/esqueleto.lua
return {
"AgatZan/esqueleto.nvim",
---@type Esqulato.config
opts = {
patterns = { "python" },
},
}
It`s test builtin selector
Also work with esqueleto.selectors.telescope
but if you use lazy
this may be obvious, but at opts
selector=require("esqueleto.selectors.telescope")
throw error, so configurate at config = function()
It indeeds works, dont know why it would not work on my computer. What version of Neovim are you using? I generally work in nightly for plugin dev.
NVIM v0.10.1 Build type: Release LuaJIT 2.1.1713484068
I test it with minimal-minimal setup.
DEV_DIR = "~/nvim-plug/esqueleto.nvim"
vim.opt.rtp:prepend(DEV_DIR)
require("esqueleto").setup({patterns = {"python"}}
And only 1 that i found, that i should decorate if selectors/builtin.lua
choicer
I didnt get what you refer to. I prefer you test things with the lazy-based minimal example since the vast majority of user use lazy for pkg management.
I think it doesn't really matter, but i test and it works
Are you cleaning the plugins whenever you launch neovim? I'm using CLI neovim and use the NVIM_APPIMAGE environmental variable to ensure no other plugins are being loaded. I don't know if there is an equivalent in Neovide.
I removed all cached plugins and used a minimal setup and use cli nvim. I had no problems.
Lost for words here. Will have to deep dive into telescope to see what is the problem. Thanks for your help
inserttable
pattern isnil
. Ifgettemplates
encountersnil
, it will not process it.UI
when selecting a template process. ( async or not)