Giter Club home page Giter Club logo

Comments (7)

Olical avatar Olical commented on May 29, 2024

Hi there! Sorry that you're having issues with this, it's almost definitely a timing related issue since it's intermittent. When and where do you configure your localleader key in your configuration? If you, temporarily, configure your local leader just before you manually initialise Conjure that'll tell us a lot. If the problem goes away then we know it's because sometimes the localleader key is being set after Conjure tries to initialise.

-- For example...
vim.g.maplocalleader = "\\"
require("conjure.main").main()
require("conjure.mapping")["on-filetype"]()

The other thing to try would be to remove the lazy loading entirely, just let Conjure load it's core which lazily loads the rest of the modules when they're required as you enter supported filetypes. You could even let Conjure's core load but configure it to only work with Scheme buffers

conjure/doc/conjure.txt

Lines 257 to 272 in f50d4db

*g:conjure#filetypes*
`g:conjure#filetypes`
A list of filetypes Conjure should be associated with. Conjure
will then look up which client module to use for this filetype
using `g:conjure#filetype#[filetype]`, which should be a string
that resolves to a Lua module that adheres to the
|conjure-clients| interface.
Conjure will only initialise for filetypes in this list. It also
will not load if the file type is in this list but there isn't an
equivalent `g:conjure#filetype#[filetype]` configuration value.
Default: >
["clojure", "fennel", "janet", "hy", "julia", "racket",
"scheme", "lua", "lisp", "python", "rust", "sql"]
<

So you could set that list to just Scheme and see how that behaves / impacts your startup. The core of Conjure that loads and creates the filetype autocmd to load everything else is pretty tiny. The entire plugin is designed to lazily load all of it's internal modules as late as possible.

I'll still try to help you work out the issue with the current setup, but this is just another suggestion that might help you move forward.

from conjure.

mrmodolo avatar mrmodolo commented on May 29, 2024

Hi!

I try to use vim.g.maplocalleader = "\" like you said but it had no effect. I put lazy = false but I don't know if that's what you meant, it's also set to scheme only.

return {
	"Olical/conjure",
	ft = { "scheme" },
	dependencies = {
		{
			"PaterJason/cmp-conjure",
			config = function()
				local cmp = require("cmp")
				local config = cmp.get_config()
				table.insert(config.sources, {
					name = "buffer",
					option = {
						sources = {
							{ name = "conjure" },
						},
					},
				})
				cmp.setup(config)
			end,
		},
	},
	config = function()
		vim.g.maplocalleader = "\\"
		require("conjure.main").main()
		require("conjure.mapping")["on-filetype"]()
	end,
	init = function()
		-- Set configuration options here
		vim.g["conjure#debug"] = true
	end,
	lazy = false,
}

This is my current configuration, I discovered another way to activate the menu with \ I press <leader> g to show the menu and then the ESC key, from that moment on the \ key works again.

Regards,
Marcelo Módolo

from conjure.

Olical avatar Olical commented on May 29, 2024

Sorry for the delay, had a very busy week! That's very very odd, so \ doesn't work until you press <leader>g, then after that point you can use \ as your local leader no problem? This still feels like an issue to do with lazy loading to me, maybe not Conjure but maybe some other plugin that has some other config that loads later because of some filetype or event.

I'm afraid I can't think of any tips right now, everything looks okay to me in general, maybe try ruling out laziness by disabling globally? Just to check if it's a race condition somewhere? I've never run into this myself so I don't have much advice to offer 😞

from conjure.

mrmodolo avatar mrmodolo commented on May 29, 2024

Sorry for the delay, had a very busy week! That's very very odd, so \ doesn't work until you press <leader>g, then after that point you can use \ as your local leader no problem? This still feels like an issue to do with lazy loading to me, maybe not Conjure but maybe some other plugin that has some other config that loads later because of some filetype or event.

I'm afraid I can't think of any tips right now, everything looks okay to me in general, maybe try ruling out laziness by disabling globally? Just to check if it's a race condition somewhere? I've never run into this myself so I don't have much advice to offer 😞

Hi!
No problem, I've gotten the hang of it, and it's not such a bad thing.

Thanks,
marcelo Módolo

from conjure.

Olical avatar Olical commented on May 29, 2024

Hm okay then, I still think this is something local to your config somehow and not really something I can fix, I'm just sorry you're having to deal with it. Are you happy to close this issue for now and re-open if you can reproduce it with a minimal configuration that I can also reproduce with? Or if someone else turns up with the same issue of course.

from conjure.

mrmodolo avatar mrmodolo commented on May 29, 2024

Hm okay then, I still think this is something local to your config somehow and not really something I can fix, I'm just sorry you're having to deal with it. Are you happy to close this issue for now and re-open if you can reproduce it with a minimal configuration that I can also reproduce with? Or if someone else turns up with the same issue of course.

from conjure.

mrmodolo avatar mrmodolo commented on May 29, 2024

Hi!

I did a test on another lazyvim installation (another computer) and the behavior was the same, but it could be the result of other installed plugins. But it's no reason to waste time, otherwise everything works very well.

Thanks,
Marcelo Módolo

from conjure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.