Trouble, Debug Go, Noice

This commit is contained in:
ChrisHilborne 2024-02-13 23:12:50 +01:00
parent 13c4121987
commit eb3588923f
5 changed files with 74 additions and 14 deletions

View File

@ -40,9 +40,12 @@ vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><
vim.keymap.set("n", "<leader>+", "<cmd>!chmod +x %<CR>", { silent = true }) vim.keymap.set("n", "<leader>+", "<cmd>!chmod +x %<CR>", { silent = true })
--trouble.nvim --trouble.nvim
vim.keymap.set("n", "<leader>xx", function() require("trouble").toggle() end) vim.keymap.set("n", "<leader>xx", function() require("trouble").toggle() end, { desc = 'Open Trouble' })
vim.keymap.set("n", "<leader>xw", function() require("trouble").toggle("workspace_diagnostics") end) vim.keymap.set("n", "<leader>xw", function() require("trouble").toggle("workspace_diagnostics") end,
vim.keymap.set("n", "<leader>xd", function() require("trouble").toggle("document_diagnostics") end) { desc = 'Trouble [w]orkspace Diagnostics' })
vim.keymap.set("n", "<leader>xq", function() require("trouble").toggle("quickfix") end) vim.keymap.set("n", "<leader>xd", function() require("trouble").toggle("document_diagnostics") end,
vim.keymap.set("n", "<leader>xl", function() require("trouble").toggle("loclist") end) { desc = 'Trouble [d]ocument Diagnostics' })
vim.keymap.set("n", "gR", function() require("trouble").toggle("lsp_references") end) vim.keymap.set("n", "<leader>xq", function() require("trouble").toggle("quickfix") end, { desc = 'Trouble [q]uickfix' })
vim.keymap.set("n", "<leader>xl", function() require("trouble").toggle("loclist") end, { desc = 'Trouble [l]oclist' })
vim.keymap.set("n", "<leader>xR", function() require("trouble").toggle("lsp_references") end,
{ desc = 'Trouble [g]o to [R]eferences' })

View File

@ -25,6 +25,19 @@ return {
local dap = require 'dap' local dap = require 'dap'
local dapui = require 'dapui' local dapui = require 'dapui'
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
vim.fn.sign_define('DapBreakpoint', { text = '🟥', texthl = '', linehl = '', numhl = '' })
vim.fn.sign_define('DapStopped', { text = '▶️', texthl = '', linehl = '', numhl = '' })
require('mason-nvim-dap').setup { require('mason-nvim-dap').setup {
-- Makes a best effort to setup the various debuggers with -- Makes a best effort to setup the various debuggers with
-- reasonable debug configurations -- reasonable debug configurations

View File

@ -0,0 +1,9 @@
return {
"folke/neodev.nvim",
config = function()
require("neodev").setup({
library = { plugins = { "nvim-dap-ui" }, types = true },
})
end,
opts = {},
}

View File

@ -0,0 +1,35 @@
return {
"folke/noice.nvim",
event = "VeryLazy",
opts = {
-- add any options here
},
dependencies = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
-- "rcarriga/nvim-notify",
},
setup = function()
require("noice").setup({
lsp = {
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
override = {
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
["vim.lsp.util.stylize_markdown"] = true,
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
},
},
-- you can enable a preset for easier configuration
presets = {
bottom_search = true, -- use a classic bottom cmdline for search
command_palette = true, -- position the cmdline and popupmenu together
long_message_to_split = true, -- long messages will be sent to a split
inc_rename = false, -- enables an input dialog for inc-rename.nvim
lsp_doc_border = false, -- add a border to hover docs and signature help
},
})
end
}

View File

@ -1,9 +1,9 @@
return { return {
-- "folke/trouble.nvim", "folke/trouble.nvim",
-- dependencies = { "nvim-tree/nvim-web-devicons" }, dependencies = { "nvim-tree/nvim-web-devicons" },
-- opts = { opts = {
-- -- 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
-- }, },
} }