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

feat: allowing users to pass in function to override instead of simply a list #40

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

jay-babu
Copy link
Owner

No description provided.

@jay-babu jay-babu force-pushed the func_or_extend branch 4 times, most recently from c202674 to f911132 Compare February 16, 2023 05:18
@jay-babu jay-babu merged commit 858942c into main Feb 16, 2023
@jay-babu jay-babu deleted the func_or_extend branch February 16, 2023 05:31
@gmnz
Copy link

gmnz commented Feb 25, 2023

Hi, sorry for answering late. I've tried this new mixed auto/manual setup and I get the following error when I start neovim:

Error detected while processing /home/michael/.config/nvim/init.lua:
...l/share/nvim/lazy/mason.nvim/lua/mason-registry/init.lua:77: Cannot find package "bash-debug-adapter".

My setup looks like this:

    require('mason-nvim-dap').setup ({
      -- Makes a best effort to setup the various debuggers with
      -- reasonable debug configurations
      -- automatic_setup = true,

      -- You'll need to check that you have the required things installed
      -- online, please don't ask me how to install them :)
      ensure_installed = {
        -- Update this to ensure that you have the debuggers for the langs you want
        -- 'delve',
        'php-debug-adapter',
        -- 'php',
      },
      automatic_installation = true,
      automatic_setup = {
        configurations = function(default)
            default.php[1].port = 9003

           return default
        end,
      }
    })

    -- You can provide additional configuration to the handlers,
    -- see mason-nvim-dap README for more information
    require 'mason-nvim-dap'.setup_handlers {
      -- function(source_name)
      --   require('mason-nvim-dap.automatic_setup')(source_name)
      -- end,
      -- php = function(source_name)
      --   dap.adapters.php = {
      --     type = 'executable',
      --     command = "node",
      --     args = { '/home/michael/.local/share/nvim/mason/packages/php-debug-adapter/extension/out/phpDebug.js' }
      --   }
      --   dap.configurations.php = {
      --     {
      --       type = 'php',
      --       request = 'launch',
      --       name = 'Listen for Xdebug',
      --       port = 9003
      --       -- port = 9004
      --     }
      --   }
      -- end,
    }

I've never used bash debug nor it was ever mentioned in my config.

@jay-babu
Copy link
Owner Author

php should be in ensure_installed. I don't recommend doing both automatic_installation and automatic_setup. Pick a single source of truth

@gmnz
Copy link

gmnz commented Mar 11, 2023

Thanks, didn't realize that. Seems it helped.

This was referenced Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants