-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
No syntax highlighting for the http file #30
Comments
Hey, thank you for using it! Have you tried using other colorscheme? Maybe yours is missing some highlighting groups. Regards |
@NTBBloodbath I have a file with lot highlighting groups defined with different colors. When I don't source that file in |
Hmm that's weird, aren't you clearing some colors? Try opening a http file and then running Also, are you lazy-loading I was doing some tests for a Treesitter parser for the http files to ditch these |
@NTBBloodbath I tried reinstalling use {
"NTBBloodbath/rest.nvim",
requires = { "nvim-lua/plenary.nvim" },
config = function()
require('rest-nvim').setup()
end
} Error after doing output.mp4Then, when I add the use {
"NTBBloodbath/rest.nvim",
ft = "http",
requires = { "nvim-lua/plenary.nvim" },
config = function()
require('rest-nvim').setup()
end
} output.mp4So , after installing output.mp4 |
For now I have added an vim.api.nvim_exec([[
augroup HttpFiletype
autocmd!
autocmd BufNewFile,BufRead *.http set ft=http
augroup end
]],false) Now the syntax highlighting works even if I lazy load plugin with |
@NTBBloodbath I can confirm this issue. The issue is there since moving to setup() approach - there is no event listening to fire @ashishbinu if you comment the augroup section, restart nvim, go to the http buffer and type
this should give the proper highlighting. |
Yes, running the above command enables the syntax highlighting. |
Hey, can you try lazy-loading use({
'NTBBloodbath/rest.nvim',
requires = 'nvim-lua/plenary.nvim',
config = function()
require('rest-nvim').setup()
end,
event = 'BufEnter',
}) |
I tried this lazy loading in my config...but it didn't make a difference it only syntax highlighting when I opened file like |
Hmm that's some weird stuff. I'll leave it opened while I develop the http treesitter parser so we can revert the setup stuff and use a ftdetect file again |
Hey, I was finally able to start with the tree-sitter parser. Still a lot of stuff to be done but hopefully it should be ready for daily usage in a few days, here's the current progress Also here is the repository with the actual work if someone has knowledge parsing stuff, regex and tree-sitter and wants to help |
Hey, so after a while we are ready to go with the treesitter parser. I'll add instructions for using it (it seems that I'll need to send a PR to nvim-treesitter or something like that for adding it to be able to install it by using |
… lazy-loading. Closes rest-nvim#30
First of all thanks for this amazing plugin.
I was trying out this plugin but the http file is not getting syntax highlighted as shown in the image in readme. The response is getting highlighted correctly.
The text was updated successfully, but these errors were encountered: