diff --git a/nvim/init.lua b/nvim/init.lua index 45eaafe..056b734 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -13,6 +13,7 @@ require("settings.rainbow") require("settings.dap") require("settings.autocommands") require("settings.telescope") +require("settings.vimtex") require("settings.keymaps") require("settings.barbar") diff --git a/nvim/lua/settings/dap.lua b/nvim/lua/settings/dap.lua index 7c9a983..27c65e1 100644 --- a/nvim/lua/settings/dap.lua +++ b/nvim/lua/settings/dap.lua @@ -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() diff --git a/nvim/lua/settings/keymaps.lua b/nvim/lua/settings/keymaps.lua index f0d96d3..2095a7b 100644 --- a/nvim/lua/settings/keymaps.lua +++ b/nvim/lua/settings/keymaps.lua @@ -6,7 +6,7 @@ local keymap = vim.api.nvim_set_keymap keymap("n", "", ':lua require("dap").toggle_breakpoint()', opts) keymap("n", "", ':lua require("dap").step_over()', opts) keymap("n", "", ':lua require("dap").step_into()', opts) -keymap("n", "", ':lua require("dap").continue() :lua require("dapui").toggle()', opts) +keymap("n", "", ':lua require("dapui").toggle() :lua require("dap").continue() ', opts) keymap("n", "", ':lua require("dap").continue()', opts) keymap("n", "", ':lua require("dap").close() :lua require("dapui").toggle()', opts) @@ -26,6 +26,15 @@ keymap("n", "e", ":Telescope lsp_type_definitions", opts) keymap("n", "a", ":lua vim.lsp.buf.code_action()", opts) keymap("n", "s", ":lua vim.lsp.buf.signature_help()", opts) +-- harpoon man + +keymap("n", "", ":lua require('harpoon.ui').nav_file(1)", opts) +keymap("n", "", ":lua require('harpoon.ui').nav_file(2)", opts) +keymap("n", "", ":lua require('harpoon.ui').nav_file(3)", opts) +keymap("n", "fma", ":lua require('harpoon.mark').add_file()", opts) +keymap("n", "fmd", ":lua require('harpoon.mark').remove_file()", opts) + + -- telescope keymap("n", "fb", ":Telescope file_browser", {}) keymap("n", "fc", ":Cheatsheet", {}) @@ -33,6 +42,7 @@ keymap("n", "ff", ":lua require('telescope.builtin').find_files()", {}) keymap("n", "fg", ":lua require('telescope.builtin').live_grep()", {}) keymap("n", "fh", ":lua require('telescope.builtin').help_tags()", {}) keymap("n", "fp", ":lua require'telescope'.extensions.project.project{}", { noremap = true, silent = true }) +keymap("n", "fm", ":Telescope harpoon marks", { noremap = true, silent = true }) vim.keymap.set("n", "z", ":lua require('telescope').extensions.zoxide.list{}") diff --git a/nvim/lua/settings/lsp.lua b/nvim/lua/settings/lsp.lua index 21a2fc0..e2a0a49 100644 --- a/nvim/lua/settings/lsp.lua +++ b/nvim/lua/settings/lsp.lua @@ -26,6 +26,7 @@ require("mason-lspconfig").setup({ "marksman", -- markdown "asm_lsp", -- assembly "tsserver", -- js and ts + "ltex" -- latex }, automatic_installation = true, }) diff --git a/nvim/lua/settings/plugins.lua b/nvim/lua/settings/plugins.lua index 67e07fb..c3f3388 100644 --- a/nvim/lua/settings/plugins.lua +++ b/nvim/lua/settings/plugins.lua @@ -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") diff --git a/nvim/lua/settings/vimtex.lua b/nvim/lua/settings/vimtex.lua new file mode 100644 index 0000000..ce1d4c5 --- /dev/null +++ b/nvim/lua/settings/vimtex.lua @@ -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'")