@@ -468,12 +468,6 @@ return {
468468 color = " MsgArea" ,
469469 },
470470 -- stylua: ignore
471- {
472- function () return " " .. require (" dap" ).status () end ,
473- cond = function () return require (" dap" ).status () ~= " " end ,
474- color = " MsgArea" ,
475- },
476- -- stylua: ignore
477471 { require (" lazy.status" ).updates , cond = require (" lazy.status" ).has_updates , color = " MsgArea" },
478472 { " progress" , color = " MsgArea" },
479473 { " location" , color = " MsgArea" },
@@ -508,7 +502,6 @@ return {
508502 opts = {
509503 ensure_installed = {
510504 " biome" ,
511- " js-debug-adapter" ,
512505 " shfmt" ,
513506 " stylua" ,
514507 " svelte-language-server" ,
@@ -541,30 +534,6 @@ return {
541534 end ,
542535 },
543536
544- -- mason-nvim-dap.nvim (https://github.com/jay-babu/mason-nvim-dap.nvim)
545- {
546- " jay-babu/mason-nvim-dap.nvim" ,
547- dependencies = " mason.nvim" ,
548- cmd = { " DapInstall" , " DapUninstall" },
549- opts = {
550- -- Makes a best effort to setup the various debuggers with
551- -- reasonable debug configurations
552- automatic_installation = true ,
553-
554- -- You can provide additional configuration to the handlers,
555- -- see mason-nvim-dap README for more information
556- handlers = {},
557-
558- -- You'll need to check that you have the required things installed
559- -- online, please don't ask me how to install them :)
560- ensure_installed = {
561- -- Update this to ensure that you have the debuggers for the langs you want
562- },
563- },
564- -- mason-nvim-dap is loaded when nvim-dap loads
565- config = function () end ,
566- },
567-
568537 -- mini.nvim (https://github.com/echasnovski/mini.nvim)
569538 {
570539 " echasnovski/mini.icons" ,
@@ -819,185 +788,6 @@ return {
819788 end ,
820789 },
821790
822- -- nvim-dap (https://github.com/mfussenegger/nvim-dap)
823- {
824- " mfussenegger/nvim-dap" ,
825- event = " VeryLazy" ,
826- dependencies = {
827- -- https://github.com/rcarriga/nvim-dap-ui
828- {
829- " rcarriga/nvim-dap-ui" ,
830- dependencies = { " nvim-neotest/nvim-nio" },
831- -- stylua: ignore
832- keys = {
833- { " <leader>du" , function () require (" dapui" ).toggle ({ }) end , desc = " Dap UI" },
834- { " <leader>de" , function () require (" dapui" ).eval () end , desc = " Eval" , mode = {" n" , " v" } },
835- },
836- opts = {
837- controls = { enabled = false },
838- icons = {
839- collapsed = icons .tree .Closed ,
840- current_frame = icons .tree .Closed ,
841- expanded = icons .tree .Open ,
842- },
843- },
844- config = function (_ , opts )
845- local dap = require (" dap" )
846- local dapui = require (" dapui" )
847- dapui .setup (opts )
848- dap .listeners .after .event_initialized [" dapui_config" ] = function ()
849- -- dapui.open({})
850- end
851- dap .listeners .before .event_terminated [" dapui_config" ] = function ()
852- dapui .close ({})
853- end
854- dap .listeners .before .event_exited [" dapui_config" ] = function ()
855- dapui .close ({})
856- end
857- end ,
858- },
859- -- https://github.com/theHamsta/nvim-dap-virtual-text
860- {
861- " theHamsta/nvim-dap-virtual-text" ,
862- opts = {},
863- },
864- },
865- -- stylua: ignore
866- keys = {
867- { " <leader>d" , " " , desc = " +debug" , mode = {" n" , " v" } },
868- { " <leader>dB" , function () require (" dap" ).set_breakpoint (vim .fn .input (' Breakpoint condition: ' )) end , desc = " Breakpoint Condition" },
869- { " <leader>db" , function () require (" dap" ).toggle_breakpoint () end , desc = " Toggle Breakpoint" },
870- { " <leader>dc" , function () require (" dap" ).continue () end , desc = " Continue" },
871- { " <leader>dC" , function () require (" dap" ).run_to_cursor () end , desc = " Run to Cursor" },
872- { " <leader>dg" , function () require (" dap" ).goto_ () end , desc = " Go to Line (No Execute)" },
873- { " <leader>di" , function () require (" dap" ).step_into () end , desc = " Step Into" },
874- { " <leader>dj" , function () require (" dap" ).down () end , desc = " Down" },
875- { " <leader>dk" , function () require (" dap" ).up () end , desc = " Up" },
876- { " <leader>dl" , function () require (" dap" ).run_last () end , desc = " Run Last" },
877- { " <leader>do" , function () require (" dap" ).step_out () end , desc = " Step Out" },
878- { " <leader>dO" , function () require (" dap" ).step_over () end , desc = " Step Over" },
879- { " <leader>dp" , function () require (" dap" ).pause () end , desc = " Pause" },
880- { " <leader>dr" , function () require (" dap" ).repl .toggle () end , desc = " Toggle REPL" },
881- { " <leader>ds" , function () require (" dap" ).session () end , desc = " Session" },
882- { " <leader>dt" , function () require (" dap" ).terminate () end , desc = " Terminate" },
883- { " <leader>dw" , function () require (" dap.ui.widgets" ).hover () end , desc = " Widgets" },
884- {
885- " <leader>da" ,
886- function ()
887- --- @param config { args ?: string[] | fun (): string[] ?}
888- local function get_args (config )
889- local args = type (config .args ) == " function" and (config .args () or {}) or config .args or {}
890- local args_str = type (args ) == " table" and table.concat (args , " " ) or args --[[ @as string]]
891- config = vim .deepcopy (config )
892- --- @cast args string[]
893- config .args = function ()
894- local new_args = vim .fn .expand (vim .fn .input (" Run with args: " , args_str )) --[[ @as string]]
895- return require (" dap.utils" ).splitstr (new_args )
896- end
897- return config
898- end
899- require (" dap" ).continue ({ before = get_args })
900- end ,
901- desc = " Run with Args" ,
902- },
903- },
904- opts = function ()
905- local dap = require (" dap" )
906- require (" dap" ).adapters [" pwa-node" ] = {
907- type = " server" ,
908- host = " localhost" ,
909- port = " ${port}" ,
910- executable = {
911- command = " node" ,
912- -- TODO: Make sure to update this path to point to your installation
913- args = {
914- require (" util.init" ).get_pkg_path (" js-debug-adapter" , " /js-debug/src/dapDebugServer.js" ),
915- " ${port}" ,
916- },
917- },
918- }
919- dap .adapters [" node" ] = function (cb , config )
920- if config .type == " node" then
921- config .type = " pwa-node"
922- end
923- local nativeAdapter = dap .adapters [" pwa-node" ]
924- if type (nativeAdapter ) == " function" then
925- nativeAdapter (cb , config )
926- else
927- cb (nativeAdapter )
928- end
929- end
930-
931- local js_filetypes = { " typescript" , " javascript" , " typescriptreact" , " javascriptreact" }
932-
933- local vscode = require (" dap.ext.vscode" )
934- vscode .type_to_filetypes [" node" ] = js_filetypes
935- vscode .type_to_filetypes [" pwa-node" ] = js_filetypes
936-
937- for _ , language in ipairs (js_filetypes ) do
938- if not dap .configurations [language ] then
939- dap .configurations [language ] = {
940- {
941- name = " Launch file (TypeScript)" ,
942- request = " launch" ,
943- type = " pwa-node" ,
944- console = " integratedTerminal" ,
945- cwd = " ${workspaceFolder}" ,
946- program = " ${file}" ,
947- runtimeExecutable = " ${workspaceFolder}/node_modules/.bin/tsx" ,
948- skipFiles = { " <node_internals>/**" },
949- },
950- {
951- name = " Launch file (JavaScript)" ,
952- request = " launch" ,
953- type = " pwa-node" ,
954- cwd = " ${workspaceFolder}" ,
955- program = " ${file}" ,
956- },
957- {
958- name = " Attach" ,
959- cwd = " ${workspaceFolder}" ,
960- processId = require (" dap.utils" ).pick_process ,
961- request = " attach" ,
962- type = " pwa-node" ,
963- },
964- }
965- end
966- end
967-
968- local elixir_ls_debugger = vim .fn .exepath (" elixir-ls-debugger" )
969- if elixir_ls_debugger ~= " " then
970- dap .adapters [" mix_task" ] = {
971- command = elixir_ls_debugger ,
972- type = " executable" ,
973- }
974- end
975- end ,
976- config = function ()
977- -- load mason-nvim-dap here, after all adapters have been setup
978- if require (" util.init" ).has (" mason-nvim-dap.nvim" ) then
979- require (" mason-nvim-dap" ).setup (require (" util.init" ).opts (" mason-nvim-dap.nvim" ))
980- end
981-
982- vim .api .nvim_set_hl (0 , " DapStoppedLine" , { default = true , link = " Visual" })
983-
984- for name , sign in pairs (icons .dap ) do
985- sign = type (sign ) == " table" and sign or { sign }
986- vim .fn .sign_define (
987- " Dap" .. name ,
988- { text = sign [1 ], texthl = sign [2 ] or " DiagnosticInfo" , linehl = sign [3 ], numhl = sign [3 ] }
989- )
990- end
991-
992- -- setup dap config by VsCode launch.json file
993- local vscode = require (" dap.ext.vscode" )
994- local json = require (" plenary.json" )
995- vscode .json_decode = function (str )
996- return vim .json .decode (json .json_strip_comments (str ))
997- end
998- end ,
999- },
1000-
1001791 -- nvim-lspconfig (https://github.com/neovim/nvim-lspconfig)
1002792 {
1003793 " neovim/nvim-lspconfig" ,
0 commit comments