diff --git a/lua/custom/maps/init.lua b/lua/custom/maps/init.lua index d5155f2..6f0ba26 100644 --- a/lua/custom/maps/init.lua +++ b/lua/custom/maps/init.lua @@ -48,7 +48,8 @@ vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D] vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' }) -- let me out!!! -vim.keymap.set({ 'n', 'v' }, 'qq', 'q!', { desc = '[Q]uit the current window' }) +vim.keymap.set({ 'n', 'v' }, 'qqq', 'bd!', { desc = '[Q]uit the current window' }) +vim.keymap.set({ 'n', 'v' }, '', 'bw!', { desc = '[Q]uit the current window' }) -------------------------------------------------------------------------------- -- Workspace, buffer and window manipulation @@ -66,6 +67,8 @@ vim.keymap.set('n', '', 'vertical resize +1', { desc = 'Resize vim.keymap.set('n', '', 'vertical resize -1', { desc = 'Resize window vertically' }) -- tabs/workspaces +vim.keymap.set('n', '', 'bnext', { desc = 'Next Buffer' }) +vim.keymap.set('n', '', 'bprev', { desc = 'Last Buffer' }) vim.keymap.set('n', 'wn', 'tabnew', { desc = 'Open a [N]ew [W]orkspace/Tab' }) vim.keymap.set('n', 'wc', 'tabclose', { desc = '[C]lose a [W]orkspace/Tab' }) vim.keymap.set('n', 'wk', 'tabnext', { desc = 'Next [W]orkspace/Tab' }) diff --git a/lua/custom/plugins/themes.lua b/lua/custom/plugins/themes.lua new file mode 100644 index 0000000..48b7bec --- /dev/null +++ b/lua/custom/plugins/themes.lua @@ -0,0 +1,34 @@ +return { + { + 'zaldih/themery.nvim', + priority = 1000, -- Make sure to load this before all the other start plugins. + init = function() + require 'settings.theme' + end, + config = function() + require('themery').setup { + themes = { + { + name = 'tokyonight', + colorscheme = 'tokyonight', + }, + { + name = 'tokyonight-day', + colorscheme = 'tokyonight-day', + }, + { + name = 'tokyonight-moon', + colorscheme = 'tokyonight-moon', + }, + { + name = 'tokyonight-storm', + colorscheme = 'tokyonight-storm', + }, + }, + themeConfigFile = '~/.config/nvim/lua/settings/theme.lua', + livePreview = true, -- Apply theme while browsing. Default to true. + } + end, + }, + { 'folke/tokyonight.nvim' }, +} diff --git a/lua/custom/plugins/ui.lua b/lua/custom/plugins/ui.lua index c8576e5..d26b2cb 100644 --- a/lua/custom/plugins/ui.lua +++ b/lua/custom/plugins/ui.lua @@ -167,7 +167,9 @@ return { 'echasnovski/mini.trailspace', lazy = false, event = { 'BufReadPost', 'BufNewFile' }, - opts = {}, + opts = { + only_in_normal_buffers = true, + }, }, { 'itchyny/vim-cursorword', @@ -351,23 +353,6 @@ return { }, }, }, - { -- You can easily change to a different colorscheme. - -- Change the name of the colorscheme plugin below, and then - -- change the command in the config to whatever the name of that colorscheme is. - -- - -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', - priority = 1000, -- Make sure to load this before all the other start plugins. - init = function() - -- Load the colorscheme here. - -- Like many other themes, this one has different styles, and you could load - -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' - - -- You can configure highlights by doing something like: - vim.cmd.hi 'Comment gui=none' - end, - }, { 'folke/noice.nvim', enabled = not vim.g.started_by_firenvim, @@ -607,4 +592,51 @@ return { require('bufferline').setup {} end, }, + { + 'MeanderingProgrammer/dashboard.nvim', + event = 'VimEnter', + dependencies = { + 'MaximilianLloyd/ascii.nvim', + }, + init = function() + vim.api.nvim_create_autocmd({ 'BufWinEnter', 'VimEnter' }, { + pattern = { 'dashboard', 'text', 'help', '*' }, + callback = function() + vim.b.minitrailspace_disable = true + vim.opt_local.list = false + vim.opt_local.colorcolumn = '0' + end, + }) + end, + config = function() + -- Do not show trailing space in unmodifiable types + require('dashboard').setup { + -- Dashboard header + header = require('ascii').art.text.neovim.sharp, + -- List of directory paths, or functions that return paths + directories = { + '~/.config/nvim', + '~/Documents/code', + '~/Documents/novel', + }, + -- Format to display date in + date_format = nil, + -- Sections to add at bottom, these can be string references to + -- functions in sections.lua, custom strings, or custom functions + footer = {}, + -- Gets called after directory is changed and is provided with the + -- directory path as an argument + on_load = function(path) + -- Do nothing + end, + -- Highlight groups to use for various components + highlight_groups = { + header = 'Constant', + icon = 'Type', + directory = 'Delimiter', + hotkey = 'Statement', + }, + } + end, + }, } diff --git a/lua/kickstart/plugins/indent_line.lua b/lua/kickstart/plugins/indent_line.lua index ed7f269..7fa02d4 100644 --- a/lua/kickstart/plugins/indent_line.lua +++ b/lua/kickstart/plugins/indent_line.lua @@ -4,6 +4,24 @@ return { -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help ibl` main = 'ibl', - opts = {}, + opts = { + indentLine_enabled = 1, + filetype_exclude = { + 'help', + 'terminal', + 'lazy', + 'lspinfo', + 'TelescopePrompt', + 'TelescopeResults', + 'mason', + 'dashboard', + '', + }, + buftype_exclude = { 'terminal' }, + show_trailing_blankline_indent = false, + show_first_indent_level = false, + show_current_context = true, + show_current_context_start = true, + }, }, } diff --git a/lua/settings/theme.lua b/lua/settings/theme.lua new file mode 100644 index 0000000..917a7c0 --- /dev/null +++ b/lua/settings/theme.lua @@ -0,0 +1,5 @@ +-- Themery block +-- This block will be replaced by Themery. +vim.cmd("colorscheme tokyonight-storm") +vim.g.theme_id = 4 +-- end themery block