some shit
This commit is contained in:
@ -8,6 +8,7 @@ require("core.keymappings")
|
||||
|
||||
require("configs.dashboard")
|
||||
require("configs.lsp")
|
||||
require("configs.dap")
|
||||
|
||||
require("theme.catpuccin")
|
||||
|
||||
|
@ -1,15 +1,28 @@
|
||||
local dap, dapui = require("dap"), require("dapui")
|
||||
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
dapui.open({})
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
dapui.close({})
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
dapui.close({})
|
||||
end
|
||||
|
||||
require("dap-vscode-js").setup({
|
||||
-- node_path = "node", -- Path of node executable. Defaults to $NODE_PATH, and then "node"
|
||||
-- debugger_path = "(runtimedir)/site/pack/packer/opt/vscode-js-debug", -- Path to vscode-js-debug installation.
|
||||
-- debugger_cmd = { "js-debug-adapter" }, -- Command to use to launch the debug server. Takes precedence over `node_path` and `debugger_path`.
|
||||
adapters = { 'pwa-node', 'pwa-chrome' }, -- which adapters to register in nvim-dap
|
||||
})
|
||||
|
||||
dap.adapters.node2 = {
|
||||
type = 'executable';
|
||||
command = 'node',
|
||||
args = { vim.fn.stdpath "data" .. '/mason/packages/node-debug2-adapter/out/src/nodeDebug.js' };
|
||||
}
|
||||
|
||||
dap.adapters.firefox = {
|
||||
type = "executable",
|
||||
command = "node",
|
||||
@ -18,7 +31,7 @@ dap.adapters.firefox = {
|
||||
disconnect_timeout_sec = 10,
|
||||
max_retries = 30,
|
||||
},
|
||||
args = { os.getenv("HOME") .. "/.local/share/nvim/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js" },
|
||||
args = { vim.fn.stdpath("data") .. "/mason/packages/firefox-debug-adapter/dist/adapter.bundle.js" },
|
||||
}
|
||||
|
||||
dap.configurations.typescript = {
|
||||
@ -31,4 +44,53 @@ dap.configurations.typescript = {
|
||||
url = "http://localhost:8080",
|
||||
firefoxExecutable = "/sbin/firefox-developer-edition",
|
||||
},
|
||||
{
|
||||
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',
|
||||
sourceMaps = true,
|
||||
cwd = "${workspaceFolder}",
|
||||
processId = require 'dap.utils'.pick_process,
|
||||
},
|
||||
{
|
||||
type = "pwa-node",
|
||||
request = "attach",
|
||||
name = "Attach",
|
||||
processId = require 'dap.utils'.pick_process,
|
||||
cwd = "${workspaceFolder}",
|
||||
}
|
||||
}
|
||||
|
||||
dap.configurations.typescriptreact = {
|
||||
{
|
||||
name = 'debug with firefox',
|
||||
type = 'firefox',
|
||||
request = 'launch',
|
||||
reattach = true,
|
||||
url = 'http://localhost:4200',
|
||||
webRoot = '/home/max/Projects/ruumio/main/apps/events-standalone/',
|
||||
firefoxExecutable = '/home/max/Downloads/firefox/firefox'
|
||||
},
|
||||
{
|
||||
name = 'debug with chrome',
|
||||
type = 'pwa-chrome',
|
||||
request = 'launch',
|
||||
reattach = true,
|
||||
url = 'http://localhost:4200',
|
||||
webroot = '${workspacefolder}',
|
||||
runtimeExecutable = '/mnt/c/Program Files/Google/Chrome/Application/chrome.exe'
|
||||
},
|
||||
}
|
||||
|
||||
dap.configurations.javascript = dap.configurations.typescript;
|
||||
|
@ -6,7 +6,7 @@ require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
require("null-ls").builtins.diagnostics.eslint,
|
||||
-- require("null-ls").builtins.completion.spell,
|
||||
require("null-ls").builtins.completion.spell,
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -39,7 +39,7 @@ map("n", "<leader>t", translate, remap)
|
||||
map("v", "<leader>t", translate, remap)
|
||||
|
||||
-- DAP Functionality
|
||||
map("n", "<Leader>b", ":lua require('dap').toggle_breakpoint()", options)
|
||||
map("n", "<Leader>b", ":lua require('dap').toggle_breakpoint()<CR>", options)
|
||||
|
||||
-- Test Functionality
|
||||
map("n", "tt", ":lua require('neotest').run.run()<CR>", options)
|
||||
|
@ -58,7 +58,7 @@ vim.cmd("syntax sync minlines=256")
|
||||
set.mousescroll = "ver:1,hor:1"
|
||||
set.shiftwidth = 2 -- Change the number of space characters inserted for indentation
|
||||
set.showtabline = 1 -- Always show tabs
|
||||
set.cmdheight = 0 -- More space for displaying messages
|
||||
set.cmdheight = 1 -- More space for displaying messages
|
||||
vim.cmd([[set nowrap]]) -- Display long lines as just one line
|
||||
vim.cmd([[set noshowmode]]) -- We don't need to see things like -- INSERT -- anymore
|
||||
vim.cmd([[syntax enable]]) -- Enables syntax highlighing
|
||||
|
@ -103,6 +103,11 @@ return packer.startup(function(use)
|
||||
---------------
|
||||
|
||||
use("neovim/nvim-lspconfig")
|
||||
use({ 'j-hui/fidget.nvim',
|
||||
config = function()
|
||||
require('fidget').setup()
|
||||
end
|
||||
})
|
||||
use("williamboman/mason.nvim")
|
||||
use("williamboman/mason-lspconfig.nvim")
|
||||
use("jose-elias-alvarez/null-ls.nvim")
|
||||
@ -213,8 +218,10 @@ return packer.startup(function(use)
|
||||
})
|
||||
|
||||
-- Dap Debugger -- Have not yet been able to set this up
|
||||
-- use({ "mfussenegger/nvim-dap" })
|
||||
-- use({ "rcarriga/nvim-dap-ui" free
|
||||
use({ "mfussenegger/nvim-dap" })
|
||||
use({ "rcarriga/nvim-dap-ui" })
|
||||
use { "mxsdev/nvim-dap-vscode-js", requires = { "mfussenegger/nvim-dap" } }
|
||||
|
||||
use("editorconfig/editorconfig-vim")
|
||||
use({
|
||||
"michaelb/sniprun",
|
||||
|
Reference in New Issue
Block a user