From 46dfd4b9c3c9a6626fc44af0e672a3f24eb1f57d Mon Sep 17 00:00:00 2001 From: Dave Gallant Date: Sun, 18 Jul 2021 10:56:31 -0400 Subject: [PATCH] Add twilight-nvim --- home/default.nix | 1 + home/nvim/init2.lua | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/home/default.nix b/home/default.nix index c83b140..0852ea2 100644 --- a/home/default.nix +++ b/home/default.nix @@ -308,6 +308,7 @@ in syntastic tabular telescope-nvim + twilight-nvim typescript-vim vim-commentary vim-fugitive diff --git a/home/nvim/init2.lua b/home/nvim/init2.lua index f2d7ca2..1508685 100644 --- a/home/nvim/init2.lua +++ b/home/nvim/init2.lua @@ -34,6 +34,24 @@ require('nvim-treesitter.configs').setup({ }, }) + +-- twilight +require("twilight").setup { + dimming = { + alpha = 0.50, -- amount of dimming + -- we try to get the foreground from the highlight groups or fallback color + color = { "Normal", "#cccccc" }, + }, + context = 10, -- amount of lines we will try to show around the current line + expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types + "function", + "method", + "table", + "if_statement", + }, + exclude = {}, -- exclude these filetypes +} + vim.api.nvim_exec([[ set foldmethod=expr set foldlevel=20