diff --git a/after/plugin/harpoon.lua b/after/plugin/harpoon.lua index 4ae69ca..dd7fcb3 100644 --- a/after/plugin/harpoon.lua +++ b/after/plugin/harpoon.lua @@ -13,4 +13,11 @@ vim.keymap.set('n', '', function() ui.nav_file(4) end) vim.keymap.set('n', 'c', cmd_ui.toggle_quick_menu) vim.keymap.set('n', 'gt1', function() term.gotoTerminal(1) end) -vim.keymap.set('n', 'br', function() term.sendCommand(1, 'build_ros') end) +vim.keymap.set('n', 'gt2', function() term.gotoTerminal(2) end) +vim.keymap.set('n', 'gt3', function() term.gotoTerminal(3) end) +vim.keymap.set('n', 'gt4', function() term.gotoTerminal(4) end) +vim.keymap.set('n', 'gt5', function() term.gotoTerminal(5) end) +vim.keymap.set('n', 'gt6', function() term.gotoTerminal(6) end) +vim.keymap.set('n', 'gt7', function() term.gotoTerminal(7) end) +vim.keymap.set('n', 'gt8', function() term.gotoTerminal(8) end) +vim.keymap.set('n', 'gt0', function() term.gotoTerminal(10) end) diff --git a/after/plugin/lualsp.lua b/after/plugin/lualsp.lua.bak similarity index 76% rename from after/plugin/lualsp.lua rename to after/plugin/lualsp.lua.bak index 41d28aa..ac496cb 100644 --- a/after/plugin/lualsp.lua +++ b/after/plugin/lualsp.lua.bak @@ -1,6 +1,5 @@ -local lspconfig = require('lspconfig') -lspconfig.lua_ls.setup({ +vim.lsp.config.lua_ls.setup({ settings = { Lua = { diagnostics = { diff --git a/lua/lennartalff/remap.lua b/lua/lennartalff/remap.lua index dc99645..30f90d0 100644 --- a/lua/lennartalff/remap.lua +++ b/lua/lennartalff/remap.lua @@ -53,3 +53,7 @@ vim.keymap.set('v', '<', '', '>gv') vim.keymap.set('n', '', 'Neotree') + + +-- nvim-surround +vim.keymap.set('n', 's', '(nvim-surround-normal)') diff --git a/lua/plugins/config-local.lua b/lua/plugins/config-local.lua index 053cb8f..a4f8a17 100644 --- a/lua/plugins/config-local.lua +++ b/lua/plugins/config-local.lua @@ -1,5 +1,6 @@ return { 'klen/nvim-config-local', + tag = "2.1.0", opts = { config_files = { '.nvim.lua' }, hashfile = vim.fn.stdpath('data') .. '/config-local', diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index ccbafb1..0166e3f 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -22,6 +22,21 @@ return { dependencies = { { 'nvim-lua/plenary.nvim' }, }, + config = function() + require('harpoon').setup({ + global_settings = { + save_on_toggle = false, + save_on_change = true, + enter_on_sendcmd = true, + tmux_autoclose_windows = false, + excluded_filetypes = { 'harppon' }, + mark_branch = false, + tabline = false, + tabline_prefix = ' ', + tabline_suffix = ' ', + } + }) + end, }, { 'ray-x/lsp_signature.nvim', @@ -48,13 +63,6 @@ return { "kylechui/nvim-surround", version = "*", -- Use for stability; omit to use `main` branch for the latest features event = "VeryLazy", - config = function() - require("nvim-surround").setup({ - keymaps = { - normal = "s", - }, - }) - end }, { 'lervag/vimtex', diff --git a/lua/plugins/lsp/init.lua b/lua/plugins/lsp/init.lua index 36a9479..a1a9bc6 100644 --- a/lua/plugins/lsp/init.lua +++ b/lua/plugins/lsp/init.lua @@ -1,19 +1,3 @@ ---local lspconfig = require('lspconfig') ---local lsp_defaults = lspconfig.util.default_config --- ---lsp_defaults.capabilities = vim.tbl_deep_extend( --- 'force', --- lsp_defaults.capabilities, --- require('cmp_nvim_lsp').default_capabilities() ---) - ---vim.api.nvim_create_autocmd('FileType', { --- pattern = 'tex', --- callback = function() --- require('cmp').setup.buffer { sources = {{ name = 'omni' }} } --- end, ---}) - vim.api.nvim_create_autocmd('LspAttach', { desc = 'LSP actions', callback = function(event) @@ -63,7 +47,7 @@ local handlers = { }) end, pylsp = function() - require('lspconfig').pylsp.setup({ + vim.lsp.config.pylsp.setup({ settings = { pylsp = { plugins = { @@ -83,16 +67,8 @@ local handlers = { }, }) end, - -- ruff_lsp = function() - -- require('lspconfig').ruff_lsp.setup({ - -- on_attach = function(client, bufnr) - -- client.server_capabilities.hoverProvider = false - -- client.server_capabilities.documentFormattingProvider = false - -- end, - -- }) - -- end, texlab = function() - require('lspconfig').texlab.setup({ + vim.lsp.config.texlab.setup({ settings = { texlab = { build = { @@ -115,6 +91,27 @@ local handlers = { }) end, } +vim.lsp.config('texlab', { + settings = { + texlab = { + build = { + onSave = false, + forwardSearchAfter = true, + }, + chktex = { + onOpenAndSave = true, + }, + forwardSearch = { + executable = 'zathura', + args = { + '--synctex-forward', + '%l:1:%f', + '%p', + }, + }, + }, + }, +}) return { {