finished setting up vimspector
This commit is contained in:
parent
cc14667dc8
commit
1b5fdb9724
9 changed files with 86 additions and 26 deletions
11
init.lua
11
init.lua
|
@ -1,9 +1,11 @@
|
|||
-- keep these above
|
||||
require "user.options"
|
||||
require "user.keymaps"
|
||||
require "user.plugins"
|
||||
|
||||
--require "user.alpha"
|
||||
require "user.autocommands"
|
||||
require "user.colorscheme"
|
||||
require "user.exrc"
|
||||
require "user.cmp"
|
||||
require "user.telescope"
|
||||
require "user.gitsigns"
|
||||
|
@ -18,6 +20,9 @@ require "user.project"
|
|||
require "user.impatient"
|
||||
require "user.illuminate"
|
||||
require "user.indentline"
|
||||
require "user.alpha"
|
||||
require "user.lsp"
|
||||
require "user.dap"
|
||||
--require "user.dap"
|
||||
|
||||
require "user.exrc"
|
||||
--require "user.rust-tools"
|
||||
require "user.vimspector"
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
--require("catppuccin").setup()
|
||||
--vim.cmd [[colorscheme catppuccin]]
|
||||
|
||||
--TokyonNight
|
||||
--local colorscheme = "tokyonight-night"
|
||||
|
||||
--Catppuccin
|
||||
vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha
|
||||
local colorscheme = "catppuccin"
|
||||
|
||||
--DarkPlus
|
||||
--local colorscheme = "darkplus"
|
||||
|
||||
local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
|
||||
if not status_ok then
|
||||
return
|
||||
|
|
|
@ -35,7 +35,7 @@ dapui.setup {
|
|||
},
|
||||
}
|
||||
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
|
||||
vim.fn.sign_define("DapBreakpoint", { text = "●", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
|
||||
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
|
@ -48,3 +48,16 @@ end
|
|||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
|
||||
local codelldb_path = "/usr/lib/codelldb/adapter/codelldb"
|
||||
local liblldb_path = "/usr/lib/codelldb/adapter/libcodelldb.so"
|
||||
|
||||
dap.adapters.codelldb = {
|
||||
type = 'server',
|
||||
host = '127.0.0.1',
|
||||
port = "13000",
|
||||
executable = {
|
||||
command = codelldb_path,
|
||||
args = {"--liblldb", liblldb_path, "--port", "13000"},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ keymap("n", "<leader>h", "<cmd>nohlsearch<CR>", opts)
|
|||
|
||||
-- Close buffers
|
||||
keymap("n", "<S-q>", "<cmd>Bdelete<CR>", opts)
|
||||
keymap("n", "<S-q>", "<cmd>Bdelete!<CR>", opts)
|
||||
|
||||
-- Better paste
|
||||
keymap("v", "p", '"_dP', opts)
|
||||
|
@ -76,13 +77,30 @@ keymap("n", "<leader>fb", ":Telescope buffers<CR>", opts)
|
|||
keymap("n", "<leader>/", "<cmd>lua require('Comment.api').toggle_current_linewise()<CR>", opts)
|
||||
keymap("x", "<leader>/", '<ESC><CMD>lua require("Comment.api").toggle_linewise_op(vim.fn.visualmode())<CR>')
|
||||
|
||||
-- DAP
|
||||
keymap("n", "<leader>db", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", opts)
|
||||
keymap("n", "<leader>dc", "<cmd>lua require'dap'.continue()<cr>", opts)
|
||||
keymap("n", "<leader>di", "<cmd>lua require'dap'.step_into()<cr>", opts)
|
||||
keymap("n", "<leader>do", "<cmd>lua require'dap'.step_over()<cr>", opts)
|
||||
keymap("n", "<leader>dO", "<cmd>lua require'dap'.step_out()<cr>", opts)
|
||||
keymap("n", "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", opts)
|
||||
keymap("n", "<leader>dl", "<cmd>lua require'dap'.run_last()<cr>", opts)
|
||||
keymap("n", "<leader>du", "<cmd>lua require'dapui'.toggle()<cr>", opts)
|
||||
keymap("n", "<leader>dt", "<cmd>lua require'dap'.terminate()<cr>", opts)
|
||||
---- DAP
|
||||
--keymap("n", "<F9>", "<cmd>lua require'dap'.toggle_breakpoint()<cr>", opts)
|
||||
--keymap("n", "<F5>", "<cmd>lua require'dap'.continue()<cr>", opts)
|
||||
--keymap("n", "<F10>", "<cmd>lua require'dap'.step_over()<cr>", opts)
|
||||
--keymap("n", "<F11>", "<cmd>lua require'dap'.step_into()<cr>", opts)
|
||||
--keymap("n", "<F23>", "<cmd>lua require'dap'.step_out()<cr>", opts)
|
||||
--keymap("n", "<leader>dr", "<cmd>lua require'dap'.repl.toggle()<cr>", opts)
|
||||
--keymap("n", "<leader>dl", "<cmd>lua require'dap'.run_last()<cr>", opts)
|
||||
--keymap("n", "<leader>du", "<cmd>lua require'dapui'.toggle()<cr>", opts)
|
||||
--keymap("n", "<F17>", "<cmd>lua require'dap'.terminate()<cr>", opts)
|
||||
|
||||
-- Vimspector
|
||||
keymap("n", "<F9>", "<Plug>VimspectorToggleBreakpoint", opts)
|
||||
keymap("n", "<F5>", "<plug>VimspectorContinue", opts)
|
||||
keymap("n", "<F10>", "<Plug>VimspectorStepOver", opts)
|
||||
keymap("n", "<F11>", "<Plug>VimspectorStepInto", opts)
|
||||
keymap("n", "<F23>", "<Plug>VimspectorStepOut", opts)
|
||||
keymap("n", "<F17>", "<cmd>VimspectorReset<cr>", opts) -- Shift+F5
|
||||
keymap("n", "<F41>", "<Plug>VimspectorRestart", opts) -- Ctrl+Shift+F5
|
||||
keymap("n", "<leader>di", "<Plug>VimspectorBalloonEval", opts)
|
||||
--keymap("n", "<leader>dl", "<cmd>lua require'dap'.run_last()<cr>", opts)
|
||||
--keymap("n", "<leader>du", "<cmd>lua require'dapui'.toggle()<cr>", opts)
|
||||
--keymap("n", "<F17>", "<cmd>lua require'dap'.terminate()<cr>", opts)
|
||||
|
||||
|
||||
keymap("n", "<leader>bf", vim.lsp.buf.format, opts) -- Shift+F5
|
||||
keymap("v", "<leader>bf", vim.lsp.buf.format, opts) -- Shift+F5
|
||||
|
|
|
@ -23,7 +23,7 @@ M.setup = function()
|
|||
end
|
||||
|
||||
local config = {
|
||||
virtual_text = false, -- disable virtual text
|
||||
virtual_text = true, -- disable virtual text
|
||||
signs = {
|
||||
active = signs, -- show signs
|
||||
},
|
||||
|
|
|
@ -2,7 +2,7 @@ return {
|
|||
settings = {
|
||||
python = {
|
||||
analysis = {
|
||||
typeCheckingMode = "off",
|
||||
typeCheckingMode = "on",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -6,8 +6,8 @@ return {
|
|||
},
|
||||
workspace = {
|
||||
library = {
|
||||
[vim.fn.expand "$VIMRUNTIME/lua"] = true,
|
||||
[vim.fn.stdpath "config" .. "/lua"] = true,
|
||||
[vim.fn.expand "$VIMRUNTIME/lua"] = false,
|
||||
[vim.fn.stdpath "config" .. "/lua"] = false,
|
||||
},
|
||||
},
|
||||
telemetry = {
|
||||
|
|
|
@ -93,16 +93,24 @@ return packer.startup(function(use)
|
|||
"nvim-treesitter/nvim-treesitter",
|
||||
commit = "8e763332b7bf7b3a426fd8707b7f5aa85823a5ac",
|
||||
}
|
||||
use {
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
commit = "2f9f75d33158c0289c70cc1e0975af9d36ec16b2",
|
||||
}
|
||||
|
||||
-- Git
|
||||
use { "lewis6991/gitsigns.nvim", commit = "f98c85e7c3d65a51f45863a34feb4849c82f240f" }
|
||||
|
||||
-- DAP
|
||||
use { "mfussenegger/nvim-dap", commit = "014ebd53612cfd42ac8c131e6cec7c194572f21d" }
|
||||
use { "rcarriga/nvim-dap-ui", commit = "d76d6594374fb54abf2d94d6a320f3fd6e9bb2f7" }
|
||||
use { "ravenxrz/DAPInstall.nvim", commit = "8798b4c36d33723e7bba6ed6e2c202f84bb300de" }
|
||||
---- DAP
|
||||
--use { "mfussenegger/nvim-dap", commit = "014ebd53612cfd42ac8c131e6cec7c194572f21d" }
|
||||
--use { "rcarriga/nvim-dap-ui", commit = "d76d6594374fb54abf2d94d6a320f3fd6e9bb2f7" }
|
||||
--use { "ravenxrz/DAPInstall.nvim", commit = "8798b4c36d33723e7bba6ed6e2c202f84bb300de" }
|
||||
|
||||
use { "MunifTanjim/exrc.nvim" }
|
||||
use { "simrat39/rust-tools.nvim" }
|
||||
|
||||
-- VimSpector
|
||||
use { "puremourning/vimspector" }
|
||||
|
||||
-- Automatically set up your configuration after cloning packer.nvim
|
||||
-- Put this at the end after all plugins
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
local status_ok, treesitter = pcall(require, "nvim-treesitter")
|
||||
local status_ok, _ = pcall(require, "nvim-treesitter")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
|
||||
local configs
|
||||
status_ok, configs = pcall(require, "nvim-treesitter.configs")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
@ -14,7 +15,7 @@ configs.setup({
|
|||
ignore_install = { "" }, -- List of parsers to ignore installing
|
||||
sync_install = false, -- install languages synchronously (only applied to `ensure_installed`)
|
||||
|
||||
highlight = {
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = { "css" }, -- list of language that will be disabled
|
||||
},
|
||||
|
@ -29,3 +30,12 @@ configs.setup({
|
|||
},
|
||||
|
||||
})
|
||||
|
||||
local context
|
||||
status_ok, context = pcall(require, "nvim-treesitter.context")
|
||||
if not status_ok then
|
||||
return
|
||||
end
|
||||
|
||||
context.setup({})
|
||||
|
||||
|
|
Loading…
Reference in a new issue