Coder Social home page Coder Social logo

freddiehaddad / feline.nvim Goto Github PK

View Code? Open in Web Editor NEW
255.0 7.0 7.0 634 KB

A minimal, stylish and customizable statusline, statuscolumn, and winbar for Neovim

License: GNU General Public License v3.0

Lua 100.00%
neovim neovim-lua neovim-plugin neovim-statusline neovim-statuscolumn neovim-winbar

feline.nvim's Introduction

feline.nvim

GitHub last commit (branch) GitHub (Pre-)Release Date GitHub issues GitHub Discussions GitHub Repo stars

A minimal, stylish and customizable statusline, statuscolumn, and winbar for Neovim

Active Window scrn-2023-11-02-05-54-47

Active Window with macro and search indicators scrn-2023-11-02-05-58-19

Inactive Window scrn-2023-11-02-05-55-10

Neovim, Feline and matching Tmux Theme scrn-2023-11-02-06-03-05

Configuration can be found in the following repo within feline.lua.

About

Feline is a Lua statusline, statuscolumn and winbar plugin that prioritizes speed, customizability and minimalism. It's fast and never gets in your way. Feline only provides you with the necessary tools that you need to configure these UI elements to your liking and avoids feature-bloat. It's also extremely customizable and allows you to configure it in any way you wish to. Feline also has reasonable defaults for those who don't want to configure things and just want a good out of the box experience.

The author of feline.nvim has stepped down from maintaining this project. This repository is the plugins new home as per reddit discussion.

Features

  • Ease-of-use.

  • Complete customizability over every component.

  • Built-in providers such as:

    and many more

  • Minimalistic, only provides the bare minimum and allows the user to build their own components very easily.

  • Winbar support.

  • Statuscolumn support.

Requirements

  • Necessary
    • Neovim v0.9+
    • 24-bit RGB color enabled in Neovim (do :help 'termguicolors' in Neovim for more info)
  • Optional

Installation

This plugin is available on LuaRocks:

:Rocks install feline.nvim

lazy.nvim

-- default
{
    'freddiehaddad/feline.nvim',
    opts = {}
}

-- with extras
{
    'freddiehaddad/feline.nvim',
    opts = {},
    config = function(_, opts)
        require('feline').setup()
        require('feline').winbar.setup()       -- to use winbar
        require('feline').statuscolumn.setup() -- to use statuscolumn

        require('feline').use_theme()          -- to use a custom theme
    end
}

packer.nvim

use 'freddiehaddad/feline.nvim'

vim-plug

Plug 'freddiehaddad/feline.nvim'

Getting started

Using the default configuration

Once you've installed Feline, it's extremely easy to get started with it. If you don't mind using the default settings, you can just call Feline's setup() function in your configuration. Like this:

require('feline').setup()

If you want to set up the 'winbar' alongside the statusline, just add this line next to the previous line:

require('feline').winbar.setup()

If you want to set up the 'statuscolumn' alongside the statusline, just add this line next to the previous line:

require('feline').statuscolumn.setup()

Configuring Feline to fit your needs

If the default configuration doesn't suit your needs, Feline provides plenty of customization options enabling you to configure everything exactly how you want. The only prerequisite is knowing the basics of Lua. Refer to the USAGE documentation or use :help feline.txt inside Neovim to read the USAGE docs. Additionally, you may find it helpful to look at the community configurations.

Help

Common issues

Feline crashes or disappears for seemingly no reason

This can be caused by conflicting plugins modifying the winbar, statuscolumn or statusbar along with Feline. The statusline is a core piece of functionality of Feline and can't easily be disabled. However, the optional components can be. If another plugin is modifying any of these components, then do not enable them in Feline.

Reporting issues or feature requests

If you have an issue that you can't find the fix to in the documentation or want to request a feature you think is absolutely necessary, feel free to open a new Issue and I will try my best to look into it. If you want to contribute to Feline, you can make a Pull Request. For more details, please see: CONTRIBUTING

Why Feline?

Now, you might be thinking, why do we need another statusline plugin? We've already got a bunch of brilliant statusline plugins like galaxyline, airline, lualine, expressline etc. and all of them are excellent. So then, why Feline?

