From f01ee3940e8626d6395c6aa1245c9d2fe7861ca1 Mon Sep 17 00:00:00 2001 From: speedie Date: Sat, 20 Jan 2024 15:11:21 +0100 Subject: [PATCH] speedie-nvim | Add new config --- .config/nvim/init.lua | 15 +++++++++------ .config/nvim/lua/bootstrap.lua | 9 ++++++++- .config/nvim/lua/bufferline_config.lua | 2 +- .config/nvim/lua/lualine_config.lua | 10 +--------- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 39b3a97..01cfdb7 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -12,7 +12,7 @@ local defaultKeybindOptions = { noremap = true, silent = true } -- Default keybi LoadPreviousSessionOnLoad = true -- Load previous session or not SessionFile = '~/.config/nvim/.session.nvim' -- File where the previous buffer is stored LeaderKey = ' ' -- The leader key to use. Default is the space key. -Theme = 'doom-one' -- Theme to use +Theme = 'onenord' -- Theme to use Languages = { -- Languages to support - Used to configure highlighting 'html', -- For HTML 'css', -- For CSS @@ -30,6 +30,13 @@ LanguageServers = { -- Language servers to use for LSP, run LspInstall to 'lua_ls', -- For Lua 'marksman', -- For Markdown } +Themes = { + { 'rmehri01/onenord.nvim', branch = 'main' }, -- One Nord theme + --[[ + { 'romgrk/doom-one.vim' }, -- Doom-One theme + { 'catppuccin/nvim' }, -- Catppuccin theme(s) + ]]-- +} -- Themes to download as plugins Plugins = { -- Plugins to use { 'nvim-telescope/telescope.nvim', dependencies = { @@ -40,7 +47,6 @@ Plugins = { -- Plugins to use { 'akinsho/bufferline.nvim' }, -- Tabs { 'nvim-lualine/lualine.nvim' }, -- Status line { 'm4xshen/autoclose.nvim' }, -- Autoclose brackets - { 'romgrk/doom-one.vim' }, -- Doom-One theme { 'stevearc/conform.nvim' }, -- Formatting { 'tpope/vim-fugitive' }, -- Git integration { 'lewis6991/gitsigns.nvim' }, -- Provides Git icons @@ -104,10 +110,7 @@ opt.termguicolors = true -- Enable true color opt.autochdir = true -- Automatically change directory to the file we're editing opt.background = 'dark' -- Set background to dark --- Fallback colors and undercurl, if supported -highlight(0, 'Normal', { fg='#ffffff', bg='#222222' }) -highlight(0, 'EndOfBuffer', { fg='#ffffff', bg='#222222' }) -highlight(0, 'Folded', { fg='#afeeee', bg='#333333' }) +-- Enable undercurl highlight(0, 'SpellBad', { undercurl=true, fg='#ff0000' }) highlight(0, 'SpellCap', { undercurl=true, fg='#ffff00' }) diff --git a/.config/nvim/lua/bootstrap.lua b/.config/nvim/lua/bootstrap.lua index 3538ec5..0316570 100644 --- a/.config/nvim/lua/bootstrap.lua +++ b/.config/nvim/lua/bootstrap.lua @@ -20,4 +20,11 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) -require("lazy").setup(Plugins) +local function combineTable(table1,table2) + for i=1,#table2 do + table1[#table1+1] = table2[i] + end + return table1 +end + +require("lazy").setup(combineTable(Plugins, Themes)) diff --git a/.config/nvim/lua/bufferline_config.lua b/.config/nvim/lua/bufferline_config.lua index f67f55d..2954ceb 100644 --- a/.config/nvim/lua/bufferline_config.lua +++ b/.config/nvim/lua/bufferline_config.lua @@ -12,6 +12,6 @@ bufferline.setup({ diagnostics_indicator = function(count, level) local icon = level:match("error") and " " or "" return " " .. icon .. count - end + end, }, }) diff --git a/.config/nvim/lua/lualine_config.lua b/.config/nvim/lua/lualine_config.lua index 6ec6815..b88f776 100644 --- a/.config/nvim/lua/lualine_config.lua +++ b/.config/nvim/lua/lualine_config.lua @@ -3,8 +3,6 @@ -- https://git.speedie.site/speedie/speedie-nvim -- ]]-- -require('lualine').setup() - local lualine = require('lualine') -- Color table for highlights @@ -43,13 +41,7 @@ local config = { -- Disable sections and component separators component_separators = '', section_separators = '', - theme = { - -- We are going to use lualine_c an lualine_x as left and - -- right section. Both are highlighted by c theme . So we - -- are just setting default looks o statusline - normal = { c = { fg = colors.fg, bg = colors.bg } }, - inactive = { c = { fg = colors.fg, bg = colors.bg } }, - }, + theme = Theme, }, sections = { -- these are to remove the defaults