Closed AndOrangutan closed 1 year ago
Can you run :lua print(require('headlines').namespace)
, to check if the plugin is installed correctly? It should print a number.
If that works, check if treesitter can parse the current buffer with :lua print(vim.inspect(vim.treesitter.get_parser(0, 'markdown'):parse()))
. This should print something like { <userdata 1> }
.
Also check that the highlight groups are defined correctly with :highlight CodeBlock
I got the same problem and it turns out that I don't have a markdown parser currently installed. How do I fix this?
## Parser/Features H L F I J
- typescript ✓ ✓ ✓ ✓ ✓
- python ✓ ✓ ✓ ✓ ✓
- lua ✓ ✓ ✓ ✓ ✓
- yaml ✓ ✓ ✓ ✓ ✓
- css ✓ . ✓ ✓ ✓
- bash ✓ ✓ ✓ . ✓
- vim ✓ ✓ ✓ . ✓
- rust x x ✓ ✓ ✓
- html ✓ ✓ ✓ ✓ ✓
- c ✓ ✓ ✓ ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- json ✓ ✓ ✓ ✓ .
- cpp ✓ ✓ ✓ ✓ ✓
EDIT: I managed to install it with :TSInstallFromGrammer markdown
, however now all is just grey.
here the print for :highlight CodeBlock
@DM1NIK please open a new issue
try this:
use {
'lukas-reineke/headlines.nvim',
after = "nvim-treesitter",
config = function()
require('headlines').setup()
end,
}
pcall will not report errors
Sorry, it has been a minute, but I still can't get this to work.
Here is trying what you suggested.
So it just doesn't seem to be creating the highlights.
:PackerSync
shows it's installed, so I don't really know what to do. I have tried installing and uninstalling it.
If the highlight group is not found, it means setup
is not called.
In your config above, you have confug = function () require('headlines').setup() end
. There is a typo, it should be config
. Maybe that is the problem?
Gosh, I fill quite silly for that one.
Forgive me if I made a stupid error, but I have been up all night trying to figure this out.
I had this plugin working in my previous config and love it, especially for the code blocks. Can't seem to get it to work. Here is what I am working with:
The
print('test')
is a python block. in a python block that I think TS conceals.I have tried reinstalling all plugins (deleting all plugins and packer_compile), and minimizing my config to track down the issue. Here are the relevant Lua files:
plugins.lua
nvim-treesitter.lua
Again, my deepest apologies if this is user error, I just can't figure it out for the life of me.