feat: update documentation and configuration files for Neovim setup
Signed-off-by: juliano.barbosa <julianomb@gmail.com>
This commit is contained in:
parent
76edf81b0a
commit
7128ca764c
47 changed files with 1956 additions and 1147 deletions
|
|
@ -1,3 +1,23 @@
|
|||
# MIT License
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
-- debug.la
|
||||
--
|
||||
-- Shows how to use the DAP plugin to debug your code.
|
||||
|
|
@ -69,7 +89,7 @@ return {
|
|||
{
|
||||
'<leader>B',
|
||||
function()
|
||||
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
|
||||
require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))
|
||||
end,
|
||||
desc = 'Debug: Set Breakpoint',
|
||||
},
|
||||
|
|
@ -83,13 +103,11 @@ return {
|
|||
},
|
||||
},
|
||||
config = function()
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
local path = require('mason-registry').get_package('debugpy'):get_install_path()
|
||||
local dap = require('dap')
|
||||
local dapui = require('dapui')
|
||||
require('dap-python').setup(os.getenv('PYENV_ROOT') .. '/versions/3.11.9/bin/python')
|
||||
|
||||
require('dap-python').setup(os.getenv 'PYENV_ROOT' .. '/versions/3.11.9/bin/python')
|
||||
|
||||
require('mason-nvim-dap').setup {
|
||||
require('mason-nvim-dap').setup({
|
||||
-- Makes a best effort to setup the various debuggers with
|
||||
-- reasonable debug configurations
|
||||
automatic_installation = true,
|
||||
|
|
@ -109,11 +127,11 @@ return {
|
|||
'jq',
|
||||
'stylua',
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
-- Dap UI setup
|
||||
-- For more information, see |:help nvim-dap-ui|
|
||||
dapui.setup {
|
||||
dapui.setup({
|
||||
-- Set icons to characters that are more likely to work in every terminal.
|
||||
-- Feel free to remove or use ones that you like more! :)
|
||||
-- Don't feel like these are good choices.
|
||||
|
|
@ -131,7 +149,7 @@ return {
|
|||
disconnect = '⏏',
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
-- Change breakpoint icons
|
||||
-- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' })
|
||||
|
|
@ -150,12 +168,12 @@ return {
|
|||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
|
||||
-- Install golang specific config
|
||||
require('dap-go').setup {
|
||||
require('dap-go').setup({
|
||||
delve = {
|
||||
-- On Windows delve must be run attached or it crashes.
|
||||
-- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring
|
||||
detached = vim.fn.has 'win32' == 0,
|
||||
detached = vim.fn.has('win32') == 0,
|
||||
},
|
||||
}
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue