fix: dap
This commit is contained in:
parent
b0664537c3
commit
85094f82ab
6 changed files with 28 additions and 17 deletions
|
|
@ -1,12 +1,8 @@
|
|||
local dap = require("dap")
|
||||
dap.adapters.codelldb = {
|
||||
type = "server",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
-- CHANGE THIS to your path!
|
||||
command = "/home/dashie/.local/share/nvim/mason/packages/codelldb/extension/adapter/codelldb",
|
||||
args = { "--port", "${port}" },
|
||||
},
|
||||
dap.adapters.lldb = {
|
||||
type = 'executable',
|
||||
command = '/usr/bin/lldb-vscode',
|
||||
name = "lldb"
|
||||
}
|
||||
|
||||
local rust_dap = vim.fn.getcwd()
|
||||
|
|
@ -15,7 +11,7 @@ for w in rust_dap:gmatch("([^/]+)") do filename = w end
|
|||
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
type = "codelldb",
|
||||
type = "lldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return rust_dap .. "/target/debug/" .. filename
|
||||
|
|
@ -29,13 +25,14 @@ dap.configurations.rust = {
|
|||
|
||||
dap.configurations.cpp = {
|
||||
{
|
||||
type = "codelldb",
|
||||
name = "debug cpp",
|
||||
type = "lldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/build/", "file")
|
||||
end,
|
||||
--program = '${fileDirname}/${fileBasenameNoExtension}',
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = true,
|
||||
terminal = "integrated",
|
||||
},
|
||||
}
|
||||
|
|
@ -115,10 +112,10 @@ require("dapui").setup({
|
|||
})
|
||||
require("mason-nvim-dap").setup({
|
||||
ensure_installed = {
|
||||
"codelldb",
|
||||
"bash-debug-adapter",
|
||||
"firefox-debug-adapter",
|
||||
"js-debug-adapter",
|
||||
"node-debug2-adapter",
|
||||
},
|
||||
})
|
||||
require("nvim-dap-virtual-text").setup()
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ local keymap = vim.api.nvim_set_keymap
|
|||
keymap("n", "<F5>", ':lua require("dap").toggle_breakpoint()<CR>', opts)
|
||||
keymap("n", "<F6>", ':lua require("dap").step_over()<CR>', opts)
|
||||
keymap("n", "<F7>", ':lua require("dap").step_into()<CR>', opts)
|
||||
keymap("n", "<F8>", ':lua require("dap").continue()<CR> :lua require("dapui").toggle()<CR>', opts)
|
||||
keymap("n", "<F8>", ':lua require("dapui").toggle()<CR> :lua require("dap").continue()<CR> ', opts)
|
||||
keymap("n", "<F9>", ':lua require("dap").continue()<CR>', opts)
|
||||
keymap("n", "<F10>", ':lua require("dap").close()<CR> :lua require("dapui").toggle()<CR>', opts)
|
||||
|
||||
|
|
@ -26,6 +26,15 @@ keymap("n", "<leader>e", ":Telescope lsp_type_definitions<CR>", opts)
|
|||
keymap("n", "<leader>a", ":lua vim.lsp.buf.code_action()<CR>", opts)
|
||||
keymap("n", "<leader>s", ":lua vim.lsp.buf.signature_help()<CR>", opts)
|
||||
|
||||
-- harpoon man
|
||||
|
||||
keymap("n", "<C-1>", ":lua require('harpoon.ui').nav_file(1)<CR>", opts)
|
||||
keymap("n", "<C-2>", ":lua require('harpoon.ui').nav_file(2)<CR>", opts)
|
||||
keymap("n", "<C-3>", ":lua require('harpoon.ui').nav_file(3)<CR>", opts)
|
||||
keymap("n", "fma", ":lua require('harpoon.mark').add_file()<CR>", opts)
|
||||
keymap("n", "fmd", ":lua require('harpoon.mark').remove_file()<CR>", opts)
|
||||
|
||||
|
||||
-- telescope
|
||||
keymap("n", "fb", ":Telescope file_browser<CR>", {})
|
||||
keymap("n", "fc", ":Cheatsheet<CR>", {})
|
||||
|
|
@ -33,6 +42,7 @@ keymap("n", "ff", ":lua require('telescope.builtin').find_files()<CR>", {})
|
|||
keymap("n", "fg", ":lua require('telescope.builtin').live_grep()<CR>", {})
|
||||
keymap("n", "fh", ":lua require('telescope.builtin').help_tags()<CR>", {})
|
||||
keymap("n", "fp", ":lua require'telescope'.extensions.project.project{}<CR>", { noremap = true, silent = true })
|
||||
keymap("n", "fm", ":Telescope harpoon marks<CR>", { noremap = true, silent = true })
|
||||
|
||||
vim.keymap.set("n", "<leader>z", ":lua require('telescope').extensions.zoxide.list{}<CR>")
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ require("mason-lspconfig").setup({
|
|||
"marksman", -- markdown
|
||||
"asm_lsp", -- assembly
|
||||
"tsserver", -- js and ts
|
||||
"ltex" -- latex
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ Plug("EdenEast/nightfox.nvim") -- dark theme
|
|||
Plug("kyazdani42/nvim-web-devicons") -- icons
|
||||
Plug("feline-nvim/feline.nvim") -- bottom bar
|
||||
Plug("lewis6991/gitsigns.nvim") -- git signs on the bar and on the left
|
||||
Plug("tanvirtin/vgit.nvim") -- git plugin
|
||||
Plug("nvim-lua/plenary.nvim") -- library, don't delete
|
||||
Plug("williamboman/mason.nvim") -- lsp and dap
|
||||
Plug("williamboman/mason-lspconfig.nvim") -- lsp to mason bridge
|
||||
|
|
@ -19,10 +18,8 @@ Plug("nvim-treesitter/nvim-treesitter",
|
|||
{ ["do"] = vim.fn[":TSUpdate"] }) -- syntax colors
|
||||
Plug("hrsh7th/nvim-cmp") -- completions
|
||||
Plug("hrsh7th/cmp-nvim-lsp") -- lsp integration with completions
|
||||
--Plug("hrsh7th/cmp-buffer") -- buffer completion
|
||||
Plug("hrsh7th/cmp-path") -- path completion
|
||||
Plug("hrsh7th/cmp-cmdline") -- command completion
|
||||
--Plug("f3fora/cmp-spell") -- spelling completion
|
||||
Plug("saadparwaiz1/cmp_luasnip") -- snip completion
|
||||
Plug("L3MON4D3/LuaSnip") -- snippet plugin
|
||||
Plug("kyazdani42/nvim-tree.lua") -- file viewer on the right
|
||||
|
|
@ -45,8 +42,8 @@ Plug('nvim-telescope/telescope-symbols.nvim') -- symbol picker
|
|||
Plug('nvim-telescope/telescope-file-browser.nvim') -- telescope file browser
|
||||
Plug('nvim-telescope/telescope-dap.nvim') -- dap UI for telescope
|
||||
Plug('benfowler/telescope-luasnip.nvim') -- telescope luasnip integration
|
||||
Plug('sudormrfbin/cheatsheet.nvim') -- cheatsheet for keymaps
|
||||
Plug('jvgrootveld/telescope-zoxide') -- zoxide integration
|
||||
Plug('sudormrfbin/cheatsheet.nvim') -- cheatsheet for keymaps
|
||||
Plug('ThePrimeagen/harpoon') -- harpoonman
|
||||
Plug 'folke/trouble.nvim' -- provides warning/error explanation tab
|
||||
Plug('akinsho/toggleterm.nvim',{ ["tag"] = "*" }) -- better terminal integration
|
||||
|
|
@ -56,5 +53,6 @@ Plug('p00f/clangd_extensions.nvim') -- clangd_extensions
|
|||
Plug('kdarkhan/rust-tools.nvim') -- rust extensions
|
||||
Plug('lvimuser/lsp-inlayhints.nvim') -- inlay hints
|
||||
Plug('preservim/tagbar') -- tags on the right
|
||||
Plug('ggandor/leap.nvim') -- special movement
|
||||
vim.call("plug#end")
|
||||
|
||||
|
|
|
|||
4
nvim/lua/settings/vimtex.lua
Normal file
4
nvim/lua/settings/vimtex.lua
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
vim.cmd("let g:vimtex_quickfix_mode=0")
|
||||
vim.cmd("let g:vimtex_view_general_viewer = 'evince'")
|
||||
vim.cmd("let g:vimtex_compiler_method = 'latexmk'")
|
||||
vim.cmd("let g:vimtex_latexmk_options = '-pdf -shell-escape -verbose -file-line-error -synctex=1 -interaction=nonstopmode'")
|
||||
Loading…
Add table
Add a link
Reference in a new issue