some shit

This commit is contained in:
max_richter 2022-11-21 15:27:39 +01:00
parent 397915ca7c
commit 4292b41bb4
9 changed files with 144 additions and 62 deletions

View File

@ -1,53 +1,49 @@
{ {
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"Lua.diagnostics.globals": [ "Lua.diagnostics.globals": ["require", "vim", "pcall"],
"require", "Lua.workspace.library": [
"vim", "/home/max/.config/nvim",
"pcall" "/home/max/.local/share/nvim/site",
], "/home/max/.local/share/nvim/site/pack/packer/start/FixCursorHold.nvim",
"Lua.workspace.library": [ "/home/max/.local/share/nvim/site/pack/packer/start/LuaSnip",
"/home/max/.config/nvim", "/home/max/.local/share/nvim/site/pack/packer/start/alpha-nvim",
"/home/max/.local/share/nvim/site", "/home/max/.local/share/nvim/site/pack/packer/start/catppuccin",
"/home/max/.local/share/nvim/site/pack/packer/start/FixCursorHold.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
"/home/max/.local/share/nvim/site/pack/packer/start/LuaSnip", "/home/max/.local/share/nvim/site/pack/packer/start/copilot-cmp",
"/home/max/.local/share/nvim/site/pack/packer/start/alpha-nvim", "/home/max/.local/share/nvim/site/pack/packer/start/copilot.lua",
"/home/max/.local/share/nvim/site/pack/packer/start/catppuccin", "/home/max/.local/share/nvim/site/pack/packer/start/editorconfig-vim",
"/home/max/.local/share/nvim/site/pack/packer/start/cmp_luasnip", "/home/max/.local/share/nvim/site/pack/packer/start/friendly-snippets",
"/home/max/.local/share/nvim/site/pack/packer/start/copilot-cmp", "/home/max/.local/share/nvim/site/pack/packer/start/fwatch.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/copilot.lua", "/home/max/.local/share/nvim/site/pack/packer/start/fzf",
"/home/max/.local/share/nvim/site/pack/packer/start/editorconfig-vim", "/home/max/.local/share/nvim/site/pack/packer/start/harpoon",
"/home/max/.local/share/nvim/site/pack/packer/start/friendly-snippets", "/home/max/.local/share/nvim/site/pack/packer/start/impatient.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/fwatch.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/leap.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/fzf", "/home/max/.local/share/nvim/site/pack/packer/start/lsp-colors.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/harpoon", "/home/max/.local/share/nvim/site/pack/packer/start/lspkind.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/impatient.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/lspsaga.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/leap.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/lualine.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/lsp-colors.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/lspkind.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/mason.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/lspsaga.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/neotest-jest",
"/home/max/.local/share/nvim/site/pack/packer/start/lualine.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/neotest-vitest",
"/home/max/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/null-ls.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/mason.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
"/home/max/.local/share/nvim/site/pack/packer/start/neotest-jest", "/home/max/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
"/home/max/.local/share/nvim/site/pack/packer/start/neotest-vitest", "/home/max/.local/share/nvim/site/pack/packer/start/nvim-scrollview",
"/home/max/.local/share/nvim/site/pack/packer/start/null-ls.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/nvim-toggleterm.lua",
"/home/max/.local/share/nvim/site/pack/packer/start/nvim-autopairs", "/home/max/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects",
"/home/max/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", "/home/max/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
"/home/max/.local/share/nvim/site/pack/packer/start/nvim-scrollview", "/home/max/.local/share/nvim/site/pack/packer/start/packer.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/nvim-toggleterm.lua", "/home/max/.local/share/nvim/site/pack/packer/start/plenary.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects", "/home/max/.local/share/nvim/site/pack/packer/start/popup.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", "/home/max/.local/share/nvim/site/pack/packer/start/projections.nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/packer.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/vim-dadbod",
"/home/max/.local/share/nvim/site/pack/packer/start/plenary.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/vim-dadbod-ui",
"/home/max/.local/share/nvim/site/pack/packer/start/popup.nvim", "/home/max/.local/share/nvim/site/pack/packer/start/vim-surround",
"/home/max/.local/share/nvim/site/pack/packer/start/projections.nvim", "/home/max/.asdf/installs/neovim/nightly/share/nvim/runtime",
"/home/max/.local/share/nvim/site/pack/packer/start/vim-dadbod", "/home/max/.asdf/installs/neovim/nightly/lib/nvim",
"/home/max/.local/share/nvim/site/pack/packer/start/vim-dadbod-ui", "/home/max/.local/share/nvim/site/pack/packer/start/catppuccin/after",
"/home/max/.local/share/nvim/site/pack/packer/start/vim-surround", "/home/max/.local/share/nvim/site/pack/packer/start/cmp_luasnip/after",
"/home/max/.asdf/installs/neovim/nightly/share/nvim/runtime", "${3rd}/luassert/library"
"/home/max/.asdf/installs/neovim/nightly/lib/nvim", ]
"/home/max/.local/share/nvim/site/pack/packer/start/catppuccin/after", }
"/home/max/.local/share/nvim/site/pack/packer/start/cmp_luasnip/after",
"${3rd}/luassert/library"
]
}

View File

