Closed erikkrieg closed 9 months ago
I can confirm the issue when using lazy.nvim
on Neovim 0.8.3. But it works if instead of using lazy.nvim
, I copy the vim-just
clone that lazy.nvim
created into ~/.config/nvim/pack/vim-just/start/
.
What makes you think this isn't a lazy.nvim
issue?
I haven't dug into code yet, but my hunch is that vim-just has assumptions about when it gets loaded that doesn't account for the lazy loading that lazy.nvim
offers. So this could be a feature request to support lazy as much as a might be a bug.
Alternatively, there is no problem with either and I am just missing options for loading vim-just with lazy.nvim that would make this work. Maybe someone following this repo is already aware something?
I'm not really familiar with Neovim or lazy.nvim
or Lua, but this init.lua
seem to get it working? -
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
"NoahTheDuke/vim-just",
event = { "BufReadPre", "BufNewFile" },
ft = { "\\cjustfile", "*.just", ".justfile" },
})
Cool, I'll give adding the ft
option a try and see what happens. I'll let you know how it goes :)
That seems to work for me, thanks!
I think that we could add this to the install section of the README for future travellers.
That seems to work for me, thanks!
:+1: You're welcome.
I think that we could add this to the install section of the README for future travellers.
That's up to @NoahTheDuke . If he agrees, feel free to submit a pull request with the appropriate code snippet.
@NoahTheDuke let me know if you're down with that and I'll open up a PR.
Yeah of course, go for it.
For anyone who happens on this issue in a search, the recommended instructions for installing vim-just
using lazy.nvim
have been updated since this issue was closed, see https://github.com/NoahTheDuke/vim-just#lazynvim for current instructions.
vim-just does not seem to realize I have an active
just
buffer in some cases.I am running something like:
But vim-just fails to detect that this is a
just
buffer. If I save and quit, then opening the existing file in the same way does work as expected.I have done this test with other languages I have LSP setup for and they do work as expected.
Edit: For additional context, I am using lazy as my plugin manager. Here is where I setup the plugin:
I have confirmed that in the case where vim-just is not syntax highlighting the new Justfile that the vim-just plugin is actually loaded.