X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/01e2742d22a59aa01b79a6caacbb20f620886239..3b5e99b9e0c217919225b705e6fb2b7095341b4d:/nvim/lua/plugins/ui.lua diff --git a/nvim/lua/plugins/ui.lua b/nvim/lua/plugins/ui.lua index afe5855..56dcba9 100644 --- a/nvim/lua/plugins/ui.lua +++ b/nvim/lua/plugins/ui.lua @@ -90,6 +90,7 @@ return { -- NOTE: this caused some issue with unterminated mappings, i.e. gc when there -- is also gcc. It would simply terminate early and not allow for next mapping. version = '*', + lazy = true, -- NOTE: load this explicitely when needed, it blocks querying for key definitons via :Verbose map opts = { triggers = { { mode = 'n', keys = '' }, @@ -136,7 +137,7 @@ return { diagnostics = "nvim_lsp", always_show_bufferline = false, diagnostics_indicator = function(_, _, diag) - local icons = LazyVim.config.icons.diagnostics + local icons = rmz.ui.icons.diagnostics local ret = (diag.error and icons.Error .. diag.error .. " " or "") .. (diag.warning and icons.Warn .. diag.warning or "") return vim.trim(ret) @@ -151,7 +152,7 @@ return { }, ---@param opts bufferline.IconFetcherOpts get_element_icon = function(opts) - return LazyVim.config.icons.ft[opts.filetype] + return rmz.ui.icons.ft[opts.filetype] end, }, }, @@ -181,7 +182,7 @@ return { local lualine_require = require("lualine_require") lualine_require.require = require - local icons = LazyVim.config.icons + local icons = rmz.ui.icons vim.o.laststatus = vim.g.lualine_laststatus @@ -317,7 +318,7 @@ return { { "echasnovski/mini.indentscope", enabled = false, -- replaced by snacks.indent version = false, -- wait till new 0.7.0 release to put it back on semver - event = "LazyFile", + event = { "BufReadPost", "BufNewFile", "BufWritePre" }, opts = function (_, opts) return { draw = { @@ -330,7 +331,7 @@ return { lazy = true, init = function() vim.g.navic_silence = true - LazyVim.lsp.on_attach(function(client, buffer) + rmz.lsp.on_attach(function(client, buffer) if client.supports_method("textDocument/documentSymbol") then require("nvim-navic").attach(client, buffer) end @@ -341,7 +342,7 @@ return { separator = " ", highlight = true, depth_limit = 5, - icons = LazyVim.config.icons.kinds, + icons = rmz.ui.icons.kinds, lazy_update_context = true, } end,