From 13c412198704c05cfd18abde49d09476438f0550 Mon Sep 17 00:00:00 2001 From: ChrisHilborne Date: Wed, 20 Dec 2023 18:04:16 +0100 Subject: [PATCH] better scope highlighting --- init.lua | 2 +- lua/custom/plugins/markdown-preview.lua | 11 +++++ lua/custom/plugins/themes.lua | 62 ++++++++++++++++++++++--- 3 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 lua/custom/plugins/markdown-preview.lua diff --git a/init.lua b/init.lua index 3def633b..3a44c336 100755 --- a/init.lua +++ b/init.lua @@ -438,7 +438,7 @@ end -- define the property 'filetypes' to the map in question. local servers = { clangd = {}, - gopls = {}, + gopls = { filetypes = { 'go' } }, pyright = {}, rust_analyzer = {}, tsserver = {}, diff --git a/lua/custom/plugins/markdown-preview.lua b/lua/custom/plugins/markdown-preview.lua new file mode 100644 index 00000000..153accf4 --- /dev/null +++ b/lua/custom/plugins/markdown-preview.lua @@ -0,0 +1,11 @@ +return { + { + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + build = "cd app && yarn install", + init = function() + vim.g.mkdp_filetypes = { "markdown" } + end, + ft = { "markdown" }, + }, +} diff --git a/lua/custom/plugins/themes.lua b/lua/custom/plugins/themes.lua index 53f19082..a9356b5e 100755 --- a/lua/custom/plugins/themes.lua +++ b/lua/custom/plugins/themes.lua @@ -27,14 +27,62 @@ return { -- }, -- }, { - -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', - -- Enable `lukas-reineke/indent-blankline.nvim` - -- See `:help indent_blankline.txt` - tag = 'v2.20.8', + "lukas-reineke/indent-blankline.nvim", opts = { - char = '┊', - show_trailing_blankline_indent = false, + indent = { + char = "│", + tab_char = "│", + }, + scope = { enabled = false }, + exclude = { + filetypes = { + "help", + "alpha", + "dashboard", + "neo-tree", + "Trouble", + "trouble", + "lazy", + "mason", + "notify", + "toggleterm", + "lazyterm", + }, + }, }, + main = "ibl", + }, + + -- Active indent guide and indent text objects. When you're browsing + -- code, this highlights the current level of indentation, and animates + -- the highlighting. + { + "echasnovski/mini.indentscope", + version = false, -- wait till new 0.7.0 release to put it back on semver + opts = { + -- symbol = "▏", + symbol = "│", + options = { try_as_border = true }, + }, + init = function() + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "help", + "alpha", + "dashboard", + "neo-tree", + "Trouble", + "trouble", + "lazy", + "mason", + "notify", + "toggleterm", + "lazyterm", + }, + callback = function() + vim.b.miniindentscope_disable = true + end, + }) + end, }, }