Closed idelice closed 1 year ago
I will make the README clearer, but if you just want the default options, the following will work for lazy.nvim.
{
"freddiehaddad/feline.nvim",
opts = {},
}
What you shared above is just the boilerplate. That's not going to work without explicitly calling require("feline").setup()
.
This is my plugins/feline.lua
return {
"freddiehaddad/feline.nvim",
opts = {},
}
And inside lazy.lua
I have this line of code:
require("feline").setup()
Still doesn't show any statusline.
I'm making some assumptions here, but you're return { ... }
looks like part of a plugin spec which means it's missing another pair of curly braces return { { ... } }
. That's only true if my assumption is correct. Next, if you switched to the example I posted, there's no need for the explicit setup
call. If after those fixes, it's still not showing the statusbar, check if you have it disabled in neovim :help laststatus
for starters. The issue is not the plugin.
The return statement is correct. All 9 of my plugins are installed the same way using LazyVim and they work perfectly fine.
I tried removing the setup call but that did not make a change.
I just made a test init.lua with nothing but feline using the example I shared and its working:
local lazypath = vim.fn.stdpath("data") .. "/lazy/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",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
vim.opt.termguicolors = true
require("lazy").setup({
{
"freddiehaddad/feline.nvim",
opts = {},
},
})
Statusbar shows up. What version of neovim are you using?
0.9.1
Not sure what to say then, its working fine. Can you post your config?
lazy.lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
-- bootstrap lazy.nvim
-- stylua: ignore
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
{ import = "lazyvim.plugins.extras.lang.java" },
{ import = "lazyvim.plugins.extras.lang.tailwind" },
{ import = "lazyvim.plugins.extras.lang.json" },
{ import = "lazyvim.plugins.extras.lang.yaml" },
-- { import = "lazyvim.plugins.extras.editor.leap" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = { enabled = true }, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
local telescope = require("telescope")
local lga_actions = require("telescope-live-grep-args.actions")
telescope.setup({
extensions = {
live_grep_args = {
auto_quoting = true,
mappings = {
i = {
["<C-k>"] = lga_actions.quote_prompt(),
["<C-i>"] = lga_actions.quote_prompt({ postfix = " --iglob " }),
},
},
},
undo = {
-- telescope-undo.nvim config, see below
},
},
})
-- optional: vim.keymap.set("n", "<leader>u", "<cmd>Telescope undo<cr>")
-- TODO: fix this
require("telescope").load_extension("changed_files")
require("telescope").load_extension("undo")
require("telescope").load_extension("live_grep_args")
require("telescope").load_extension("harpoon")
require("telescope").load_extension("env")
require("telescope").load_extension("media_files")
-- require("telescope").load_extension("ports")
require("neoscroll").setup()
-- Rainbow delimiters setup
-- This module contains a number of default definitions
local rainbow_delimiters = require("rainbow-delimiters")
vim.g.rainbow_delimiters = {
strategy = {
[""] = rainbow_delimiters.strategy["global"],
vim = rainbow_delimiters.strategy["local"],
},
query = {
[""] = "rainbow-delimiters",
lua = "rainbow-blocks",
},
highlight = {
"RainbowDelimiterRed",
"RainbowDelimiterYellow",
"RainbowDelimiterBlue",
"RainbowDelimiterOrange",
"RainbowDelimiterGreen",
"RainbowDelimiterViolet",
"RainbowDelimiterCyan",
},
}
local configs = require("lspconfig.configs")
local lspconfig = require("lspconfig")
local util = require("lspconfig.util")
if not configs.helm_ls then
configs.helm_ls = {
default_config = {
cmd = { "helm_ls", "serve" },
filetypes = { "helm" },
root_dir = function(fname)
return util.root_pattern("Chart.yaml")(fname)
end,
},
}
end
lspconfig.helm_ls.setup({
filetypes = { "helm" },
cmd = { "helm_ls", "serve" },
})
plugins/feline.lua
return {
"freddiehaddad/feline.nvim",
opts = {},
}
Are you using lazyvim?
Yes, I mentioned that
Lazyvim comes with lualine. You'll need to disable that if you're planning to use feline.
You'll need to add:
{
"nvim-lualine/lualine.nvim",
enabled = false,
},
Also, you'll probably need to set vim.opt.laststatus
I've already disabled it as it was causes performance issues in java files.
I even copied your feline.lua file and pasted into my own with no change.
I'm really not sure then. I'm using LazyVim as well with Neovim 0.9.2 and am not having any issues. The only thing different between us is in my feline.lua
file, I have:
return {
{
-- my plugin config
}
}
You only have a single set of curly braces.
You have:
return {
"freddiehaddad/feline.nvim",
opts = {},
}
A second set IS needed.
I told you that I've already tried that by copied YOUR feline.lua file and pasting it into my own so it's exactly the same but it still doesn't work. I don't know what more to say or do lol
In your feline.lua
file, change it to this:
return {
{
"freddiehaddad/feline.nvim",
config = function() vim.notify("feline.nvim config invoked") end,
}
}
Restart Neovim. Lemme know if you see that message popup.
Also, make sure the plugin is installed. :Lazy
and see if its even installing it.
Did you check docs and existing issues?
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
Note: I'm using lazyvim.
Expected Behavior
Well.... I expect it to work with the default configs?
Repro