Browse Source

Some changes to file finding and adding a debugger

master
Taylor Bockman 1 year ago
parent
commit
c20a8499c5
  1. 12
      lua/conf/keybinds.lua
  2. 5
      lua/conf/langs/debugging.lua
  3. 7
      lua/conf/langs/rust.lua
  4. 3
      lua/conf/plugins.lua
  5. 25
      lua/conf/ui.lua

12
lua/conf/keybinds.lua

@ -57,3 +57,15 @@ vim.api.nvim_set_keymap(
[[:let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>]], [[:let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar>:nohl<CR>]],
keymap_opts) keymap_opts)
-- vimspector keybinds
vim.keymap.set('n', '<F9>', '<cmd>call vimspector#Launch()<cr>')
vim.keymap.set('n', '<F5>', '<cmd>call vimspector#StepOver()<cr>')
vim.keymap.set('n', '<F8>', '<cmd>call vimspector#Reset()<cr>')
vim.keymap.set('n', '<F11>', '<cmd>call vimspector#StepOver()<cr>')
vim.keymap.set('n', '<F12>', '<cmd>call vimspector#StepOut()<cr>')
vim.keymap.set('n', '<F10>', '<cmd>call vimspector#StepInto()<cr>')
vim.keymap.set('n', "Db", ":call vimspector#ToggleBreakpoint()<cr>")
vim.keymap.set('n', "Dw", ":call vimspector#AddWatch()<cr>")
vim.keymap.set('n', "De", ":call vimspector#Evaluate()<cr>")

5
lua/conf/langs/debugging.lua

@ -0,0 +1,5 @@
-- vimspector configuration
vim.g.vimspector_sidebar_width = 65
vim.g.vimspector_sidebar_height = 15
vim.g.vimspector_terminal_maxwidth = 70

7
lua/conf/langs/rust.lua

@ -8,5 +8,12 @@ rt.setup({
-- Code action groups -- Code action groups
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr }) vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
end, end,
settings = {
['rust-analyzer'] = {
checkOnSave = {
command = "clippy"
}
}
}
}, },
}) })

3
lua/conf/plugins.lua

@ -73,6 +73,9 @@ Plug 'skywind3000/asyncrun.vim'
-- Syntax highlighting -- Syntax highlighting
Plug 'sheerun/vim-polyglot' Plug 'sheerun/vim-polyglot'
-- Debugging
Plug 'puremourning/vimspector'
-- Languages -- Languages
------------------------- -------------------------

25
lua/conf/ui.lua

@ -14,7 +14,30 @@ require('telescope').setup{
pickers = { pickers = {
find_files = { find_files = {
theme = "dropdown", theme = "dropdown",
hidden = true,
prompt_prefix=🔍,
file_ignore_patterns = {
".git/",
".cache",
"%.o",
"%.a",
"%.out",
"%.class",
"%.pdf",
"%.mkv",
"%.mp4",
"%.zip"
},
} }
}, },
extensions = {} extensions = {
fzf = {
fuzzy = true,
override_generic_sorter = true,
override_file_sorter = true,
case_mode = "smart_case",
}
}
} }
require('telescope').load_extension('fzf')

Loading…
Cancel
Save