From 8286a944516258085483341c0aca422cb13d72d3 Mon Sep 17 00:00:00 2001 From: Luke Johnson Date: Mon, 27 Feb 2023 16:35:36 -0700 Subject: [PATCH] add tabs plugin, change colorscheme --- init.lua | 44 +++++++++++++++++++++------- lua/custom/plugins/init.lua | 5 +++- lua/custom/plugins/tabs.lua | 57 +++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 11 deletions(-) create mode 100644 lua/custom/plugins/tabs.lua diff --git a/init.lua b/init.lua index aeca6d28..f9334b72 100644 --- a/init.lua +++ b/init.lua @@ -35,7 +35,6 @@ I hope you enjoy your Neovim journey, P.S. You can delete this when you're done too. It's your config now :) --]] - -- Set as the leader key -- See `:help mapleader` -- NOTE: Must happen before plugins are required (otherwise wrong leader will be used) @@ -97,7 +96,7 @@ require('lazy').setup({ }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git releated signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', opts = { @@ -114,9 +113,34 @@ require('lazy').setup({ { -- Theme inspired by Atom 'navarasu/onedark.nvim', + }, + { + 'Mofiqul/vscode.nvim', priority = 1000, + lazy = false, + name = 'vscode', config = function() - vim.cmd.colorscheme 'onedark' + local c = require('vscode.colors').get_colors() + require('vscode').setup({ + -- Enable transparent background + transparent = true, + -- Enable italic comment + italic_comments = true, + -- Disable nvim-tree background color + disable_nvimtree_bg = true, + -- Override colors (see ./lua/vscode/colors.lua) + color_overrides = { + vscLineNumber = '#FFFFFF', + }, + -- Override highlight groups (see ./lua/vscode/theme.lua) + group_overrides = { + -- this supports the same val table as vim.api.nvim_set_hl + -- use colors from this colorscheme by requiring vscode.colors! + Cursor = { fg = c.vscDarkBlue, bg = c.vscLightGreen, bold = true }, + } + }) + + vim.cmd([[colorscheme vscode]]) end, }, @@ -126,7 +150,7 @@ require('lazy').setup({ opts = { options = { icons_enabled = false, - theme = 'onedark', + theme = 'vscode', component_separators = '|', section_separators = '', }, @@ -144,7 +168,7 @@ require('lazy').setup({ }, -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, + { 'numToStr/Comment.nvim', opts = {} }, -- Fuzzy Finder (files, lsp, etc) { 'nvim-telescope/telescope.nvim', version = '*', dependencies = { 'nvim-lua/plenary.nvim' } }, @@ -175,8 +199,8 @@ require('lazy').setup({ -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart -- These are some example plugins that I've included in the kickstart repository. -- Uncomment any of the lines below to enable them. - -- require 'kickstart.plugins.autoformat', - -- require 'kickstart.plugins.debug', + require 'kickstart.plugins.autoformat', + require 'kickstart.plugins.debug', -- NOTE: The import below automatically adds your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping @@ -461,7 +485,7 @@ cmp.setup { end, }, mapping = cmp.mapping.preset.insert { - [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs( -4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete {}, [''] = cmp.mapping.confirm { @@ -480,8 +504,8 @@ cmp.setup { [''] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) + elseif luasnip.jumpable( -1) then + luasnip.jump( -1) else fallback() end diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..d507a5bd 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,7 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + + +} diff --git a/lua/custom/plugins/tabs.lua b/lua/custom/plugins/tabs.lua new file mode 100644 index 00000000..98b9c875 --- /dev/null +++ b/lua/custom/plugins/tabs.lua @@ -0,0 +1,57 @@ +-- debug.lua +-- +-- Shows how to use the DAP plugin to debug your code. +-- +-- Primarily focused on configuring the debugger for Go, but can +-- be extended to other languages as well. That's why it's called +-- kickstart.nvim and not kitchen-sink.nvim ;) + +return { + -- NOTE: Yes, you can install new plugins here! + 'romgrk/barbar.nvim', + -- NOTE: And you can specify dependencies as well + dependencies = { + 'nvim-tree/nvim-web-devicons', + }, + config = function() + local map = vim.api.nvim_set_keymap + local opts = { noremap = true, silent = true } + + -- Move to previous/next + map('n', '', 'BufferPrevious', opts) + map('n', '', 'BufferNext', opts) + -- Re-order to previous/next + map('n', '', 'BufferMovePrevious', opts) + map('n', '>', 'BufferMoveNext', opts) + -- Goto buffer in position... + map('n', '', 'BufferGoto 1', opts) + map('n', '', 'BufferGoto 2', opts) + map('n', '', 'BufferGoto 3', opts) + map('n', '', 'BufferGoto 4', opts) + map('n', '', 'BufferGoto 5', opts) + map('n', '', 'BufferGoto 6', opts) + map('n', '', 'BufferGoto 7', opts) + map('n', '', 'BufferGoto 8', opts) + map('n', '', 'BufferGoto 9', opts) + map('n', '', 'BufferLast', opts) + -- Pin/unpin buffer + map('n', '', 'BufferPin', opts) + -- Close buffer + map('n', '', 'BufferClose', opts) + -- Wipeout buffer + -- :BufferWipeout + -- Close commands + -- :BufferCloseAllButCurrent + -- :BufferCloseAllButPinned + -- :BufferCloseAllButCurrentOrPinned + -- :BufferCloseBuffersLeft + -- :BufferCloseBuffersRight + -- Magic buffer-picking mode + map('n', '', 'BufferPick', opts) + -- Sort automatically by... + map('n', 'bb', 'BufferOrderByBufferNumber', opts) + map('n', 'bd', 'BufferOrderByDirectory', opts) + map('n', 'bl', 'BufferOrderByLanguage', opts) + map('n', 'bw', 'BufferOrderByWindowNumber', opts) + end, +}