diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index 731d883..cf6cc58 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -88,3 +88,6 @@ key_bindings: - { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \ - { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \ - { key: Slash, mods: Alt, chars: "\x1b/" } # Alt + / + - { key: Left, mods: Alt, chars: "\x1b[1;3D" } + - { key: Right, mods: Alt, chars: "\x1b[1;3C" } + diff --git a/nvim/.config/nvim/after/plugin/dap.lua b/nvim/.config/nvim/after/plugin/dap.lua new file mode 100644 index 0000000..f1dce8f --- /dev/null +++ b/nvim/.config/nvim/after/plugin/dap.lua @@ -0,0 +1,26 @@ +local dap = require('dap') +dap.configurations.python = { + { + -- The first three options are required by nvim-dap + type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` + request = 'launch'; + name = "Launch file"; + + -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options + + program = "${file}"; -- This configuration will launch the current file if used. + pythonPath = function() + -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. + -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. + -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then + return cwd .. '/venv/bin/python' + elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then + return cwd .. '/.venv/bin/python' + else + return '/usr/bin/python' + end + end; + }, +} diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 913444a..363ec6c 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -14,3 +14,5 @@ require("lazy").setup( install = { colorscheme = { "gruvbox", } } } ) -- loads each lua/plugin/* + +require('dap-python').setup('~/.virtualenvs/debugpy/bin/python') diff --git a/nvim/.config/nvim/lua/clint/colorscheme.lua b/nvim/.config/nvim/lua/clint/colorscheme.lua index a10b852..f0e511a 100644 --- a/nvim/.config/nvim/lua/clint/colorscheme.lua +++ b/nvim/.config/nvim/lua/clint/colorscheme.lua @@ -1,5 +1,5 @@ -- general theme -vim.cmd("colorscheme gruvbox") +vim.cmd("colorscheme kanagawa") -- -- ignore background color for transparency -- vim.cmd("highlight Normal guibg=none") diff --git a/nvim/.config/nvim/lua/clint/dap.lua b/nvim/.config/nvim/lua/clint/dap.lua new file mode 100644 index 0000000..bedde6d --- /dev/null +++ b/nvim/.config/nvim/lua/clint/dap.lua @@ -0,0 +1,34 @@ +local dap = require('dap') +dap.adapters.python = { + type = 'executable'; + command = '~/.virtualenvs/debugpy/bin/python'; + args = { '-m', 'debugpy.adapter' }; +} + + +local dap = require('dap') +dap.configurations.python = { + { + -- The first three options are required by nvim-dap + type = 'python'; -- the type here established the link to the adapter definition: `dap.adapters.python` + request = 'launch'; + name = "Launch file"; + + -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options + + program = "${file}"; -- This configuration will launch the current file if used. + pythonPath = function() + -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. + -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. + -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. + local cwd = vim.fn.getcwd() + if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then + return cwd .. '/venv/bin/python' + elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then + return cwd .. '/.venv/bin/python' + else + return 'python3' + end + end; + }, +} diff --git a/nvim/.config/nvim/lua/clint/init.lua b/nvim/.config/nvim/lua/clint/init.lua index 88190c6..b193c2e 100644 --- a/nvim/.config/nvim/lua/clint/init.lua +++ b/nvim/.config/nvim/lua/clint/init.lua @@ -3,4 +3,3 @@ require("clint.settings") require("clint.colorscheme") require("clint.lsp") require("clint.statusline") --- require("clint.debug") diff --git a/nvim/.config/nvim/lua/clint/keybindings.lua b/nvim/.config/nvim/lua/clint/keybindings.lua index d474528..c890541 100644 --- a/nvim/.config/nvim/lua/clint/keybindings.lua +++ b/nvim/.config/nvim/lua/clint/keybindings.lua @@ -77,4 +77,6 @@ keymap('n', 'o', ':SymbolsOutline', default_ops) -- Debugging keymap('n', 'B', ":lua require'dap'.toggle_breakpoint()", default_ops) keymap('n', '', ":lua require'dap'.continue()", default_ops) +keymap('n', '', ":lua require'dap'.step_into()", default_ops) +keymap('n', '', ":lua require'dap'.step_over()", default_ops) keymap('n', 'D', ":lua require'dapui'.toggle()", default_ops) diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index b4e7ba6..7aa087b 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -26,11 +26,11 @@ unbind % # reload config file (change file location to your the tmux.conf you want to use) bind r source-file ~/.config/tmux/tmux.conf\; display ' Reloaded tmux config.' -# switch panes using Alt-arrow without prefix -bind -n M-Left select-pane -L -bind -n M-Right select-pane -R -bind -n M-Up select-pane -U -bind -n M-Down select-pane -D +# # switch panes using Alt-arrow without prefix +# bind -n M-Left select-pane -L +# bind -n M-Right select-pane -R +# bind -n M-Up select-pane -U +# bind -n M-Down select-pane -D # Shift + arrow key to move between windows. bind-key -n S-Left previous-window