LiadOz / nvim-dap-repl-highlights

Add syntax highlighting to the nvim-dap REPL
110 stars 6 forks source link

It's not enabled by default. #2

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago

I just tried your plugin but it has no effect, these are the related configs:

{
  'nvim-treesitter/nvim-treesitter',
  build = ':TSUpdate',
  dependencies = {
    -- many unrelated lines omitted.
    { 'LiadOz/nvim-dap-repl-highlights', config = true },
  },
  config = function ()
    -- I also tried the next line too, same result.
    -- require('nvim-dap-repl-highlights').setup()
    require('nvim-treesitter.configs').setup {
      -- many unrelated lines omitted.
      ensure_installed = { 'dap_repl' },
LiadOz commented 1 year ago

Can you make sure that the treesitter parser for the language you are using is installed? you can view installed parsers using TSInstallInfo Also can you enable dap trace level log and post them here? Here is the relevant info from nvim-dap

set_log_level(level)                                       *dap.set_log_level()*
        Sets the log level. Defaults to `INFO`  >

            :lua require('dap').set_log_level('TRACE')
<

        Available log levels:

          TRACE
          DEBUG
          INFO
          WARN
          ERROR

        The log file is in the |stdpath| `cache` folder.
        To print the location:  >

            :lua print(vim.fn.stdpath('cache'))
<
        The filename is `dap.log`
MrPandey01 commented 1 year ago

I've the same problem. TSInstallInfo shows that 'dap_repl' is installed.

:lua print(vim.treesitter.inspect_language('dap_repl')) returns the table successfully.

LiadOz commented 1 year ago

I've the same problem. TSInstallInfo shows that 'dap_repl' is installed.

:lua print(vim.treesitter.inspect_language('dap_repl')) returns the table successfully.

@MrPandey01 Can you try again using the following branch LiadOz/fix-check-parser I have tried running with your configs and with this change it worked.

MrPandey01 commented 1 year ago

Still doesn't work for me. Table is still returned successfully and TSInstallInfo still says that the parser is installed. Here is the link to my nvim config if you'd like to see other details https://github.com/MrPandey01/dotfiles/blob/89e8562235ee3f7eeeca497b308537fdb8debef1/.config/nvim/lua/plugins/dap/init.lua#L16

LiadOz commented 1 year ago

@MrPandey01 I think you installed the plugin with the branch wrong, can you try instead { 'LiadOz/nvim-dap-repl-highlights', branch = 'LiadOz/fix-check-parser' }, simply in the branch put a string instead of a table.

MrPandey01 commented 1 year ago

You are right. That was such a stupid mistake. Your plugin works now :D Thanks!

LiadOz commented 1 year ago

@nyngwang I believe the latest commit solves the issue, if it still happens on your config please reopen this issue.

nyngwang commented 1 year ago

Well, I don't think it is solved:

image

my config:

image

LiadOz commented 1 year ago

@nyngwang you may be missing the python treesitter parser, try to install it manually with :TSInstall python or by adding it the the ensure_installed. If that doesn't can you paste the content of the :messages command?