From da8a1bfb10c658eb3807876092c3db7cf1b18498 Mon Sep 17 00:00:00 2001 From: rajvatsal Date: Sat, 16 Dec 2023 18:36:37 +0530 Subject: [PATCH] add custom settings for lualine --- after/plugin/defaults.lua | 46 +++++++++++++++++++++++++++-- init.lua | 2 +- lazy-lock.json | 1 + lua/custom/plugins/colorschemes.lua | 22 +++++++------- 4 files changed, 56 insertions(+), 15 deletions(-) diff --git a/after/plugin/defaults.lua b/after/plugin/defaults.lua index c3d2b00e..7d383964 100644 --- a/after/plugin/defaults.lua +++ b/after/plugin/defaults.lua @@ -3,9 +3,49 @@ vim.opt.shiftwidth = 2 vim.opt.expandtab = true vim.bo.softtabstop = 2 vim.opt.relativenumber = true +vim.keymap.set('t', '', [[]], { noremap = true }) -- Set custom colorscheme [[ NOTE: Never set it to "onedark" cuz it breaks the editor ]] -vim.cmd.colorscheme 'gruvbox' +vim.cmd.colorscheme 'catppuccin' -vim.keymap.set('t', '', [[]], { noremap = true }) --- vim.keymap.set('n', '<>', [[]], {}) +-- custom lualine +require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = '' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = { 'mode' }, + lualine_b = { 'branch', 'diff', 'diagnostics' }, + lualine_c = { 'filename' }, + lualine_x = { 'encoding', 'fileformat', 'filetype' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' } + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { 'filename' }, + lualine_x = { 'location' }, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} diff --git a/init.lua b/init.lua index 6362472b..9487fca2 100644 --- a/init.lua +++ b/init.lua @@ -205,7 +205,7 @@ require('lazy').setup({ opts = { options = { icons_enabled = true, - -- theme = 'onedark', + --theme = 'onedark', component_separators = '|', section_separators = '', }, diff --git a/lazy-lock.json b/lazy-lock.json index 35da6414..6c980812 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,6 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "LuaSnip": { "branch": "master", "commit": "954c81b53989097faaff0fabc11c29575288c3e1" }, + "catppuccin": { "branch": "main", "commit": "64dc309bc157779691be38bbfc5123584e0a4a85" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, diff --git a/lua/custom/plugins/colorschemes.lua b/lua/custom/plugins/colorschemes.lua index 6f336eff..984fa3f5 100644 --- a/lua/custom/plugins/colorschemes.lua +++ b/lua/custom/plugins/colorschemes.lua @@ -1,20 +1,20 @@ return { --Gruvbox colorscheme - { - "ellisonleao/gruvbox.nvim", priority = 1000, config = true, opts = ... - }, + { "ellisonleao/gruvbox.nvim", priority = 1000, config = true, opts = ... }, --tokyonight colorscheme { - "folke/tokyonight.nvim", priority = 1000 - }, + "folke/tokyonight.nvim", priority = 1000 }, -- lunar-vim colorschemes - { - "lunarvim/colorschemes", priority = 1000 - }, + { "lunarvim/colorschemes", priority = 1000 }, - { - "rebelot/kanagawa.nvim", priority = 1000 - } + -- kanagawa + { "rebelot/kanagawa.nvim", priority = 1000 }, + + -- latte, frappe, macchiato, mocha + { "catppuccin/nvim", name = "catppuccin", priority = 1000 }, + + -- Theme inspired by Atom + { 'navarasu/onedark.nvim', priority = 1000, } }