I'd like to preface this by saying that what I'm about to say can be (and probably is) very biased and opinionated. Take what's being said here with a grain of salt. All of this is purely my opinion and not a fact by any means, so it's fine to disagree. Moreover, any statement I make here may be incorrect or outdated. In which case, please feel free to open an Issue or Pull Request correcting it.

I think that despite those plugins being neat, each have their own shortcomings. I find those shortcomings as too much to ignore. For example, most of the statusline plugins are not very customizable and the plugins only provide a limited amount of tools and options for customization. Feline, on the other hand, is built for customizability from the ground up. You are not limited in any way by what the plugin provides. You can control every individual component and its location, appearance, everything about it.

Feline is also fast and never gets in your way. It lazy-loads most of its modules, which allows it to start up instantly. Statusline updates with Feline are also blazing fast, which provides for a really smooth experience.

Feline is minimal and only implements the bare minimum required for you to get started. It both expects and invites you to make your own components and providers, because nobody understands you better than yourself. To help you do that, Feline provides all the tools and options you would need while also giving you a solid foundation to build from. One could say that the real goal of Feline is to make creating your own statusline as easy for you as possible, while also providing reasonable defaults that should be enough for most people.

Documentation is another aspect where I found most statusline plugins to be very lacking. Feline is extremely easy to configure and well-documented, which allows anyone to be able to build their statusline as they wish to. It provides example for every option to allow anyone to easily understand the purpose of any option

Lastly, anyone is welcome to contribute to Feline, either by making an Issue or through a Pull Request (see CONTRIBUTING for further information). Any kind of contribution starting from fixing a minor typo to adding a massive new feature is welcome.

And this plugin is named after cats, you won't get that anywhere else.

Screenshots

NOTE: Some of these configurations may be outdated and may need to be changed prior to use. A few of the configurations are missing a link because the link to them was removed due to the link no longer being valid.

Default setup: image

Default no-icons setup: image

Config by freddiehaddad: image

Config by crivotz: image

Config by 6cdh: image

Config by luizcoro2: image

Config by rafamadriz (classic):

Gruvbox: image Nord: image

Config by rafamadriz (slant):

Gruvbox: image Nord: image

Config by rafamadriz (VSCode): image

Config by pianocomposer321: image

Config by iBhagwan: image

Config by EdenEast (Colors generated from applied colorscheme)

Nightfox image

Dayfox image

Config by toufyx image

Config by Hitesh-Aggarwal image

Config by Dharmx image

To share your configuration, start a discussion following this example.

LICENSE

Feline is licensed under GNU GPLv3. For more info, see: LICENSE.md.

Naming

The name of this plugin is a silly pun based on the convention of the names of statusline plugins ending with 'line', while also being named after cats. And in a way this statusline is supposed to be as quick as a cat's instincts, so I guess the name fits.

feline.nvim's People

Contributors

3n3l avatar 6cdh avatar crivotz avatar dharmx avatar dundargoc avatar edeneast avatar famiu avatar fantomebeignet avatar freddiehaddad avatar fsouza avatar github-actions[bot] avatar ibhagwan avatar jamestrew avatar joshuali925 avatar kazisadmanahmed avatar l-kershaw avatar lucastavaresa avatar lukas-reineke avatar mnacamura avatar mrcjkb avatar popkat412 avatar quoteme avatar ram02z avatar rktjmp avatar seblj avatar simrat39 avatar systematicerror avatar theconfuzzleddude avatar tummetott avatar xeluxee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

feline.nvim's Issues

bug: component does not use custom highlight name

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.9.5

Operating system/version

macOS 14.2

Describe the bug

Setting a custom provider highlight name using a function does create a highlight name using it's other properties (e.g. fg / bg) instead of using the predefined name.

The example in USAGE.md doesn't work either. The Name of the hl should be something like StatusComponentVim... (according to https://github.com/freddiehaddad/feline.nvim/blob/main/lua/feline/providers/vi_mode.lua#L56) but rather creates StatusComponent_60A040_1F1F23_bold

TLDR: After some digging around i found function parse_hl https://github.com/freddiehaddad/feline.nvim/blob/main/lua/feline/generator.lua#L120, which just ignores the predefined hl.name. My naive approach was to just return the hl.name or generate a new name if none was passed and that seems to work

