From 21a458474bf51777204e426538c4da4a4f46e840 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 2 May 2022 13:13:13 +0200 Subject: vim: use indent-blankline --- common/vim.nix | 1 + dotfiles/vim.lua | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/common/vim.nix b/common/vim.nix index d571cae..ba756e9 100644 --- a/common/vim.nix +++ b/common/vim.nix @@ -72,6 +72,7 @@ let gitsigns-nvim diffview-nvim nvim-notify + indent-blankline-nvim # Completion nvim-cmp diff --git a/dotfiles/vim.lua b/dotfiles/vim.lua index 5c46e43..7269c14 100644 --- a/dotfiles/vim.lua +++ b/dotfiles/vim.lua @@ -40,7 +40,7 @@ vim.o.background = "dark" vim.o.showmode = false -- Do not set "trail:-" because it messes up the highlighting -vim.o.listchars = "tab:│ ,extends:>,precedes:<,nbsp:+" +vim.opt.listchars = { extends = ">", precedes = "<", nbsp = "+" } vim.wo.list = true vim.o.fillchars = "fold:─,vert:│" @@ -80,10 +80,10 @@ vim.fn["camelcasemotion#CreateMotionMappings"] "" vim.keymap.set("n", "yof", function() if vim.opt_local.formatoptions:get().a then vim.opt_local.formatoptions:remove "a" - print(":setlocal formatoptions-=a") + print ":setlocal formatoptions-=a" else vim.opt_local.formatoptions:append "a" - print(":setlocal formatoptions+=a") + print ":setlocal formatoptions+=a" end end, mapopts) @@ -382,6 +382,17 @@ vim.notify = require "notify" require("Comment").setup {} +-- Indent Blankline + +vim.api.nvim_set_hl(0, "IndentBlanklineContextChar", { + fg = vim.g.current_gruvbox_colors.aqua[1], +}) + +require("indent_blankline").setup { + show_current_context = true, + show_current_context_start = true, +} + -- Local config function isModuleAvailable(name) -- cgit v1.2.3