update dap and set whichkey keys

This commit is contained in:
sudacode 2023-08-15 11:11:38 -07:00
parent 38d3e0e221
commit 1566186961
8 changed files with 343 additions and 116 deletions

View File

@ -40,6 +40,7 @@ source ~/.config/nvim/plugin-confs/nvim-colorizer.lua
source ~/.config/nvim/plugin-confs/nvim-dap-python.lua source ~/.config/nvim/plugin-confs/nvim-dap-python.lua
source ~/.config/nvim/plugin-confs/nvim-dap-bash.lua source ~/.config/nvim/plugin-confs/nvim-dap-bash.lua
source ~/.config/nvim/plugin-confs/nvim-dap-ui.lua source ~/.config/nvim/plugin-confs/nvim-dap-ui.lua
source ~/.config/nvim/plugin-confs/nvim-dap-virtual-text.lua
" source ~/.config/nvim/plugin-confs/copilot.lua " source ~/.config/nvim/plugin-confs/copilot.lua
" source ~/.config/nvim/plugin-confs/lsp-signature.lua " source ~/.config/nvim/plugin-confs/lsp-signature.lua
" source ~/.config/nvim/plugin-confs/nvim-docs-view.lua " source ~/.config/nvim/plugin-confs/nvim-docs-view.lua

View File

@ -1,8 +1,7 @@
nmap <C-d> <C-d>zz
nmap <C-u> <C-u>zz nmap <C-u> <C-u>zz
nmap n nzzzv nmap n nzzzv
nmap N Nzzzv nmap N Nzzzv
nmap <silent> <leader>x <cmd>!chmod +x %<CR>
xnoremap <leader>p "_dP xnoremap <leader>p "_dP
@ -49,8 +48,6 @@ nnoremap Q !!$SHELL<CR>
nnoremap rn :lua vim.lsp.buf.rename()<CR> nnoremap rn :lua vim.lsp.buf.rename()<CR>
nnoremap <leader>as :FloatermNew --title=aniwrapper aniwrapper -qtdoomone -D144<CR>
nnoremap <leader>ad :FloatermNew --title=aniwrapper ani-cli -q720p -cd/home/sudacode/Videos/sauce -D144<CR>
nnoremap <leader>bb :Telescope buffers<CR> nnoremap <leader>bb :Telescope buffers<CR>
nnoremap <leader>bk :bdelete<CR> nnoremap <leader>bk :bdelete<CR>
@ -59,7 +56,9 @@ nnoremap <leader>bp :bprev<CR>
nnoremap <leader>ca :lua vim.lsp.buf.code_action()<CR> nnoremap <leader>ca :lua vim.lsp.buf.code_action()<CR>
nnoremap <leader>cd :Telescope diagnostics<CR> nnoremap <leader>cd :Telescope diagnostics<CR>
nnoremap <leader>cDt :lua require("dapui").toggle()<CR> nnoremap <leader>cDn :lua vim.diagnostic.goto_next()<CR>
nnoremap <leader>cDp :lua vim.diagnostic.goto_prev()<CR>
nnoremap <leader>cl :lua vim.diagnostic.setloclist()<CR>
nnoremap <silent> <leader>cp :vert Copilot panel<CR> nnoremap <silent> <leader>cp :vert Copilot panel<CR>
nnoremap <silent> <leader>Ci :lua require('chatgpt').edit_with_instructions()<CR> nnoremap <silent> <leader>Ci :lua require('chatgpt').edit_with_instructions()<CR>
nnoremap <silent> <leader>Cd :ChatGPTRun docstring<CR> nnoremap <silent> <leader>Cd :ChatGPTRun docstring<CR>
@ -76,11 +75,37 @@ xnoremap <silent> <leader>Cs :ChatGPTRun summarize<CR>
xnoremap <silent> <leader>Cf :ChatGPTRun fix_bugs<CR> xnoremap <silent> <leader>Cf :ChatGPTRun fix_bugs<CR>
xnoremap <silent> <leader>Ce :ChatGPTRun explain<CR> xnoremap <silent> <leader>Ce :ChatGPTRun explain<CR>
nnoremap <leader>db :lua require("dap").toggle_breakpoint()<CR>
nnoremap <leader>dc :lua require("dap").continue()<CR>
nnoremap <leader>di :lua require("dap").step_into()<CR>
nnoremap <leader>do :lua require("dap").step_over()<CR>
nnoremap <leader>dO :lua require("dap").step_out()<CR>
nnoremap <leader>dr :lua require("dap").repl.open()<CR>
nnoremap <leader>dl :lua require("dap").run_last()<CR>
nnoremap <leader>dh :lua require("dap.ui.widgets").hover()<CR>
nnoremap <leader>dp :lua require("dap.ui.widgets").preview()<CR>
nnoremap <leader>df :lua require('dap.ui.widgets').centered_float(require('dap.ui.widgets').frames)<CR>
nnoremap <leader>ds :lua require('dap.ui.widgets').centered_float(require('dap.ui.widgets').scopes)<CR>
nnoremap <leader>dut :lua require("dapui").toggle()<CR>
nnoremap <leader>duo :lua require("dapui").open()<CR>
nnoremap <leader>duc :lua require("dapui").close()<CR>
nnoremap <leader>dPm :lua require("dap-python").test_method()<CR>
nnoremap <leader>dPc :lua require("dap-python").test_class()<CR>
nnoremap <leader>dPs :lua require("dap-python").debug_selection()<CR>
vnoremap <leader>dh :lua require("dap.ui.widgets").hover()<CR>
vnoremap <leader>dp :lua require("dap.ui.widgets").preview()<CR>
vnoremap <leader>dpe :lua require("dapui").eval()<CR>
nnoremap <F10> :lua require('dap').step_over()<CR>
nnoremap <F11> :lua require('dap').step_into()<CR>
nnoremap <F12> :lua require('dap').step_out()<CR>
nnoremap <leader>fb :Telescope file_browser<cr> nnoremap <leader>fb :Telescope file_browser<cr>
nnoremap <leader>ff :Telescope find_files<cr> nnoremap <leader>ff :Telescope find_files<cr>
nnoremap <leader>fg :Telescope live_grep<cr> nnoremap <leader>fg :Telescope live_grep<cr>
nnoremap <leader>fh :Telescope oldfiles<cr> nnoremap <leader>fh :Telescope oldfiles<cr>
nnoremap <leader>fd :e ~/.config/nvim/init.vim<cr> " nnoremap <leader>fd :e ~/.config/nvim/init.vim<cr>
nnoremap <leader>gb :Gitsigns blame_line<CR> nnoremap <leader>gb :Gitsigns blame_line<CR>
nnoremap <leader>gc :Telescope git_commits<CR> nnoremap <leader>gc :Telescope git_commits<CR>
@ -93,7 +118,12 @@ nnoremap gpd <cmd>lua require('goto-preview').goto_preview_definition()<CR>
nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR> nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>
nnoremap <leader>hc :Telescope commands<CR> nnoremap <leader>hc :Telescope commands<CR>
nnoremap <leader>hv :Telescope help_tags<cr> nnoremap <leader>hdc :Telescope dap commands<CR>
nnoremap <leader>hdC :Telescope dap configurations<CR>
nnoremap <leader>hdb :Telescope dap list_breakpoints<CR>
nnoremap <leader>hdv :Telescope dap variables<CR>
nnoremap <leader>hdf :Telescope dap frames<CR>
nnoremap <leader>hv :Telescope vim_options<cr>
nnoremap <leader>hk :Telescope keymaps<CR> nnoremap <leader>hk :Telescope keymaps<CR>
nnoremap <leader>hs :Telescope spell_suggest<CR> nnoremap <leader>hs :Telescope spell_suggest<CR>
@ -104,6 +134,7 @@ nnoremap <leader>j :AnyJump<CR>
nnoremap K :lua vim.lsp.buf.hover()<CR> nnoremap K :lua vim.lsp.buf.hover()<CR>
nnoremap <leader>ld :Telescope lsp_definitions<CR> nnoremap <leader>ld :Telescope lsp_definitions<CR>
nnoremap <leader>lD :Telescope diagnostics<CR>
nnoremap <leader>la :lua vim.lsp.buf.code_action()<CR> nnoremap <leader>la :lua vim.lsp.buf.code_action()<CR>
nnoremap <leader>lci :Telescope lsp_incoming_calls<CR> nnoremap <leader>lci :Telescope lsp_incoming_calls<CR>
nnoremap <leader>lco :Telescope lsp_outgoing_calls<CR> nnoremap <leader>lco :Telescope lsp_outgoing_calls<CR>
@ -116,10 +147,13 @@ nnoremap <leader>lt :Telescope lsp_type_definitions<CR>
nnoremap <leader>lw :Telescope lsp_dynamic_workspace_symbols<CR> nnoremap <leader>lw :Telescope lsp_dynamic_workspace_symbols<CR>
nnoremap <leader>n :NvimTreeToggle<CR> nnoremap <leader>n :NvimTreeToggle<CR>
" nnoremap <leader>r :NvimTreeRefresh<CR>
nnoremap <leader>ob :Telescope file_browser<CR> nnoremap <leader>ob :Telescope file_browser<CR>
nnoremap <leader>oc :ChatGPT<CR> nnoremap <leader>oc :ChatGPT<CR>
nnoremap <leader>oB :FloatermNew --title=bpytop --opener=vsplit bpytop<CR> nnoremap <leader>oC :e ~/.config/nvim/init.vim<CR>
nnoremap <leader>oB :FloatermNew --title=btop --opener=vsplit btop<CR>
nnoremap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR> nnoremap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
nnoremap <leader>of :wa<CR>:FloatermToggle floatterm<CR> nnoremap <leader>of :wa<CR>:FloatermToggle floatterm<CR>
nnoremap <leader>oh :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR> nnoremap <leader>oh :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR>
@ -129,13 +163,10 @@ nnoremap <leader>oP :FloatermNew --title=ipython-full --name=ipython-full --open
nnoremap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR> nnoremap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
nnoremap <leader>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR> nnoremap <leader>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>
nnoremap <leader>r :NvimTreeRefresh<CR>
nnoremap <Leader>sl :<C-u>SessionLoad<CR>
nnoremap <Leader>ss :<C-u>SessionSave<CR>
nnoremap <leader>sc :nohls<Cr> nnoremap <leader>sc :nohls<Cr>
nnoremap <leader>sC :Telescope commands<Cr> nnoremap <leader>sC :Telescope commands<Cr>
nnoremap <leader>sf :Telescope find_files<Cr> nnoremap <leader>sf :Telescope find_files<Cr>
nnoremap <leader>sg :Telescope glyph<Cr>
nnoremap <leader>sh :Telescope command_history<CR> nnoremap <leader>sh :Telescope command_history<CR>
nnoremap <leader>sm :Telescope man_pages<CR> nnoremap <leader>sm :Telescope man_pages<CR>
nnoremap <leader>s/ :Telescope search_history<CR> nnoremap <leader>s/ :Telescope search_history<CR>
@ -150,5 +181,7 @@ nnoremap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR>
nnoremap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR> nnoremap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
nnoremap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR> nnoremap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR>
nmap <silent> <leader>x <cmd>!chmod +x %<CR>
nnoremap <leader>y "+ nnoremap <leader>y "+
vmap <leader>y "+ vmap <leader>y "+