Steps To Reproduce

  1. Define component (see Repro for complete example):
local p_vi_mode = require("feline.providers.vi_mode")

local vi_mode_component = {
    provider = function()
        return string.format(" %s ", p_vi_mode.get_vim_mode())
    end,
    hl = function()
        return {
            name = "FelineStatusbarViMode" .. p_vi_mode.get_mode_highlight_name(),
            fg = "#ffffff",
            bg = "#ff0000"
        }
    end
}
  1. Restart Nvim to update config
  2. Check output of :filter /^FelineStatusbarViMode/ highlight which should be empty
  3. Check output of :filter /^StatusComponent_/ highlight which should output the auto-generated hl: StatusComponent_ffffff_ff0000_NONE xxx guifg=#ffffff guibg=#ff0000

Expected Behavior

I would expect that Feline does create a hl for me but uses the predefined name FelineStatusbarViMode instead of the fallback StatusComponent_...

Repro

require("lazy").setup(
    {
        {
            "freddiehaddad/feline.nvim",
            config = function()
                local f = require("feline")

                local p_vi_mode = require("feline.providers.vi_mode")

                local c = {
                    mode = {
                        provider = function()
                            return string.format(" %s ", p_vi_mode.get_vim_mode())
                        end,
                        hl = function()
                            return {
                                name = "FelineStatusbarViMode" .. p_vi_mode.get_mode_highlight_name(),
                                fg = "#ffffff",
                                bg = "#ff0000"
                            }
                        end
                    }
                }

                local components = {
                    active = {
                        {
                            c.mode
                        }
                    },
                    inactive = {}
                }

                f.setup({components = components})
            end
        }
    }
)

feature: winbar improvements

Did you check the docs?

  • I have read all the Feline docs

Is your feature request related to a problem? Please describe.

I have some code in my config that I feel could be integrated into feline for others to easily use

Describe the solution you'd like

Winbar theme

Currently, the theme in the setup is for both statusline and winbar, but I really like having a separate background color for winbar. I am proposing adding a theme to the winbar setup, and then falling back to the global theme if not specified

Local winbar

I like to disable winbar on some buffers like a terminal buffer, startify buffer, etc... I feel like having an option to only list the buffer filetypes, and having feline disabling it for those buffers would be awesome!

I just wanted to open an issue first to hear if you would be open to these changes. I would be happy to implement these changes myself in that case🙌

Describe alternatives you've considered

Having it as it is in my config

Additional context

No response

bug: LuaRocks GHA failing on dependency.

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

na

Operating system/version

na

Describe the bug

@mrcjkb github action is failing with:

Error: Failed installing dependency: https://luarocks.org/gitsigns.nvim-scm-1.rockspec - Build error: Failed installing lua/gitsigns/diff_ffi.lua in /home/runner/work/_temp/tmp.n5kdcAxHNW/lib/luarocks/rocks-5.1/gitsigns.nvim/scm-1/lua/gitsigns/diff_ffi.lua: lua/gitsigns/diff_ffi.lua: No such file or directory

https://github.com/freddiehaddad/feline.nvim/actions/runs/8754394451/job/24026039795#step:4:485

Looking into the problem, but maybe you can shed some light. I do see gitsigns registered with LuaRocks, so I don't think the issue is there.

Steps To Reproduce

Run the GHA workflow.

Expected Behavior

Successful push to LuaRocks repository.

Repro

na

Edit icon of vi_mode without changing anything else from feline

Is it possible? I want to specify parameters for single components, for example changing the icon of the vi_mode component.

This is my config:

return {
	"freddiehaddad/feline.nvim",
	config = function(_, _opts)
		require("feline").setup()

		local lighthaus_theme = {
			fg = "#DCD7BA",
			bg = "#1F1F28",
			black = "#16161D",
			skyblue = "#16161D",
			cyan = "#6A9589",
			green = "#76946A",
			-- oceanblue = "#658594",
			oceanblue = "#1F1F28",
			magenta = "#D27E99",
			orange = "#FFA066",
			red = "#E82424",
			violet = "#957FB8",
			white = "#DCD7BA",
			yellow = "#FF9E3B",
		}

		require("feline").use_theme(lighthaus_theme)

		-- require("feline").winbar.setup()
	end,
}

`:Rocks sync` fails on feline.nvim if ssh key has passphrase

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.10.0-dev-2937+g8e5c48b08-dirt

Operating system/version

Gentoo

Describe the bug

:Rocks sync tries to git clone feline, feline rockspec has ssh+git url, so git tries to read ssh key but it has a passphrase and luarocks or rocks.nvim can't handle that, failing install.

This was first reported to rocks.nvim, got moved to nvim-neorocks and closed there with suggestion to create an issue to feline repo with suggested fix of "change the source URL to HTTPS". Here I am ._.

Steps To Reproduce

:Rocks install feline.nvim, also have a passphrase on your ssh key.

Expected Behavior

Installs feline.nvim

Repro

require("lazy").setup({
  {
    "freddiehaddad/feline.nvim",
    config = function()
      -- your configuration
    end,
  }
})

Hi @freddiehaddad! The commit 1dcf6bf0b7fcaf2a2cddec377266eb2e6a41492e broke my custom git component that looks like this:

          Hi @freddiehaddad! The commit 1dcf6bf0b7fcaf2a2cddec377266eb2e6a41492e broke my custom git component that looks like this:
{
  provider = 'git_branch',
  icon = {
    str = '', -- Custom git icon
    hl = { fg = '#f34f29' },
  },
}

The default icon is now used instead of the custom one, and the custom highlight is no longer applied.

Is this expected behaviour?

Originally posted by @mawkler in #49 (comment)

bug: sign removed

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10.0-dev-1617+g143a17833-Homebrew

Operating system/version

MacOS 13.3.1

Describe the bug

this sign has been removed from nerd-fonts
Screenshot 2023-05-05 at 10 37 49 PM

Steps To Reproduce

  1. use
{ provider = "git_diff_changed" }

in your config

Expected Behavior

expected the symbol to be there but instead it looks like this
Screenshot 2023-05-05 at 10 41 26 PM

Repro

require("lazy").setup({
  {
    "freddiehaddad/feline.nvim",
    config = function()
      require("feline").setup({ components = { provider = "git_diff_changed" } })
    end,
  }
})

bug: Icon is overwritten when the highlight of the icon is changed

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.2

Operating system/version

MacOs 13.4.1

Describe the bug

Most default providers return an icon. It is possible to overwrite the icon by adding

icon = {
    str = 'new_icon', 
    hl = {
        fg = '#ff0000',
        bg = '#00ff00',
    }
}

to the component. However, it is not possible to ONLY change the highlight and keep the default icon of the provider

Steps To Reproduce

  1. nvim -u repro.lua
    --> icon is not shown

  2. Delete the following part

icon = {
    hl = {
        fg = '#ff0000',
        bg = '#00ff00',
    }
}

--> icon is shown

Expected Behavior

I would like the ability to customize the icon highlighting of providers without losing the associated icon string.

Repro

local comp = {
    provider = {
        name = 'file_type',
        opts = {
            filetype_icon = true
        }
    },
    -- As soon as you add this, the icon is not shown anymore
    icon = {
        hl = {
            fg = '#ff0000',
            bg = '#00ff00',
        }
    }
}

require('lazy').setup({
    {
        'freddiehaddad/feline.nvim',
        config = function()
            require('feline').setup {
                components = {
                    active = { { comp } }
                }
            }
        end,
    }
})

bug: Deprecation of `vim.lsp.get_active_clients()` in NVIM 0.11.0-dev

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.11.0-dev-164+g3a1515bfee

Operating system/version

Arch Linux

Describe the bug

Deprecation of vim.lsp.get_active_clients(). The fix is just one line, swapping the get_active_clients function for get_clients and leaving the parameters unchanged, it seems.

Steps To Reproduce

  1. Open neovim
  2. Observe warning (as elaborated on below)
vim.lsp.get_active_clients() is deprecated. Run ":checkhealth vim.deprecated" for more information

Which leads to the following:


 ~
- WARNING vim.lsp.get_active_clients() is deprecated. Feature will be removed in Nvim 0.12
  - ADVICE:
    - use vim.lsp.get_clients() instead.
    - stack traceback:
        /home/<user_name>/.local/share/nvim/lazy/catppuccin/lua/catppuccin/groups/integrations/feline.lua:415
        /home/<user_name>/.local/share/nvim/lazy/feline.nvim/lua/feline/generator.lua:301
        /home/<user_name>/.local/share/nvim/lazy/feline.nvim/lua/feline/generator.lua:447
        [C]:-1
        /home/<user_name>/.local/share/nvim/lazy/feline.nvim/lua/feline/generator.lua:498
        /home/<user_name>/.local/share/nvim/lazy/feline.nvim/lua/feline/generator.lua:615
    - stack traceback:
        /home/<user_name>/.local/share/nvim/lazy/catppuccin/lua/catppuccin/groups/integrations/feline.lua:415
        /home/<user_name>/.local/share/nvim/lazy/feline.nvim/lua/feline/generator.lua:301
        /home/<user_name>/.local/share/nvim/lazy/feline.nvim/lua/feline/generator.lua:447
        [C]:-1
        /home/<user_name>/.local/share/nvim/lazy/feline.nvim/lua/feline/generator.lua:498
        /home/<user_name>/.local/share/nvim/lazy/feline.nvim/lua/feline/generator.lua:615
        [C]:-1
        /usr/share/nvim/runtime/lua/vim/health.lua:353
        nvim>:1

Expected Behavior

  1. Open neovim
  2. No warning

Repro

No response

feature: statuscolumn support?

Did you check the docs?

  • I have read all the Feline docs

Is your feature request related to a problem? Please describe.

Would like to be able to configure statuscolumn with feline.nvim, just like heirline.nvim can.

Describe the solution you'd like

Same sort of API as statusline and winbar, but for statuscolumn

Describe alternatives you've considered

doing it manually, or spending dozens of hours switching to heirline, which I'm hesitant to do because it doesn't help with highlights as much as feline does

Additional context

I started some work on it in my fork here but can't get it to work, but I think I'm probably just missing some feline.nvim context. I don't think it should be too much work to support it. https://github.com/mrjones2014/feline.nvim

bug: error "(UNKNOWN PLUGIN): Error executing lua: attempt to call a number value" is shown in screen

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.4 Build type: Release LuaJIT 2.1.1696795921

Operating system/version

MacOs 13.4.1

Describe the bug

I've encountered a peculiar bug that's a bit challenging to articulate. Essentially, an error message appears at the top of the screen. While this error doesn't impede the functionality of Neovim, its presence can be somewhat bothersome. Reproducing the error is possible in various scenarios, but it consistently involves the usage of feline.

Initially, I suspected catppuccin was the root cause and opened an issue there: link to the issue. However, upon further investigation, I discovered that the error also manifests with a minimal config containing feline, treesitter.

The error itself is truncated so basically no information is shown:
image

Steps To Reproduce

  1. nvim --clean -u repro.lua
  2. :qa<cr>
  3. nvim --clean -u repro.lua newfile.lua
  4. Type a non existing cmd, e.g.: :lkdjflkdjf<cr>

-- > Error is shown

Expected Behavior

No error

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- termguicolors must be enabled for feline
vim.opt.termguicolors = true

-- This is needed for reproduction of the error
vim.opt.foldmethod = 'expr'

-- install plugins
local plugins = {
    {
        'freddiehaddad/feline.nvim',
        config = function()
            require('feline').setup()
        end,
    },
    {
        'nvim-treesitter/nvim-treesitter',
        config = function()
            require('nvim-treesitter.configs').setup {
                highlight = { enable = true },
                ensure_installed = { 'lua' },
            }
        end,
    }
}
require 'lazy'.setup(plugins, {
    root = root .. '/plugins',
})

bug: git branch component not working

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.9.5

Operating system/version

6.7.4-zen1-1-zen

Describe the bug

Everything else works fine but the Git Branch provider doesn't.

I have the other sections setup in my config but this is everything where git_branch is used.

I definitely have lewis6991/gitsigns.nvim added as a dependency.

Steps To Reproduce

  1. use config above
  2. reload and see no git_branch

Expected Behavior

visible git_branch

Repro

