]> git.localhorst.tv Git - nvim-config.git/commitdiff
docs: fix `lualine` component example (#95)
authorIordanis Petkakis <12776461+dpetka2001@users.noreply.github.com>
Tue, 22 Oct 2024 09:11:31 +0000 (12:11 +0300)
committerGitHub <noreply@github.com>
Tue, 22 Oct 2024 09:11:31 +0000 (11:11 +0200)
As per https://github.com/LazyVim/LazyVim/issues/4544 it creates
confusion to the users who are just trying out the example to try things
out. Better to avoid such misinterpretations in the future.

I'm assuming this will also update the docs automatically as I can
deduce from
https://github.com/LazyVim/lazyvim.github.io/blob/25af26046a30be110f0aa19c87ad2a1a1e53ce45/lua/build.lua#L369-L372?

lua/plugins/example.lua

index 4ad9825df4105cc4c22fac67cab6e1c70f8adeeb..17f53d6f6f2429f0b13a07cdc8f4a63bcdc947a4 100644 (file)
@@ -157,7 +157,11 @@ return {
     "nvim-lualine/lualine.nvim",
     event = "VeryLazy",
     opts = function(_, opts)
-      table.insert(opts.sections.lualine_x, "😄")
+      table.insert(opts.sections.lualine_x, {
+        function()
+          return "😄"
+        end,
+      })
     end,
   },