View File

@ -109,10 +109,9 @@ require('packer').startup(function(use)
} }
use { 'junegunn/fzf', run = function() vim.fn['fzf#install']() end } use { 'junegunn/fzf', run = function() vim.fn['fzf#install']() end }
use 'junegunn/fzf.vim'
use 'norcalli/nvim-colorizer.lua' use 'norcalli/nvim-colorizer.lua'
use 'jiangmiao/auto-pairs' use 'jiangmiao/auto-pairs'
use 'junegunn/fzf.vim'
use 'pechorin/any-jump.vim' use 'pechorin/any-jump.vim'
use 'tpope/vim-commentary' use 'tpope/vim-commentary'
use 'tpope/vim-surround' use 'tpope/vim-surround'
@ -128,6 +127,13 @@ require('packer').startup(function(use)
use { 'lewis6991/gitsigns.nvim' } use { 'lewis6991/gitsigns.nvim' }
use { 'nvim-telescope/telescope.nvim' } use { 'nvim-telescope/telescope.nvim' }
use { 'nvim-telescope/telescope-file-browser.nvim' } use { 'nvim-telescope/telescope-file-browser.nvim' }
use 'nvim-telescope/telescope-dap.nvim'
use { 'ghassan0/telescope-glyph.nvim' }
use {
'nvim-telescope/telescope-fzf-native.nvim',
run =
'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
}
use { 'ojroques/nvim-lspfuzzy' } use { 'ojroques/nvim-lspfuzzy' }
@ -174,7 +180,8 @@ require('packer').startup(function(use)
use 'folke/neodev.nvim' use 'folke/neodev.nvim'
use 'mfussenegger/nvim-dap' use 'mfussenegger/nvim-dap'
use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } } use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }
use 'mfussenegger/nvim-dap-python'
use 'theHamsta/nvim-dap-virtual-text'
use { 'Mofiqul/dracula.nvim' } use { 'Mofiqul/dracula.nvim' }
use({ use({
'NTBBloodbath/doom-one.nvim', 'NTBBloodbath/doom-one.nvim',
@ -199,7 +206,7 @@ require('packer').startup(function(use)
-- Plugins integration -- Plugins integration
vim.g.doom_one_plugin_neorg = true vim.g.doom_one_plugin_neorg = true
vim.g.doom_one_plugin_barbar = false vim.g.doom_one_plugin_barbar = false
vim.g.doom_one_plugin_telescope = false vim.g.doom_one_plugin_telescope = true
vim.g.doom_one_plugin_neogit = true vim.g.doom_one_plugin_neogit = true
vim.g.doom_one_plugin_nvim_tree = true vim.g.doom_one_plugin_nvim_tree = true
vim.g.doom_one_plugin_dashboard = true vim.g.doom_one_plugin_dashboard = true

View File

@ -1,13 +1,12 @@
local opts = { noremap = true, silent = true } -- local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap('n', '<space>e', -- vim.api.nvim_set_keymap('n', '<space>e',
'<cmd>lua vim.diagnostic.open_float()<CR>', opts) -- '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', -- vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>',
opts) -- opts)
vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', -- vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>',
opts) -- opts)
vim.api.nvim_set_keymap('n', '<space>q', -- vim.api.nvim_set_keymap('n', '<space>q',
'<cmd>lua vim.diagnostic.setloclist()<CR>', opts) -- '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
-- Use an on_attach function to only map the following keys -- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer -- after the language server attaches to the current buffer
local on_attach = function(client, bufnr) local on_attach = function(client, bufnr)

View File

@ -1,48 +1,51 @@
local dap = require('dap') local dp = require('dap-python')
dap.adapters.python = function(cb, config) dp.test_runner = 'pytest'
if config.request == 'attach' then
---@diagnostic disable-next-line: undefined-field
local port = (config.connect or config).port
---@diagnostic disable-next-line: undefined-field
local host = (config.connect or config).host or '127.0.0.1'
cb({
type = 'server',
port = assert(port,
'`connect.port` is required for a python `attach` configuration'),
host = host,
options = { source_filetype = 'python' }
})
else
cb({
type = 'executable',
command = '/home/sudacode/Projects/Python/debugpy/env/bin/python',
args = { '-m', 'debugpy.adapter' },
options = { source_filetype = 'python' }
})
end
end
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 -- local dap = require('dap')
-- dap.adapters.python = function(cb, config)
-- if config.request == 'attach' then
-- ---@diagnostic disable-next-line: undefined-field
-- local port = (config.connect or config).port
-- ---@diagnostic disable-next-line: undefined-field
-- local host = (config.connect or config).host or '127.0.0.1'
-- cb({
-- type = 'server',
-- port = assert(port,
-- '`connect.port` is required for a python `attach` configuration'),
-- host = host,
-- options = { source_filetype = 'python' }
-- })
-- else
-- cb({
-- type = 'executable',
-- command = '/home/sudacode/Projects/Python/debugpy/env/bin/python',
-- args = { '-m', 'debugpy.adapter' },
-- options = { source_filetype = 'python' }
-- })
-- end
-- end
-- 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",
program = "${file}", -- This configuration will launch the current file if used. -- -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
pythonPath = function()
-- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself. -- program = "${file}", -- This configuration will launch the current file if used.
-- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within. -- pythonPath = function()
-- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable. -- -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
local cwd = vim.fn.getcwd() -- -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
if vim.fn.executable(cwd .. '/env/bin/python') == 1 then -- -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
return cwd .. '/env/bin/python' -- local cwd = vim.fn.getcwd()
elseif vim.fn.executable(cwd .. '/.env/bin/python') == 1 then -- if vim.fn.executable(cwd .. '/env/bin/python') == 1 then
return cwd .. '/.env/bin/python' -- return cwd .. '/env/bin/python'
else -- elseif vim.fn.executable(cwd .. '/.env/bin/python') == 1 then
return '/usr/bin/python' -- return cwd .. '/.env/bin/python'
end -- else
end -- return '/usr/bin/python'
} -- end
} -- end
-- }
-- }

