From 548dc66bc3153df11bbbc20ca5a4b97d57f0ef09 Mon Sep 17 00:00:00 2001
From: Yigit Sever
Date: Fri, 15 Oct 2021 22:32:20 +0300
Subject: nvim: lualine fork + indentline + rose pine

---
 .config/nvim/lua/mappings.lua        |  6 +++--
 .config/nvim/lua/plugin_settings.lua | 46 ++++++++++++++++++++++++++++--------
 .config/nvim/lua/plugins.lua         |  9 +++----
 3 files changed, 45 insertions(+), 16 deletions(-)

(limited to '.config/nvim/lua')

diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua
index 63eb045..6c17177 100644
--- a/.config/nvim/lua/mappings.lua
+++ b/.config/nvim/lua/mappings.lua
@@ -12,7 +12,6 @@ local function map(mode, lhs, rhs, opts)
   vim.api.nvim_set_keymap(mode, lhs, rhs, options)
 end
 
--- local map = vim.api.nvim_set_keymap
 local cmd = vim.cmd
 local M = {}
 
@@ -159,10 +158,13 @@ map('n', '<leader>fh', "<cmd>lua require('telescope.builtin').help_tags()<cr>")
 map('n', '<F3>', ":Vista focus<cr>")
 map('n', '<F4>', ":Vista finder<cr>")
 
-
+-- dashboard
 map('n', '<Leader>fh', ':DashboardFindHistory<CR>')
 map('n', '<Leader>ff', ':DashboardFindFile<CR>')
 map('n', '<Leader>fa', ':DashboardFindWord<CR>')
 map('n', '<Leader>fb', ':DashboardJumpMark<CR>')
 map('n', '<Leader>cn', ':DashboardNewFile<CR>')
+
+-- toggle rose pine theme
+map('n', 'cz', [[<cmd>lua require('rose-pine.functions').toggle_variant({'dawn', 'base'})<cr>]], { noremap = true, silent = true })
 -- }}} plug mappings --
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua
index 63cb370..2986c64 100644
--- a/.config/nvim/lua/plugin_settings.lua
+++ b/.config/nvim/lua/plugin_settings.lua
@@ -32,31 +32,40 @@ g.vimwiki_hl_headers = 1
 
 local function lualine_spell()
     if vim.wo.spell then
-        return [[spell]]
+        return "spell"
     else
         return
     end
 end
 
+local function lualine_spell_cond()
+    if vim.wo.spell then
+        return true
+    else
+        return false
+    end
+end
+
 require'lualine'.setup {
     options = {
-        lower = false,
         icons_enabled = true,
         theme = 'rose-pine',
-        section_separators = {'', ''},
-        component_separators = {'', ''},
-        disabled_filetypes = {}
+        section_separators = { left = '', right = '' },
+        component_separators = { left = '', right = '' },
     },
     sections = {
-        lualine_a = {{'mode', lower = true}},
-        lualine_b = {'branch', 'diff', {lualine_spell}},
+        lualine_a = {{'mode', fmt = string.lower}},
+        lualine_b = {'branch', 'diff', {
+            lualine_spell,
+            cond = lualine_spell_cond
+        }},
         lualine_c = {'filename'},
         lualine_x = {'encoding', 'fileformat', 'filetype'},
         lualine_y = {'progress'},
         lualine_z = {
             'location', {
                 'diagnostics',
-                sources = {'ale'},
+                sources = {'nvim_lsp'},
                 sections = {'error', 'warn', 'info', 'hint'},
                 symbols = {error = 'e', warn = 'w', info = 'i', hint = 'h'}
             }
@@ -70,7 +79,14 @@ require'lualine'.setup {
         lualine_y = {},
         lualine_z = {}
     },
-    tabline = {},
+    tabline = {
+        lualine_a = {'buffers'},
+        lualine_b = {},
+        lualine_c = {},
+        lualine_x = {},
+        lualine_y = {},
+        lualine_z = {'tabs'}
+    },
     extensions = {}
 }
 
@@ -102,7 +118,7 @@ g.UltiSnipsEditSplit = "vertical"
 -- ctrl + l expands the snippet, c + j/k navigates placeholders
 g.UltiSnipsExpandTrigger = "<C-l>"
 g.UltiSnipsEnableSnipMate = "1"
-g.UltiSnipsSnippetDirectories = {"my_snippets"}
+g.UltiSnipsSnippetDirectories = {"my_snippets", "UltiSnips"}
 -- }}} UltiSnips --
 
 -- beacon {{{ --
@@ -341,3 +357,13 @@ g.vista_icon_indent = {"╰ ", "│ "}
 g["float_preview#docked"] = 0
 -- }}} float-preview.nvim --
 
+-- indent-blankline {{{ --
+vim.opt.list = true
+
+require("indent_blankline").setup {
+    show_current_context = true,
+    char = "┊",
+    buftype_exclude = {"terminal"},
+    filetype_exclude = {"dashboard", "help", "ledger"}
+}
+-- }}} indent-blankline --
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 93a5aa2..c9b6a7c 100644
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -8,18 +8,17 @@
 return require('packer').startup(function()
     -- packer can manage itself
     use 'wbthomason/packer.nvim'
+
     -- latex suite
     use {'lervag/vimtex', ft = {'tex', 'latex', 'plaintext'}}
 
-    -- treesitter...
+    -- treesitter
     use {
         'nvim-treesitter/nvim-treesitter',
         run = ':TSUpdate'
     }
-
     -- quickstart lsp config
     use 'neovim/nvim-lspconfig'
-
     -- dashboard
     use 'glepnir/dashboard-nvim'
 
@@ -51,6 +50,8 @@ return require('packer').startup(function()
     use 'airblade/vim-gitgutter'
     -- completion preview of floating window
     use 'ncm2/float-preview.nvim'
+    -- indent guides
+    use "lukas-reineke/indent-blankline.nvim"
 
     -- language packs
     use "nathom/filetype.nvim"
@@ -126,7 +127,7 @@ return require('packer').startup(function()
 
     -- cursorline of the $CURRENT_YEAR
     use {
-        'hoob3rt/lualine.nvim',
+        'shadmansaleh/lualine.nvim',
         requires = {'kyazdani42/nvim-web-devicons', opt = true}
     }
     -- colour theme of the $CURRENT_YEAR
-- 
cgit v1.2.3-70-g09d2