Compare commits

...

6 commits

6 changed files with 103 additions and 12 deletions

View file

@ -10,6 +10,7 @@
[push]
default = simple
autoSetupRemote = true
followtags = true
[help]
autocorrect = immediate
{{- if hasKey . "proxy" }}
@ -46,8 +47,12 @@
pushnoci = push -o ci.skip
diffs = diff --staged
restores = restore --staged
[commit]
verbose = true
[rerere]
enabled = true
[core]
editor = vim
editor = nvim
attributesfile = {{ .chezmoi.homeDir }}/.gitattributes
autocrlf = input
[sendemail]
@ -57,9 +62,20 @@
smtpserverport = 465
smtppass = {{ (bitwarden "item" "Migadu email").login.password | quote }}
confirm = auto
[submodule]
recurse = true
[fetch]
prune = true
prunetags = true
[log]
date = iso
[status]
submoduleSummary = true
[diff]
colorMoved = default
algorithm = histogram
submodule = log
tool = nvimdiff
[diff "color"]
textconv=pygmentize
[diff "pandoc2md"]
@ -71,11 +87,18 @@
[diff "ziplist"]
textconv=unzip -l
[merge]
conflictstyle = diff3
conflictstyle = zdiff3
tool = nvimdiff
[pull]
rebase = true
[rebase]
autosquash = true
autostash = true
updateRefs = true
[init]
defaultBranch = master
[branch]
sort = -committerdate
[advice]
detachedHead = false
[filter "lfs"]
@ -89,5 +112,12 @@
[tag]
sort = version:refname
[url "git@github.com:"]
insteadOf = "https://github.com/"
insteadOf = "gh:"
[credential]
helper = osxkeychain
[include]
path = ovh.config

View file

@ -5,7 +5,7 @@ M.plugins = "custom.plugins"
M.mappings = require "custom.mappings"
M.ui = {
theme = "catppuccin",
theme = "tomorrow_night",
statusline = {
theme = "default",
separator_style = "arrow",

View file

@ -0,0 +1,14 @@
local dap, dapui = require("dap"), require("dapui")
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end

View file

@ -7,13 +7,34 @@ M.dap = {
"<cmd> DapToggleBreakpoint <CR>",
"Add breakpoint at line"
},
["<leader>dc"] = {
"<cmd> DapContinue <CR>",
"Debug - continue"
},
["<leader>dsi"] = {
"<cmd> DapStepInto <CR>",
"Debug - step into"
},
["<leader>dn"] = {
"<cmd> DapStepOver <CR>",
"Debug - step over (next)"
},
["<leader>dso"] = {
"<cmd> DapStepOut <CR>",
"Debug - step out"
},
["<leader>dt"] = {
"<cmd> DapTerminate <CR>",
"Debug - terminate"
},
["<leader>dus"] = {
function ()
local widgets = require('dap.ui.widgets');
local sidebar = widgets.sidebar(widgets.scopes);
sidebar.open();
require("dapui").toggle();
-- local widgets = require('dap.ui.widgets');
-- local sidebar = widgets.sidebar(widgets.scopes);
-- sidebar.open();
end,
"Open debugging sidebar"
"Toggle debugging interface"
}
}
}
@ -29,13 +50,25 @@ M.dap_go = {
},
["<leader>dgl"] = {
function()
require("dap-go").debug_last()
require("dap-go").debug_last_test()
end,
"Debug last go test"
},
}
}
M.dap_ui = {
plugin = true,
n = {
["È"] = { -- alt+k
function()
require("dapui").eval()
end,
"Debug - eval expression"
}
}
}
M.terminal = {
t = {
["<Esc>"] = {"<C-\\><C-n>"}

View file

@ -22,6 +22,16 @@ local plugins = {
require("core.utils").load_mappings("dap_go")
end,
},
{
"rcarriga/nvim-dap-ui", -- UI for the DAP debugger
ft = "go",
dependencies = "mfussenegger/nvim-dap",
config = function()
require("dapui").setup()
require "custom.configs.nvim-dap-ui"
require("core.utils").load_mappings("dap_ui")
end,
},
{
"neovim/nvim-lspconfig", -- load custom lsp config
config = function()
@ -45,6 +55,6 @@ local plugins = {
build = function()
vim.cmd [[silent! GoInstallDeps]]
end,
}
},
}
return plugins

View file

@ -11,7 +11,7 @@ unbind %
bind c new-window -c "#{pane_current_path}"
# fast reload
bind r source-file ~/.tmux.conf
bind r source-file ~/.config/tmux/tmux.conf
# switch panes using alt+arrow
bind -n M-Left select-pane -L
@ -21,6 +21,10 @@ bind -n M-Down select-pane -D
set -g mouse on
# nvim fixes
set -sg escape-time 300
set -g focus-events on
# don't rename windows automatically
set-option -g allow-rename off
@ -45,8 +49,8 @@ bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel
bind P paste-buffer
# color support
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",xterm-256color:Tc"
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",tmux-256color:Tc"
bind u capture-pane \;\
save-buffer /tmp/tmux-buffer \;\