View File

@ -0,0 +1,34 @@
local opts = {
enabled = true, -- enable this plugin (the default)
enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination)
highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText
highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables)
show_stop_reason = true, -- show stop reason when stopped for exceptions
commented = false, -- prefix virtual text with comment string
only_first_definition = true, -- only show virtual text at first definition (if there are multiple)
all_references = false, -- show virtual text on all all references of the variable (not only definitions)
clear_on_continue = false, -- clear virtual text on "continue" (might cause flickering when stepping)
--- A callback that determines how a variable is displayed or whether it should be omitted
--- @param variable Variable https://microsoft.github.io/debug-adapter-protocol/specification#Types_Variable
--- @param buf number
--- @param stackframe dap.StackFrame https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame
--- @param node userdata tree-sitter node identified as variable definition of reference (see `:h tsnode`)
--- @param options nvim_dap_virtual_text_options Current options for nvim-dap-virtual-text
--- @return string|nil A text how the virtual text should be displayed or nil, if this variable shouldn't be displayed
display_callback = function(variable, buf, stackframe, node, options)
if options.virt_text_pos == 'inline' then
return ' = ' .. variable.value
else
return variable.name .. ' = ' .. variable.value
end
end,
-- position of virtual text, see `:h nvim_buf_set_extmark()`, default tries to inline the virtual text. Use 'eol' to set to end of line
virt_text_pos = vim.fn.has 'nvim-0.10' == 1 and 'inline' or 'eol',
-- experimental features:
all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
virt_text_win_col = 80 -- position the virtual text at a fixed window column (starting from the first text column) ,
-- e.g. 80 to position at column 80, see `:h nvim_buf_set_extmark()`
}
require("nvim-dap-virtual-text").setup(opts)

