Skip to content
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

[Bug]: astro not working #127

Open
beaumccartney opened this issue Jul 3, 2024 · 5 comments
Open

[Bug]: astro not working #127

beaumccartney opened this issue Jul 3, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@beaumccartney
Copy link

Neovim version

NVIM v0.10.0 Build type: Release LuaJIT 2.1.1716656478 Run "nvim -V1 -v" for more info

Language affected

Astro

Query

No response

Strategy

No response

Description

no rainbow tags like html

minimal repro below, issue reproduces on the astro test file in the repo

local path_package = vim.fn.stdpath('data') .. '/site/'
local mini_path = path_package .. 'pack/deps/start/mini.nvim'
if not vim.loop.fs_stat(mini_path) then
    vim.cmd('echo "Installing `mini.nvim`" | redraw')
    local clone_cmd = {
        'git', 'clone', '--filter=blob:none',
        'https://github.com/echasnovski/mini.nvim', mini_path
    }
    vim.fn.system(clone_cmd)
    vim.cmd('packadd mini.nvim | helptags ALL')
    vim.cmd('echo "Installed `mini.nvim`" | redraw')
end

-- Set up 'mini.deps' (customize to your liking)
require'mini.deps'.setup { path = { package = path_package } }

local add, now, later = MiniDeps.add, MiniDeps.now, MiniDeps.later

add('HiPhish/rainbow-delimiters.nvim')
add({
    source = 'nvim-treesitter/nvim-treesitter',
    checkout = 'master',
    hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
})
require'nvim-treesitter.configs'.setup {
    ensure_installed = {
        'astro',
    },
}
vim.api.nvim_create_autocmd("Filetype", {
    callback = function(ev)
        vim.treesitter.start()
    end,
})
@beaumccartney beaumccartney added the bug Something isn't working label Jul 3, 2024
@HiPhish
Copy link
Owner

HiPhish commented Nov 3, 2024

I have pushed a major update to rainbow-delimiters, can you please try the current master or the tag v0.7.0?

@beaumccartney
Copy link
Author

still not working unfortunately on master or 0.7.0

@HiPhish
Copy link
Owner

HiPhish commented Nov 19, 2024

It should work now, one of the node names had changed. There is a syntax error
in the test file (test/highlight/sample/astro/regular.astro) though. I don't
know Astro, it would be nice if you could correct the file for me so that we
can have proper tests.

@beaumccartney
Copy link
Author

Working correctly now, thanks very much!

I took a look and the file looks correct to me, how do you know there's a syntax error?

@HiPhish
Copy link
Owner

HiPhish commented Dec 8, 2024

I took a look and the file looks correct to me, how do you know there's a syntax error?

Execute :InspectTree and you get a visual representation of the tree and you can see if there is an error. Do note that this could also be a bug in the parser, it is not necessarily that the code is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants