From b3b74665442e3f19cff2ace41293e7e4c25ef657 Mon Sep 17 00:00:00 2001
From: NotAShelf
Type: Whether to enable lualine statusline plugin. Type: boolean Default: Example: Declared by: active config for: | (A) | B | C X | Y | Z | Type: string Default: active config for: | (A) | B | C X | Y | Z | Type: list of string Default: vim.statusline.lualine.enable
false
true
<neovim-flake/modules/statusline/lualine/lualine.nix>
-
vim.statusline.lualine.activeSection.a
''
- {
+
vim.statusline.lualine.activeSection.a
[
+ ''
{
"mode",
icons_enabled = true,
@@ -1646,29 +1646,31 @@ Thus, it will not be wrapped in `""`.
Type: Declared by: Declared by: active config for: | A | (B) | C X | Y | Z | Type: string Default: active config for: | A | (B) | C X | Y | Z | Type: list of string Default: Declared by: Declared by: active config for: | A | B | (C) X | Y | Z | Type: string Default: active config for: | A | B | (C) X | Y | Z | Type: list of string Default:
+ }
+ ''
+]
<neovim-flake/modules/statusline/lualine/lualine.nix>
-
vim.statusline.lualine.activeSection.b
''
- {
+
vim.statusline.lualine.activeSection.b
[
+ ''
{
"filetype",
colored = true,
icon_only = true,
icon = { align = 'left' },
color = {bg='none', fg='lavender'},
- },
+ }
+ ''
+ ''
{
"filename",
color = {bg='none'},
symbols = {modified = '', readonly = ''},
- },
- }
-''
+ }
+ ''
+]
<neovim-flake/modules/statusline/lualine/lualine.nix>
-
vim.statusline.lualine.activeSection.c
''
- {
+
vim.statusline.lualine.activeSection.c
[
+ ''
{
"diff",
colored = false,
@@ -1683,48 +1685,50 @@ Thus, it will not be wrapped in `""`.
Type: Declared by: Declared by: active config for: | A | B | C (X) | Y | Z | Type: string Default: active config for: | A | B | C (X) | Y | Z | Type: list of string Default:
+ }
+ ''
+]
<neovim-flake/modules/statusline/lualine/lualine.nix>
-
vim.statusline.lualine.activeSection.x
''
- {
+
vim.statusline.lualine.activeSection.x
[
+ ''
{
-- Lsp server name
function()
local buf_ft = vim.api.nvim_get_option_value('filetype', {})
-
+
-- List of buffer types to exclude
local excluded_buf_ft = {"toggleterm", "NvimTree", "TelescopePrompt"}
-
+
-- Check if the current buffer type is in the excluded list
for _, excluded_type in ipairs(excluded_buf_ft) do
if buf_ft == excluded_type then
return ""
end
end
-
+
-- Get the name of the LSP server active in the current buffer
local clients = vim.lsp.get_active_clients()
local msg = 'No Active Lsp'
-
+
-- if no lsp client is attached then return the msg
if next(clients) == nil then
return msg
end
-
+
for _, client in ipairs(clients) do
local filetypes = client.config.filetypes
if filetypes and vim.fn.index(filetypes, buf_ft) ~= -1 then
return client.name
end
end
-
+
return msg
end,
icon = ' ',
color = {bg='none', fg='lavender'},
- },
+ }
+ ''
+ ''
{
"diagnostics",
sources = {'nvim_lsp', 'nvim_diagnostic', 'coc'},
@@ -1735,37 +1739,43 @@ Thus, it will not be wrapped in `""`.
Type: Declared by: Declared by: active config for: | A | B | C X | (Y) | Z | Type: string Default: active config for: | A | B | C X | (Y) | Z | Type: list of string Default: Declared by: Declared by: active config for: | A | B | C X | Y | (Z) | Type: string Default: active config for: | A | B | C X | Y | (Z) | Type: list of string Default:
+ }
+ ''
+]
<neovim-flake/modules/statusline/lualine/lualine.nix>
-
vim.statusline.lualine.activeSection.y
''
- {
+
vim.statusline.lualine.activeSection.y
[
+ ''
{
'searchcount',
maxcount = 999,
timeout = 120,
color = {bg='none', fg='lavender'}
- },
+ }
+ ''
+ ''
{
"branch",
icon = ' •',
color = {bg='none', fg='lavender'},
- },
- }
-''
+ }
+ ''
+]
<neovim-flake/modules/statusline/lualine/lualine.nix>
-
vim.statusline.lualine.activeSection.z
''
- {
+
vim.statusline.lualine.activeSection.z
[
+ ''
{
"progress",
separator = {
left = '',
},
- },
+ }
+ ''
+ ''
{
"location",
- },
+ }
+ ''
+ ''
{
"fileformat",
color = {fg='black'},
@@ -1774,29 +1784,57 @@ Thus, it will not be wrapped in `""`.
Type: Declared by: