This commit is contained in:
cmccay 2023-01-25 12:52:36 -06:00
commit edf12cd9ef
8 changed files with 73 additions and 7 deletions

View File

@ -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" }

View File

@ -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;
},
}

View File

@ -14,3 +14,5 @@ require("lazy").setup(
install = { colorscheme = { "gruvbox", } }
}
) -- loads each lua/plugin/*
require('dap-python').setup('~/.virtualenvs/debugpy/bin/python')

View File

@ -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")

View File

@ -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;
},
}

View File

@ -3,4 +3,3 @@ require("clint.settings")
require("clint.colorscheme")
require("clint.lsp")
require("clint.statusline")
-- require("clint.debug")

View File

@ -77,4 +77,6 @@ keymap('n', '<Leader>o', ':SymbolsOutline<CR>', default_ops)
-- Debugging
keymap('n', '<Leader>B', ":lua require'dap'.toggle_breakpoint()<CR>", default_ops)
keymap('n', '<F5>', ":lua require'dap'.continue()<CR>", default_ops)
keymap('n', '<F6>', ":lua require'dap'.step_into()<CR>", default_ops)
keymap('n', '<F7>', ":lua require'dap'.step_over()<CR>", default_ops)
keymap('n', '<Leader>D', ":lua require'dapui'.toggle()<CR>", default_ops)

View File

@ -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