diff --git a/lua/mpx/core/keymaps.lua b/lua/mpx/core/keymaps.lua index 706ff64..0e156b3 100644 --- a/lua/mpx/core/keymaps.lua +++ b/lua/mpx/core/keymaps.lua @@ -23,9 +23,16 @@ keymap.set("n", "tn", "tabnew", { desc = "Open new tab" }) -- o keymap.set("n", "tq", "tabclose", { desc = "Close current tab" }) -- close current tab keymap.set("n", "tl", "tabn", { desc = "Go to next tab" }) -- go to next tab keymap.set("n", "th", "tabp", { desc = "Go to previous tab" }) -- go to previous tab -keymap.set("n", "L", "tabn", { desc = "Go to next tab" }) -- go to next tab -keymap.set("n", "H", "tabp", { desc = "Go to previous tab" }) -- go to previous tab keymap.set("n", "tf", "tabnew %", { desc = "Open current buffer in new tab" }) -- move current buffer to new +-- +--buffers +-- +keymap.set("n", "L", "bn", { desc = "Go to next buffer" }) +keymap.set("n", "H", "bp", { desc = "Go to previous buffer" }) +keymap.set("n", "bn", "bn", { desc = "Go to next buffer" }) +keymap.set("n", "bp", "bp", { desc = "Go to previous buffer" }) +keymap.set("n", "bq", "bd", { desc = "Close current buffer" }) +keymap.set("n", "bf", "Telescope buffers", { desc = "Open telescope buffers" }) -- make space unactionable keymap.set({ "n", "v" }, "", "", { silent = true }) diff --git a/lua/mpx/plugins/bufferline.lua b/lua/mpx/plugins/bufferline.lua index e1597f9..5d36f8c 100644 --- a/lua/mpx/plugins/bufferline.lua +++ b/lua/mpx/plugins/bufferline.lua @@ -1,31 +1,31 @@ ---Note:use barbar insted and fix tabs to buffers insted +--Note:use barbar insted and fix tabs to buffers insted return { - "akinsho/bufferline.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - event = "VeryLazy", - opts = { - options = { - always_show_bufferline = false, - diagnostics = "nvim_lsp", - mode = "tabs", - separator_style = "thick", - hover = { - enabled = true, - delay = 200, - reveal = {'close'} - }, - offsets = { - { - filetype = "neo-tree", - text = "Neo-tree", - highlight = "Directory", - text_align = "left", - }, - }, + "akinsho/bufferline.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + event = "VeryLazy", + opts = { + options = { + always_show_bufferline = false, + diagnostics = "nvim_lsp", + mode = "buffers", + separator_style = "thick", + hover = { + enabled = true, + delay = 200, + reveal = { "close" }, + }, + offsets = { + { + filetype = "neo-tree", + text = "Neo-tree", + highlight = "Directory", + text_align = "left", + }, + }, - indicator = { - style = 'underline', - }, - }, - }, + indicator = { + style = "underline", + }, + }, + }, } diff --git a/lua/mpx/plugins/linting.lua b/lua/mpx/plugins/linting.lua index 52b4f9e..7860fd5 100644 --- a/lua/mpx/plugins/linting.lua +++ b/lua/mpx/plugins/linting.lua @@ -11,7 +11,6 @@ return { typescriptreact = { "eslint_d" }, svelte = { "eslint_d" }, python = { "pylint" }, - go = { "golangcilint" }, } local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) diff --git a/lua/mpx/plugins/lsp/mason.lua b/lua/mpx/plugins/lsp/mason.lua index ecf5473..5835cde 100644 --- a/lua/mpx/plugins/lsp/mason.lua +++ b/lua/mpx/plugins/lsp/mason.lua @@ -48,7 +48,6 @@ return { "isort", -- python formatter "black", -- python formatter "gofumpt", -- go stricter formatter - "golangci_lint_ls", -- go linter "pylint", -- python linter "eslint_d", -- js linter "delve", --godap diff --git a/lua/mpx/plugins/nvim-cmp.lua b/lua/mpx/plugins/nvim-cmp.lua index 0f99ef6..011de0d 100644 --- a/lua/mpx/plugins/nvim-cmp.lua +++ b/lua/mpx/plugins/nvim-cmp.lua @@ -42,12 +42,26 @@ return { [""] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping.complete(), -- show completion suggestions [""] = cmp.mapping.abort(), -- close completion window - [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping.confirm({ select = true }), + [""] = cmp.mapping(function(fallback) + if luasnip.jumpable(1) then + luasnip.jump(1) + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), }), -- sources for autocompletion sources = cmp.config.sources({ - { name = "nvim_lsp" }, { name = "luasnip" }, -- snippets + { name = "nvim_lsp" }, { name = "buffer" }, -- text within current buffer { name = "path" }, -- file system paths }),