Merge branch 'lazypm' of https://git.terminallychill.xyz/clint/dotfiles into lazypm
This commit is contained in:
commit
edf12cd9ef
|
@ -88,3 +88,6 @@ key_bindings:
|
||||||
- { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \
|
- { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \
|
||||||
- { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \
|
- { key: Backslash, mods: Alt, chars: "\x1b\\" } # Alt + \
|
||||||
- { key: Slash, 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" }
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
},
|
||||||
|
}
|
|
@ -14,3 +14,5 @@ require("lazy").setup(
|
||||||
install = { colorscheme = { "gruvbox", } }
|
install = { colorscheme = { "gruvbox", } }
|
||||||
}
|
}
|
||||||
) -- loads each lua/plugin/*
|
) -- loads each lua/plugin/*
|
||||||
|
|
||||||
|
require('dap-python').setup('~/.virtualenvs/debugpy/bin/python')
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-- general theme
|
-- general theme
|
||||||
vim.cmd("colorscheme gruvbox")
|
vim.cmd("colorscheme kanagawa")
|
||||||
|
|
||||||
-- -- ignore background color for transparency
|
-- -- ignore background color for transparency
|
||||||
-- vim.cmd("highlight Normal guibg=none")
|
-- vim.cmd("highlight Normal guibg=none")
|
||||||
|
|
|
@ -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;
|
||||||
|
},
|
||||||
|
}
|
|
@ -3,4 +3,3 @@ require("clint.settings")
|
||||||
require("clint.colorscheme")
|
require("clint.colorscheme")
|
||||||
require("clint.lsp")
|
require("clint.lsp")
|
||||||
require("clint.statusline")
|
require("clint.statusline")
|
||||||
-- require("clint.debug")
|
|
||||||
|
|
|
@ -77,4 +77,6 @@ keymap('n', '<Leader>o', ':SymbolsOutline<CR>', default_ops)
|
||||||
-- Debugging
|
-- Debugging
|
||||||
keymap('n', '<Leader>B', ":lua require'dap'.toggle_breakpoint()<CR>", default_ops)
|
keymap('n', '<Leader>B', ":lua require'dap'.toggle_breakpoint()<CR>", default_ops)
|
||||||
keymap('n', '<F5>', ":lua require'dap'.continue()<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)
|
keymap('n', '<Leader>D', ":lua require'dapui'.toggle()<CR>", default_ops)
|
||||||
|
|
|
@ -26,11 +26,11 @@ unbind %
|
||||||
# reload config file (change file location to your the tmux.conf you want to use)
|
# 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.'
|
bind r source-file ~/.config/tmux/tmux.conf\; display ' Reloaded tmux config.'
|
||||||
|
|
||||||
# switch panes using Alt-arrow without prefix
|
# # switch panes using Alt-arrow without prefix
|
||||||
bind -n M-Left select-pane -L
|
# bind -n M-Left select-pane -L
|
||||||
bind -n M-Right select-pane -R
|
# bind -n M-Right select-pane -R
|
||||||
bind -n M-Up select-pane -U
|
# bind -n M-Up select-pane -U
|
||||||
bind -n M-Down select-pane -D
|
# bind -n M-Down select-pane -D
|
||||||
|
|
||||||
# Shift + arrow key to move between windows.
|
# Shift + arrow key to move between windows.
|
||||||
bind-key -n S-Left previous-window
|
bind-key -n S-Left previous-window
|
||||||
|
|
Loading…
Reference in New Issue