{
'freddiehaddad/feline.nvim',
config = function()
local c = {
  git_branch = {
    provider = "git_branch",
  }
}
local left = {
  c.git_branch,
}

local components = {
  active = {
    left
  }
  inactive = {
    right
  }

require('feline').setup({
  components = components,
})
end
}

bug: it doesn't work

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

latest

Operating system/version

latest

Describe the bug

I added the lua import using LazyVim and the setup() inside init.lua and it doesn't work.

Steps To Reproduce

  1. add this plugin inside plugins/
  2. call setup() in init.lua

Note: I'm using lazyvim.

Expected Behavior

Well.... I expect it to work with the default configs?

Repro

require("lazy").setup({
  {
    "freddiehaddad/feline.nvim",
    config = function()
      -- your configuration
    end,
  }
})

bug: Wrong symbol being shown for git branch (only sometimes... :O)

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.8.3

Operating system/version

Arch

Describe the bug

I sometimes get a weird symbol for the git branch. It stays for the whole session unchanged.

I have changed my config multiple times now. Whenever I change it, the symbol is fine until the next restart(?) of the PC? I never had any problems with other missing symbols before?

Funny enough this works fine with my dotfiles (managed with YADM, which is probably supplied by gitsigns. On all the other cloned Git repos it doesn't work...

Here is a picture:

screenshot

Steps To Reproduce

...?

Expected Behavior

Show actual branch symbol

Repro

require("lazy").setup({
    {
        'freddiehaddad/feline.nvim',
        lazy = false,
        dependencies = { 'nvim-lua/plenary.nvim', 'kyazdani42/nvim-web-devicons', 'rebelot/kanagawa.nvim', 'lewis6991/gitsigns.nvim' },
        config = function ()
            local colors = function ()
                local theme = require('kanagawa.colors').setup({ theme = 'wave' }).theme
                return {
                    bg = theme.ui.bg,
                    bg_dim = theme.ui.bg_dim,
                    fg = theme.ui.fg,
                    fg_dim = theme.ui.fg_dim,
                    fg_reverse = theme.ui.fg_reverse,
                    special = theme.ui.special,
                    diag_warn = theme.diag.warning,
                    diag_error = theme.diag.error,
                    diag_hint = theme.diag.hint,
                    diag_info = theme.diag.info,
                    git_del = theme.vcs.removed,
                    git_add = theme.vcs.added,
                    git_change = theme.vcs.changed,
                }
            end

            local c = {
                fileinfo = {
                    provider = {
                        name = "file_info",
                        opts = {
                            type = "relative-short",
                        },
                    },
                    hl = {
                        style = "bold",
                    },
                    right_sep = "block",
                },
                gitBranch = {
                    provider = 'git_branch',
                    left_sep = "block",
                    right_sep = "block",
                    hl = {
                        fg = "special",
                    },
                },
                gitDiffAdded = {
                    provider = "git_diff_added",
                    hl = {
                        fg = "git_add",
                    },
                    left_sep = "block",
                    right_sep = "block",
                },
                gitDiffRemoved = {
                    provider = "git_diff_removed",
                    hl = {
                        fg = "git_del",
                    },
                    left_sep = "block",
                    right_sep = "block",
                },
                gitDiffChanged = {
                    provider = "git_diff_changed",
                    hl = {
                        fg = "git_change",
                    },
                    left_sep = "block",
                    right_sep = "right_filled",
                },
                separator = {
                    provider = "",
                },
                diagnostic_errors = {
                    provider = "diagnostic_errors",
                    hl = {
                        fg = "diag_error"
                    },
                },
                diagnostic_warnings = {
                    provider = "diagnostic_warnings",
                    hl = {
                        fg = "diag_warn",
                    },
                },
                diagnostic_hints = {
                    provider = "diagnostic_hints",
                    hl = {
                        fg = "diag_hint",
                    },
                },
                diagnostic_info = {
                    provider = "diagnostic_info",
                    hl = {
                        fg = "diag_info",
                    },
                },
                lsp_client_names = {
                    provider = "lsp_client_names",
                    hl = {
                        style = "bold",
                        fg = "special"
                    },
                    left_sep = "left_filled",
                    right_sep = "block",
                },
                file_type = {
                    provider = {
                        name = "file_type",
                        opts = {
                            filetype_icon = false,
                            case = "uppercase",
                        },
                    },
                    hl = {
                        style = "bold",
                        fg = "fg",
                    },
                    left_sep = "block",
                    right_sep = "block",
                },
                position = {
                    provider = "position",
                    hl = {
                        fg = "fg",
                        style = "bold",
                    },
                    left_sep = "block",
                    right_sep = "block",
                },
                line_percentage = {
                    provider = "line_percentage",
                    hl = {
                        style = "bold",
                    },
                    left_sep = "block",
                    right_sep = "block",
                },
                scroll_bar = {
                    provider = {
                        name = "scroll_bar",
                        opts = {
                            reverse = true
                        }
                    },
                    hl = {
                        bg = "fg",
                        fg = 'bg',
                        style = "bold",
                    },
                },
            }

            local left = {
                c.fileinfo,
                c.gitBranch,
                c.gitDiffAdded,
                c.gitDiffRemoved,
                c.gitDiffChanged,
                c.separator,
            }

            local right = {
                c.lsp_client_names,
                c.diagnostic_errors,
                c.diagnostic_warnings,
                c.diagnostic_info,
                c.diagnostic_hints,
                c.file_type,
                c.position,
                c.line_percentage,
                c.scroll_bar,
            }

            local components = {
                active = {
                    left,
                    right,
                },
                inactive = {
                    left,
                    right,
                },
            }

            require('feline').setup({
                components = components,
                theme = colors()
            })
        end
    }
})

Hi @freddiehaddad! The commit 1dcf6bf0b7fcaf2a2cddec377266eb2e6a41492e broke my custom git component that looks like this:

          Hi @freddiehaddad! The commit 1dcf6bf0b7fcaf2a2cddec377266eb2e6a41492e broke my custom git component that looks like this:
{
  provider = 'git_branch',
  icon = {
    str = '', -- Custom git icon
    hl = { fg = '#f34f29' },
  },
}

The default icon is now used instead of the custom one, and the custom highlight is no longer applied.

Is this expected behaviour?

Originally posted by @mawkler in #49 (comment)

bug: Lazy.nvim installs the `master` branch, not the `main` branch

Did you check docs and existing issues?

  • I have read all the Feline docs
  • I have searched the existing issues of Feline
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

v0.9.0

Operating system/version

Arch

Describe the bug

When I use lazy.nvim to install your plugin with the config

    {
        'freddiehaddad/feline.nvim',
        lazy = false,
    }

It actually installs the wrong version:
"feline.nvim": { "branch": "master", "commit": "c6eea890c4f81725f4c51eba48d9733a248513a2" },
( from lazy-lock.json )

This might be a lazy problem, but maybe you have some git setting pointing to master as the default branch?

Workaround

Add branch = 'main' and now it works.

Steps To Reproduce

See description

Expected Behavior

Install latest version

Repro

require("lazy").setup({
  {
    "freddiehaddad/feline.nvim",
    config = function()
      -- your configuration
    end,
  }
})

> Hi @freddiehaddad! The commit [1dcf6bf](https://github.com/freddiehaddad/feline.nvim/commit/1dcf6bf0b7fcaf2a2cddec377266eb2e6a41492e) broke my custom git component that looks like this:

          > Hi @freddiehaddad! The commit [1dcf6bf](https://github.com/freddiehaddad/feline.nvim/commit/1dcf6bf0b7fcaf2a2cddec377266eb2e6a41492e) broke my custom git component that looks like this:
{
  provider = 'git_branch',
  icon = {
    str = '', -- Custom git icon
    hl = { fg = '#f34f29' },
  },
}

The default icon is now used instead of the custom one, and the custom highlight is no longer applied.

Is this expected behaviour?

Hm.. That's strange. I tested your case explicitly w/o issue. Mind sharing your config so I can test it? At first glance, I don't see why it's failing.

EDIT:

The default component.icon table is merged with yours and should keep your settings instead of the default. I might need to look at the remaining providers as there could be a case I missed.

To answer your question, it should have been a non-breaking change. I will address it.

Originally posted by @freddiehaddad in #49 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.