nvim: config
This commit is contained in:
parent
beac69d28f
commit
da75a7c00c
5 changed files with 47 additions and 31 deletions
|
@ -1 +1,2 @@
|
|||
require("config.options")
|
||||
require("config.lazy")
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
local M = {
|
||||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
|
||||
dependencies = {
|
||||
{ "rcarriga/nvim-dap-ui" },
|
||||
{
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
config = function()
|
||||
|
@ -16,24 +14,40 @@ local M = {
|
|||
config = function()
|
||||
require("dap-go").setup()
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>y", ":lua require('dap-go').debug_test()<CR>" },
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ "DD", ":lua require'dap'.toggle_breakpoint()<cr>", desc = "Toggle Breakpoint" },
|
||||
{ "Dc", ":lua require'dap'.continue()<cr>", desc = "Continue" },
|
||||
{ "Di", ":lua require'dap'.step_into()<cr>", desc = "Step Into" },
|
||||
{ "Do", ":lua require'dap'.step_over()<cr>", desc = "Step Over" },
|
||||
{ "DO", ":lua require'dap'.step_out()<cr>", desc = "Step Out" },
|
||||
{ "Dh", ":lua require'dap.ui.widgets'.hover()<cr>", desc = "Hover" },
|
||||
{ "Dr", ":lua require'dap'.repl.toggle({height = 5})<cr>", desc = "Toogle Repl" },
|
||||
},
|
||||
config = function()
|
||||
require("dap")
|
||||
require("dap.ext.vscode").load_launchjs()
|
||||
|
||||
vim.fn.sign_define(
|
||||
"DapBreakpoint",
|
||||
{ text = "", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
|
||||
)
|
||||
vim.fn.sign_define(
|
||||
"DapBreakpointCondition",
|
||||
{ text = "ﳁ", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
|
||||
)
|
||||
vim.fn.sign_define(
|
||||
"DapBreakpointRejected",
|
||||
{ text = "", texthl = "DapBreakpoint", linehl = "DapBreakpoint", numhl = "DapBreakpoint" }
|
||||
)
|
||||
vim.fn.sign_define(
|
||||
"DapLogPoint",
|
||||
{ text = "", texthl = "DapLogPoint", linehl = "DapLogPoint", numhl = "DapLogPoint" }
|
||||
)
|
||||
vim.fn.sign_define(
|
||||
"DapStopped",
|
||||
{ text = "", texthl = "DapStopped", linehl = "DapStopped", numhl = "DapStopped" }
|
||||
)
|
||||
end,
|
||||
}
|
||||
|
||||
function M.init()
|
||||
local silent = { silent = true }
|
||||
vim.fn.sign_define("DapStopped", { text = "⇒", texthl = "", linehl = "debugPC", numhl = "" })
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "🧘", texthl = "", linehl = "debugPC", numhl = "" })
|
||||
vim.keymap.set("n", "DD", ":lua require 'dap'.toggle_breakpoint()<CR>", silent)
|
||||
vim.keymap.set("n", "Dc", ":lua require 'dap'.continue()<CR>", silent)
|
||||
vim.keymap.set("n", "Di", ":lua require 'dap'.step_into()<CR>", silent)
|
||||
vim.keymap.set("n", "Do", ":lua require 'dap'.step_over()<CR>", silent)
|
||||
vim.keymap.set("n", "DO", ":lua require 'dap'.step_out()<CR>", silent)
|
||||
vim.keymap.set("n", "Dr", ":lua require 'dap'.repl.toggle({height = 5})<CR>", silent)
|
||||
vim.keymap.set("n", "Dh", ":lua require 'dap.ui.widgets'.hover()<CR>", silent)
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
|
@ -104,13 +104,13 @@ return {
|
|||
end,
|
||||
},
|
||||
|
||||
{
|
||||
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
config = function()
|
||||
require("lsp_lines").setup()
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- {
|
||||
-- url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
-- config = function()
|
||||
-- require("lsp_lines").setup()
|
||||
-- vim.diagnostic.config({
|
||||
-- virtual_text = false,
|
||||
-- })
|
||||
-- end,
|
||||
-- },
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ function M.config()
|
|||
builtins.formatting.shfmt,
|
||||
builtins.formatting.sqlfluff,
|
||||
builtins.formatting.buildifier,
|
||||
builtins.formatting.prettierd,
|
||||
builtins.completion.spell,
|
||||
builtins.code_actions.eslint_d,
|
||||
builtins.diagnostics.buf.with({
|
||||
|
|
|
@ -26,7 +26,7 @@ function M.config()
|
|||
vim.keymap.set("n", "<leader>f", '<cmd>lua require("telescope.builtin").oldfiles()<CR>')
|
||||
vim.keymap.set("n", "<space>", '<cmd>lua require("telescope.builtin").oldfiles({cwd_only=true})<CR>')
|
||||
vim.keymap.set("n", "<leader><space>", '<cmd>lua require("telescope.builtin").oldfiles()<CR>')
|
||||
vim.keymap.set("n", "<leader>d", '<cmd>lua require("telescope.builtin").diagnostics()<CR>')
|
||||
vim.keymap.set("n", "<leader>d", '<cmd>lua require("telescope.builtin").diagnostics({bufnr=0})<CR>')
|
||||
vim.keymap.set("n", "<leader>e", '<cmd>lua require("telescope.builtin").git_files()<CR>')
|
||||
vim.keymap.set("n", "<leader>g", '<cmd>lua require("telescope.builtin").git_status()<CR>')
|
||||
vim.keymap.set("n", "<leader>a", '<cmd>lua require("telescope.builtin").lsp_code_actions()<CR>')
|
||||
|
|
Loading…
Reference in a new issue