Closed weilbith closed 1 year ago
Hi, Have you tried using the setup_highlights function detailed in the README? this manually triggers the highlights for the selected language. If that function works, it is likely the issue is in your configuration
Hmm. So I run this, but it doesn't change anything.
Though, by now I'm a little confused about the dap-repl
.
So if I type p foo + 1 > 0
I don't get any highlights. But I can't call functions for example like p myList.len()
. Maybe I should try it with some other languages and debuggers.
Do you use it with Rust?
Edit:
I figured I can use ?/nat ...
to run native (~> /nat
) Rust expressions.
Closing because I lack in knowledge.
I tried it now with Python because it has full proper REPL support. But still not working. Am confused.
Can you give the output of the :version
command and your configuration?
My version is: NVIM v0.10.0-dev-1913041
And my configuration is basically this:
require('packer').use({
'LiadOz/nvim-dap-repl-highlights',
requires = 'nvim-treesitter/nvim-treesitter',
ft = 'dap-repl',
config = function()
require('nvim-dap-repl-highlights').setup()
end,
run = function()
require('nvim-dap-repl-highlights').setup()
vim.cmd('TSInstall dap_repl')
end,
})
Can you try removing the ft
line?
I did. Unfortunately doesn't help. I also run the :lua require('nvim-dap-repl-highlights').setup_highlights('python')
again. Though if I type some code in the REPL buffer, it just remains the "default" highlight. 🤷🏾
Can I maybe use treesitter tools to inspect things?
You can do the following to check if the issue is in the parsing side:
require('nvim-dap-repl-highlights').setup()
in the config.dap> def hi():
dap> pass
:require('nvim-dap-repl-highlights').setup()
then :lua require('nvim-dap-repl-highlights').setup_highlights('python')
in the scratch buffer.This should trigger the highlighting manually and will rule out configuration issues.
Thanks for the instructions. So I just opened NeoVim and executed :edit scratch
and followed your instructions.
Indeed something happened: the dap>
texts became grey. But the rest remains white as normal. Is that the expected behavior? I would have expected the function definition to be highlighted.
In the screenshot below I have the buffer as instructed by you on the left. On the right is a buffer I set the filetype to Python and removed the dap>
parts of the code.
Can you ensure you have the python parser installed and try again, use :TSInstall python
Well, I thought the right buffer shows that my Python is working fine. I can also open the :TSPlayground
and inspect the syntax tree.
Hey 👋🏾
I think the idea of the plugin is great and I would love to use it. Unfortunately I'm unable to make it work. 🙈
So if I run
:TSInstallInfo
, I can seedap_repl
as installed. If I run:lua =vim.treesitter.inspect_language('dap_repl')
, I get the following output:Anyhow, if I start a debugging session and have the
dap-repl
buffer opened, I don't get any highlighting. How can I investigate further why the highlights don't apply? I'm using a Rust project withcodelldb
.Thank you very much! 🙏🏾