Juni Kim 2 years ago
parent
commit
39debe925d
  1. 24
      after/plugin/dap.lua
  2. 5
      after/plugin/lsp.lua
  3. 15
      after/plugin/zenmode.lua
  4. 1
      lua/junikim/packer.lua

24
after/plugin/dap.lua

@ -0,0 +1,24 @@
vim.keymap.set('n', '<F1>', function() require('dap').continue() end)
vim.keymap.set('n', '<F2>', function() require('dap').step_over() end)
vim.keymap.set('n', '<F3>', function() require('dap').step_into() end)
vim.keymap.set('n', '<F4>', function() require('dap').step_out() end)
vim.keymap.set('n', '<Leader>b', function() require('dap').toggle_breakpoint() end)
vim.keymap.set('n', '<Leader>B', function() require('dap').set_breakpoint() end)
vim.keymap.set('n', '<Leader>lp',
function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) end)
vim.keymap.set('n', '<Leader>dr', function() require('dap').repl.open() end)
vim.keymap.set('n', '<Leader>dl', function() require('dap').run_last() end)
vim.keymap.set({ 'n', 'v' }, '<Leader>dh', function()
require('dap.ui.widgets').hover()
end)
vim.keymap.set({ 'n', 'v' }, '<Leader>dp', function()
require('dap.ui.widgets').preview()
end)
vim.keymap.set('n', '<Leader>df', function()
local widgets = require('dap.ui.widgets')
widgets.centered_float(widgets.frames)
end)
vim.keymap.set('n', '<Leader>ds', function()
local widgets = require('dap.ui.widgets')
widgets.centered_float(widgets.scopes)
end)

5
after/plugin/lsp.lua

@ -85,6 +85,11 @@ vim.keymap.set("n", "<leader>ft", function()
end) end)
require('mason').setup() require('mason').setup()
require("mason-nvim-dap").setup({
automatic_setup = true,
})
require 'mason-nvim-dap'.setup_handlers {}
require('mason-null-ls').setup({ require('mason-null-ls').setup({
ensure_installed = { "prettier", "autopep8", "eslint", "gofmt", "rustfmt", "shellcheck" }, ensure_installed = { "prettier", "autopep8", "eslint", "gofmt", "rustfmt", "shellcheck" },

15
after/plugin/zenmode.lua

@ -1,22 +1,15 @@
require("zen-mode").setup {
local zenmode = require('zen-mode');
zenmode.setup {
-- your configuration comes here -- your configuration comes here
-- or leave it empty to use the default settings -- or leave it empty to use the default settings
-- refer to the configuration section below -- refer to the configuration section below
} }
vim.keymap.set("n", "<leader>z", function() vim.keymap.set("n", "<leader>z", function()
require("zen-mode").toggle({
zenmode.toggle({
window = { window = {
width = 90 width = 90
}, },
on_open = function(win)
vim.o.wrap = true
vim.o.relativenumber = false
end,
-- callback where you can add custom code when the Zen window closes
on_close = function()
vim.o.wrap = false
vim.o.relativenumber = true
end,
}) })
end) end)

1
lua/junikim/packer.lua

@ -49,6 +49,7 @@ return require('packer').startup(function(use)
{ 'rafamadriz/friendly-snippets' }, -- Optional { 'rafamadriz/friendly-snippets' }, -- Optional
{ "jose-elias-alvarez/null-ls.nvim", "jay-babu/mason-null-ls.nvim" }, { "jose-elias-alvarez/null-ls.nvim", "jay-babu/mason-null-ls.nvim" },
{ "mfussenegger/nvim-dap", "jay-babu/mason-nvim-dap.nvim" }
} }
} }

Loading…
Cancel
Save