-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support for [doc('some comment')]
syntax
#97
Comments
😕 We don't have this commit in our repo. Support for How have you installed |
I install vim-just via lazy.nvim: return {
{
"NoahTheDuke/vim-just",
ft = "just",
},
} Yes, I also see this problem with |
Weird, your install code is working as expected for me & that problem isn't occurring in testing. It will be hard to troubleshoot this much further without knowing where the Are you able to use commit 6858181 ? Also, just now noticed the working portions of your screenshots have highlighting of non-quoted command-line arguments in recipe bodies ( |
Doh, the commit was a typo—it was the commit for My vim-just has commit |
Are you using local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or 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",
ft = "just",
},
{"nvim-treesitter/nvim-treesitter", build = ":TSUpdate",
config = function ()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "just" },
highlight = { enable = true },
})
end
},
}) |
As I said above, manually calling vim.api.nvim_create_autocmd("FileType", {
pattern = "just",
callback = function(_)
vim.bo.syntax = "just"
vim.notify(
"Syntax was set to 'just' | Effective syntax is now: '" .. vim.cmd("set syn?") .. "'",
vim.log.levels.INFO,
{ title = "Neovim" }
)
end,
}) This prints:
|
I do use nvim-treesitter, but my config doesn't enable its "just" syntax as far as I can tell. However, I did find a
Perhaps this is a relic from having enabled "just" in treesitter in the past (see timestamp of May 20th). I'll try deleting the |
Cool, you're welcome! I think we should add to our README instructions about disabling
|
If tree-sitter brings other benefits other than syntax highlighting, and you want to keep those while using {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function ()
local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "just" },
highlight = {
enable = true,
disable = { "just" },
},
})
end
}, |
Thanks for the tip in your last comment. I am going with such a setup for the time being. Here's my nvim-treesitter setup, in case it helps others reading this. highlight = {
enable = true,
disable = function(language, bufnr)
if language == "just" then
return true
end
-- Other logic to conditionally disable treesitter
-- (e.g., for large buffers) follows, which is the
-- reason why I must use a function for `disable`.
end, |
I saw that support for the recently introduced
doc
attribute is mentioned in the issue #88, which was already marked as completed.However, vim-just seems to fail when parsing a justfile that includes the new
doc
syntax.Environment:
665ef24
Actual behavior
Example justfile:
Result:
Expected behavior
When I remove the
doc
attribute, vim-just parses correctly. This is what I would have expected for the original justfile above.Updated justfile:
Result:
The text was updated successfully, but these errors were encountered: