forked from nvim-lua/kickstart.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rust, dap. Remove filetree for oil (#11)
- Loading branch information
1 parent
0e9ca0c
commit 3965a33
Showing
5 changed files
with
88 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
return { | ||
{ | ||
'mfussenegger/nvim-dap', | ||
dependencies = { | ||
'rcarriga/nvim-dap-ui', | ||
'theHamsta/nvim-dap-virtual-text', | ||
'nvim-neotest/nvim-nio', | ||
'williamboman/mason.nvim', | ||
}, | ||
config = function() | ||
local dap = require 'dap' | ||
local ui = require 'dapui' | ||
|
||
require('dapui').setup() | ||
|
||
require('nvim-dap-virtual-text').setup {} | ||
|
||
vim.keymap.set('n', '<space>b', dap.toggle_breakpoint) | ||
vim.keymap.set('n', '<space>dr', dap.run_to_cursor) | ||
|
||
-- Eval var under cursor | ||
vim.keymap.set('n', '<space>?', function() | ||
require('dapui').eval(nil, { enter = true }) | ||
end) | ||
|
||
vim.keymap.set('n', '<F1>', dap.continue) | ||
vim.keymap.set('n', '<F2>', dap.step_into) | ||
vim.keymap.set('n', '<F3>', dap.step_over) | ||
vim.keymap.set('n', '<F4>', dap.step_out) | ||
vim.keymap.set('n', '<F5>', dap.step_back) | ||
vim.keymap.set('n', '<F6>', dap.restart) | ||
|
||
dap.listeners.before.attach.dapui_config = function() | ||
ui.open() | ||
end | ||
dap.listeners.before.launch.dapui_config = function() | ||
ui.open() | ||
end | ||
dap.listeners.before.event_terminated.dapui_config = function() | ||
ui.close() | ||
end | ||
dap.listeners.before.event_exited.dapui_config = function() | ||
ui.close() | ||
end | ||
end, | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
return { | ||
{ | ||
'stevearc/oil.nvim', | ||
dependencies = { 'nvim-tree/nvim-web-devicons' }, | ||
config = function() | ||
require('oil').setup { | ||
columns = { 'icons' }, | ||
keymaps = { | ||
['<C-h>'] = false, | ||
['<C-v>'] = 'actions.select_vsplit', | ||
}, | ||
view_options = { | ||
show_hidden = true, | ||
}, | ||
} | ||
|
||
-- Open parent directory in current window | ||
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' }) | ||
|
||
-- Open parent directory in floating window | ||
vim.keymap.set('n', '<space>--', require('oil').toggle_float) | ||
end, | ||
}, | ||
} |