Skip to content

Commit

Permalink
feat: support overriding filetypes for adapters (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
chomosuke committed Dec 20, 2022
1 parent 4ec6bce commit d6cb770
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions lua/mason-nvim-dap/mappings/filetypes.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
local _ = require('mason-core.functional')
local settings = require('mason-nvim-dap.settings')

local M = {}

Expand All @@ -17,4 +18,7 @@ M.adapter_to_configs = {
['kotlin'] = { 'kotlin' },
}

M.adapter_to_configs =
vim.tbl_deep_extend('force', M.adapter_to_configs, settings.current.automatic_setup.filetypes or {})

return M
2 changes: 1 addition & 1 deletion lua/mason-nvim-dap/settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ local DEFAULT_SETTINGS = {
-- Can either be:
-- - false: Dap is not automatically configured.
-- - true: Dap is automatically configured.
-- - {adapters: {ADAPTER: {}, }, configurations: {ADAPTER: {}, }}. Allows overriding default configuration.
-- - {adapters: {ADAPTER: {}, }, configurations: {ADAPTER: {}, }, filetypes: {ADAPTER: {}, }}. Allows overriding default configuration.
automatic_setup = false,
}

Expand Down

0 comments on commit d6cb770

Please sign in to comment.