@ -13,6 +13,17 @@ fi
# Enable vim mode in zsh # Enable vim mode in zsh
bindkey -v bindkey -v
if [[ -z "$XDG_RUNTIME_DIR" ]]; then
export XDG_RUNTIME_DIR=/run/user/$UID
if [[ ! -d "$XDG_RUNTIME_DIR" ]]; then
export XDG_RUNTIME_DIR=/tmp/$USER-runtime
if [[ ! -d "$XDG_RUNTIME_DIR" ]]; then
mkdir -m 0700 "$XDG_RUNTIME_DIR"
fi
fi
fi
ZSH_THEME="powerlevel10k/powerlevel10k" ZSH_THEME="powerlevel10k/powerlevel10k"
# ZSH_TMUX_AUTOSTART=true # ZSH_TMUX_AUTOSTART=true
ZSH_TMUX_AUTOCONNECT=false ZSH_TMUX_AUTOCONNECT=false
@ -23,6 +34,7 @@ plugins=(
asdf asdf
tmux tmux
nx-completion nx-completion
sudo
zsh-autosuggestions zsh-autosuggestions
) )

View File

@ -1,9 +1,13 @@
lastupdatecheck: 0 lastupdatecheck: 0
recentrepos: recentrepos:
- /home/max/.dotfiles
- /home/max/Projects/silvester - /home/max/Projects/silvester
- /home/max/Projects/ruumio/main - /home/max/Projects/ruumio/main
- /home/max/Projects/ruumio/feat-prejoin-avatar-soon
- /home/max/Projects/ruumio/feat-wavy-bg
- /home/max/Projects/ruumio/feat-3d-poi - /home/max/Projects/ruumio/feat-3d-poi
- /home/max/.dotfiles
- /home/max/Projects/plantarium
- /home/max/Projects/jim-fx.com
- /home/max/Projects/ruumio - /home/max/Projects/ruumio
- /home/max/Projects/gainz - /home/max/Projects/gainz
startuppopupversion: 5 startuppopupversion: 5

View File

@ -8,6 +8,7 @@ require("core.keymappings")
require("configs.dashboard") require("configs.dashboard")
require("configs.lsp") require("configs.lsp")
require("configs.dap")
require("theme.catpuccin") require("theme.catpuccin")

View File

@ -1,15 +1,28 @@
local dap, dapui = require("dap"), require("dapui") local dap, dapui = require("dap"), require("dapui")
dap.listeners.after.event_initialized["dapui_config"] = function() dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open() dapui.open({})
end end
dap.listeners.before.event_terminated["dapui_config"] = function() dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close() dapui.close({})
end end
dap.listeners.before.event_exited["dapui_config"] = function() dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close() dapui.close({})
end 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 = { dap.adapters.firefox = {
type = "executable", type = "executable",
command = "node", command = "node",
@ -18,7 +31,7 @@ dap.adapters.firefox = {
disconnect_timeout_sec = 10, disconnect_timeout_sec = 10,
max_retries = 30, 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 = { dap.configurations.typescript = {
@ -31,4 +44,53 @@ dap.configurations.typescript = {
url = "http://localhost:8080", url = "http://localhost:8080",
firefoxExecutable = "/sbin/firefox-developer-edition", 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;

View File

@ -6,7 +6,7 @@ require("null-ls").setup({
sources = { sources = {
require("null-ls").builtins.formatting.stylua, require("null-ls").builtins.formatting.stylua,
require("null-ls").builtins.diagnostics.eslint, require("null-ls").builtins.diagnostics.eslint,
-- require("null-ls").builtins.completion.spell, require("null-ls").builtins.completion.spell,
}, },
}) })

View File

@ -39,7 +39,7 @@ map("n", "<leader>t", translate, remap)
map("v", "<leader>t", translate, remap) map("v", "<leader>t", translate, remap)
-- DAP Functionality -- 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 -- Test Functionality
map("n", "tt", ":lua require('neotest').run.run()<CR>", options) map("n", "tt", ":lua require('neotest').run.run()<CR>", options)

View File

@ -58,7 +58,7 @@ vim.cmd("syntax sync minlines=256")
set.mousescroll = "ver:1,hor:1" set.mousescroll = "ver:1,hor:1"
set.shiftwidth = 2 -- Change the number of space characters inserted for indentation set.shiftwidth = 2 -- Change the number of space characters inserted for indentation
set.showtabline = 1 -- Always show tabs 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 nowrap]]) -- Display long lines as just one line
vim.cmd([[set noshowmode]]) -- We don't need to see things like -- INSERT -- anymore vim.cmd([[set noshowmode]]) -- We don't need to see things like -- INSERT -- anymore
vim.cmd([[syntax enable]]) -- Enables syntax highlighing vim.cmd([[syntax enable]]) -- Enables syntax highlighing

View File

@ -103,6 +103,11 @@ return packer.startup(function(use)
--------------- ---------------
use("neovim/nvim-lspconfig") use("neovim/nvim-lspconfig")
use({ 'j-hui/fidget.nvim',
config = function()
require('fidget').setup()
end
})
use("williamboman/mason.nvim") use("williamboman/mason.nvim")
use("williamboman/mason-lspconfig.nvim") use("williamboman/mason-lspconfig.nvim")
use("jose-elias-alvarez/null-ls.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 -- Dap Debugger -- Have not yet been able to set this up
-- use({ "mfussenegger/nvim-dap" }) use({ "mfussenegger/nvim-dap" })
-- use({ "rcarriga/nvim-dap-ui" free use({ "rcarriga/nvim-dap-ui" })
use { "mxsdev/nvim-dap-vscode-js", requires = { "mfussenegger/nvim-dap" } }
use("editorconfig/editorconfig-vim") use("editorconfig/editorconfig-vim")
use({ use({
"michaelb/sniprun", "michaelb/sniprun",