View File

@ -1,44 +1,65 @@
require('telescope').setup{ local ts = require('telescope')
defaults = { ts.setup({
-- Default configuration for telescope goes here: defaults = {
-- config_key = value, -- Default configuration for telescope goes here:
layout_strategy = 'flex', -- config_key = value,
width = 0.9, layout_strategy = 'flex',
wrap_results = true, width = 0.9,
preview = { wrap_results = true,
border = true, preview = {
borderchars = { '', '', '', '', '', '', '', '' }, border = true,
title = true, borderchars = {
dynamic_preview_title = true, '', '', '', '', '', '', '', ''
treesitter = true, },
title = true,
dynamic_preview_title = true,
treesitter = true
},
mappings = {
i = {
-- map actions.which_key to <C-h> (default: <C-/>)
-- actions.which_key shows the mappings for your picker,
-- e.g. git_{create, delete, ...}_branch for the git_branches picker
-- ["<C-/?>"] = "which_key"
}
},
file_ignore_patterns = { "^node_modules/", "^env/", "^__pycache__/" }
}, },
mappings = { pickers = {
i = { -- Default configuration for builtin pickers goes here:
-- map actions.which_key to <C-h> (default: <C-/>) -- picker_name = {
-- actions.which_key shows the mappings for your picker, -- picker_config_key = value,
-- e.g. git_{create, delete, ...}_branch for the git_branches picker -- ...
["<C-h>"] = "which_key" -- }
} -- Now the picker_config_key will be applied every time you call this
-- builtin picker
find_files = {
-- theme = "dropdown"
}
}, },
file_ignore_patterns = { "node_modules", "env", "__pycache__" } extensions = {
}, fzf = {
pickers = { fuzzy = true, -- false will only do exact matching
-- Default configuration for builtin pickers goes here: override_generic_sorter = true, -- override the generic sorter
-- picker_name = { override_file_sorter = true, -- override the file sorter
-- picker_config_key = value, case_mode = "smart_case" -- or "ignore_case" or "respect_case"
-- ... -- the default case_mode is "smart_case"
-- } },
-- Now the picker_config_key will be applied every time you call this glyph = {
-- builtin picker action = function(glyph)
find_files = { -- argument glyph is a table.
-- theme = "dropdown" -- {name="", value="", category="", description=""}
-- vim.fn.setreg("*", glyph.value)
-- print([[Press p or "*p to paste this glyph]] .. glyph.value)
-- insert glyph when picked
vim.api.nvim_put({ glyph.value }, 'c', false, true)
end
}
} }
},
extensions = { })
-- Your extension configuration goes here: ts.load_extension('dap')
-- extension_name = { ts.load_extension('fzf')
-- extension_config_key = value, ts.load_extension('glyph')
-- }
-- please take a look at the readme of the extension you want to configure
}
}

135
plugin-confs/whichkey.lua Normal file → Executable file
View File

@ -69,11 +69,25 @@ wk.setup {
} }
wk.register({ wk.register({
a = { name = "AnyJump", b = "Back", l = "Last Result" },
b = {
name = "Buffers",
b = "Show Buffers",
d = "Delete Buffer",
n = "Next Buffer",
p = "Previous Buffer"
},
c = { c = {
name = "code", name = "Code",
a = "Code Action", a = "Code Action",
d = "Diagnostics", d = "Diagnostics",
p = "Copilot Panel" D = {
name = "Diagnostic List",
n = "Next Diagnostic",
p = "Previous Diagnostic"
},
p = "Copilot Panel",
l = "Set Loclist"
}, },
C = { C = {
name = "ChatGPT", name = "ChatGPT",
@ -84,5 +98,120 @@ wk.register({
s = "Summarize", s = "Summarize",
f = "Fix Bugs", f = "Fix Bugs",
e = "Explain Code" e = "Explain Code"
} },
d = {
name = "Debug",
b = "Toggle Breakpoint",
c = "Continue",
i = "Step Into",
o = "Step Over",
O = "Step Out",
r = "REPL Open",
l = "Run Last",
h = "Hover",
p = "Preview",
f = "Frames",
s = "Scopes",
u = { name = "Dap UI", t = "Toggle", o = "Open", c = "Close" },
P = {
name = "Dap-python",
m = "Test Method",
c = "Test Class",
s = "Debug Selection"
}
},
f = {
name = "Find File",
b = "File Browser",
f = "Find in Current Directory",
g = "Live Grep",
h = "File History"
},
g = {
name = "Git",
b = "Blame",
c = "Commit",
f = "Files",
g = "Lazygit",
P = "Close goto-preview window",
R = "Telescope References",
p = {
"Peek",
c = "Close Preview",
d = "Preview Definition",
i = "Preview Implementation"
}
},
h = {
name = "Help",
c = "Commands",
d = {
name = "Dap",
c = "Commands",
C = "Configurations",
b = "Breakpoints",
v = "Variables",
f = "Frames"
},
v = "Vim Options",
k = "Keymaps",
s = "Spell Suggest"
},
i = { name = "Insert", s = { name = "Snippet", p = "Python File" } },
j = "Any Jump",
K = "Show Docs",
l = {
name = "LSP",
d = "Definitions",
D = "Diagnostics",
a = "Code Actions",
c = { name = "Calls", i = "Incoming", o = "Outgoing" },
h = "Signature Help",
i = "Implementations",
r = "References",
R = "Rename",
s = "Document Symbols",
t = "Type Definitions",
w = "Workspace Symbols"
},
n = "NvimTree",
o = {
name = "Open",
b = "File Browser",
B = "Btop",
c = "ChatGPT",
C = "Nvim Config",
d = "Lazydocker",
f = "Floating Terminal",
h = "Horizontal Terminal",
p = "Ipython",
P = "Ipython (fullscreen)",
r = "Ranger",
t = "Vertical Terminal"
},
s = {
name = "Search",
c = "Clear Highlights",
C = "Commands",
f = "Files",
g = "Glyph",
h = "Command History",
m = "Man Pages"
},
t = {
name = "Toggle",
c = "Colorscheme",
f = "Floating Terminal",
p = "Ipython",
P = "Ipython (fullscreen)",
t = "Split Terminal"
},
w = {
name = "Workspace",
a = "Add Folder",
l = "List Folders",
r = "Remove Folder"
},
x = "Set Executable Bit",
y = "System Yank"
}, { prefix = "<leader>" }) }, { prefix = "<leader>" })