From 2f532d405d0ba7c6c6d9fe7d2d37d5dfa5159cc2 Mon Sep 17 00:00:00 2001 From: Markus Dieckmann Date: Sun, 18 Sep 2022 15:43:22 +0200 Subject: [PATCH] plugins and dap dap_config --- nvim/lua/dap_config.lua | 23 ++++- nvim/lua/plugins.lua | 181 +++++++++++++++++++--------------------- 2 files changed, 108 insertions(+), 96 deletions(-) diff --git a/nvim/lua/dap_config.lua b/nvim/lua/dap_config.lua index f120486..504e642 100644 --- a/nvim/lua/dap_config.lua +++ b/nvim/lua/dap_config.lua @@ -1,8 +1,27 @@ +vim.fn.sign_define('DapBreakpoint', {text='🟥', texthl='', linehl='', numhl=''}) +vim.fn.sign_define('DapStopped', {text='⭐️', texthl='', linehl='', numhl=''}) local dap = require('dap') dap.adapters.node2 = { type = 'executable', command = 'node', args = {os.getenv('HOME') .. '/dev/microsoft/vscode-node-debug2/out/src/nodeDebug.js'}, } -vim.fn.sign_define('DapBreakpoint', {text='🟥', texthl='', linehl='', numhl=''}) -vim.fn.sign_define('DapStopped', {text='⭐️', texthl='', linehl='', numhl=''}) +dap.configurations.javascript = { + { + name = 'Launch', + type = 'node2', + request = 'launch', + program = '${file}', + cwd = vim.fn.getcwd(), + sourceMaps = true, + protocol = 'inspector', + console = 'integratedTerminal', + }, + { + -- For this to work you need to make sure the node process is started with the `--inspect` flag. + name = 'Attach to process', + type = 'node2', + request = 'attach', + processId = require'dap.utils'.pick_process, + }, +} diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua index 332e506..890fb8b 100644 --- a/nvim/lua/plugins.lua +++ b/nvim/lua/plugins.lua @@ -1,97 +1,90 @@ require("packer").startup(function(use) - use("wbthomason/packer.nvim") - use({ - "williamboman/mason.nvim", - "williamboman/mason-lspconfig.nvim", - "neovim/nvim-lspconfig", - "WhoIsSethDaniel/mason-tool-installer.nvim", - }) - use("mfussenegger/nvim-dap") - use("jose-elias-alvarez/null-ls.nvim") - use({ - "nvim-telescope/telescope.nvim", - tag = "0.1.0", - requires = { { "nvim-lua/plenary.nvim" } }, - }) - use("nvim-lua/lsp-status.nvim") - use("jiangmiao/auto-pairs") - use("machakann/vim-sandwich") - use("machakann/vim-highlightedyank") - use("bling/vim-airline") - use("airblade/vim-gitgutter") - use("easymotion/vim-easymotion") - use({ - "antoinemadec/FixCursorHold.nvim", - "kosayoda/nvim-lightbulb", - }) - use("hrsh7th/cmp-nvim-lsp") - use("hrsh7th/cmp-buffer") - use("hrsh7th/cmp-path") - use("hrsh7th/nvim-cmp") - use("hrsh7th/cmp-cmdline") - use("saadparwaiz1/cmp_luasnip") - use("L3MON4D3/LuaSnip") - use("kyazdani42/nvim-web-devicons") - use("kyazdani42/nvim-tree.lua") - use("tpope/vim-fugitive") - use({ - "nvim-treesitter/nvim-treesitter", - run = function() - require("nvim-treesitter.install").update({ with_sync = true }) - end, - }) - use("folke/tokyonight.nvim") - use("simrat39/rust-tools.nvim") - use({ - "akinsho/toggleterm.nvim", - tag = "v2.*", - config = function() - require("toggleterm").setup() - end, - }) - use("https://git.sr.ht/~whynothugo/lsp_lines.nvim") - --use 'morhetz/gruvbox' - use({ - "folke/which-key.nvim", - config = function() - require("which-key").setup({}) - end, - }) - use("gbrlsnchs/telescope-lsp-handlers.nvim") - use({ - "klen/nvim-test", - config = function() - require("nvim-test").setup() - end, - }) - use({ - "nvim-neotest/neotest", - requires = { - "nvim-lua/plenary.nvim", - "nvim-treesitter/nvim-treesitter", - "antoinemadec/FixCursorHold.nvim", - "haydenmeade/neotest-jest", - "nvim-neotest/neotest-python", - "nvim-neotest/neotest-plenary", - "nvim-neotest/neotest-vim-test", - }, - }) - use({ - "MunifTanjim/prettier.nvim", - requires = { - "jose-elias-alvarez/null-ls.nvim", - "neovim/nvim-lspconfig", - }, - }) + use("wbthomason/packer.nvim") + use({ + "williamboman/mason.nvim", + "williamboman/mason-lspconfig.nvim", + "neovim/nvim-lspconfig", + "WhoIsSethDaniel/mason-tool-installer.nvim", + }) + use("mfussenegger/nvim-dap") + use("jose-elias-alvarez/null-ls.nvim") + use({ + "nvim-telescope/telescope.nvim", + tag = "0.1.0", + requires = { { "nvim-lua/plenary.nvim" } }, + }) + use("nvim-lua/lsp-status.nvim") + use("jiangmiao/auto-pairs") + use("machakann/vim-sandwich") + use("machakann/vim-highlightedyank") + use("bling/vim-airline") + use("airblade/vim-gitgutter") + use("easymotion/vim-easymotion") + use({ + "antoinemadec/FixCursorHold.nvim", + "kosayoda/nvim-lightbulb", + }) + use("hrsh7th/cmp-nvim-lsp") + use("hrsh7th/cmp-buffer") + use("hrsh7th/cmp-path") + use("hrsh7th/nvim-cmp") + use("hrsh7th/cmp-cmdline") + use("saadparwaiz1/cmp_luasnip") + use("L3MON4D3/LuaSnip") + use("kyazdani42/nvim-web-devicons") + use("kyazdani42/nvim-tree.lua") + use("tpope/vim-fugitive") + use({ + "nvim-treesitter/nvim-treesitter", + run = function() + require("nvim-treesitter.install").update({ with_sync = true }) + end, + }) + use("folke/tokyonight.nvim") + use("simrat39/rust-tools.nvim") + use({ + "akinsho/toggleterm.nvim", + tag = "v2.*", + config = function() + require("toggleterm").setup() + end, + }) + use("https://git.sr.ht/~whynothugo/lsp_lines.nvim") + --use 'morhetz/gruvbox' + use({ + "folke/which-key.nvim", + config = function() + require("which-key").setup({}) + end, + }) + use("gbrlsnchs/telescope-lsp-handlers.nvim") + use({ + "klen/nvim-test", + config = function() + require("nvim-test").setup() + end, + }) + use({ + "nvim-neotest/neotest", + requires = { + "nvim-lua/plenary.nvim", + "nvim-treesitter/nvim-treesitter", + "antoinemadec/FixCursorHold.nvim", + "haydenmeade/neotest-jest", + "nvim-neotest/neotest-python", + "nvim-neotest/neotest-plenary", + "nvim-neotest/neotest-vim-test", + }, + }) + use({ + "MunifTanjim/prettier.nvim", + requires = { + "jose-elias-alvarez/null-ls.nvim", + "neovim/nvim-lspconfig", + }, + }) use { - "folke/trouble.nvim", - requires = "kyazdani42/nvim-web-devicons", - config = function() - require("trouble").setup { - -- your configuration comes here - -- or leave it empty to use the default settings - -- refer to the configuration section below - } - end -} + "folke/trouble.nvim", + requires = "kyazdani42/nvim-web-devicons" + } end)