Configure lualine
Setup lualine modules, remove some old plugins
This commit is contained in:
parent
6afbb00ca6
commit
ed663b9674
|
@ -1,6 +0,0 @@
|
|||
return {
|
||||
auto_hide = false,
|
||||
hide = { extensions = true },
|
||||
modified = { button = "●" },
|
||||
pinned = { button = "車", filename = true, separator = { right = "" } },
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
return { theme = "catppuccin" }
|
|
@ -1,6 +1,7 @@
|
|||
-- Opt
|
||||
vim.opt.laststatus = 3
|
||||
vim.opt.showtabline = 2
|
||||
vim.opt.cmdheight = 0
|
||||
vim.opt.showtabline = 1
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.number = true
|
||||
|
|
|
@ -1,62 +1,49 @@
|
|||
-- Bubbles config for lualine
|
||||
-- Author: lokesh-krishna
|
||||
-- MIT license, see LICENSE for more details.
|
||||
local lsp_progress = function()
|
||||
local Lsp = vim.lsp.util.get_progress_messages()[1]
|
||||
|
||||
-- stylua: ignore
|
||||
local colors = {
|
||||
blue = '#80a0ff',
|
||||
cyan = '#79dac8',
|
||||
black = '#080808',
|
||||
white = '#c6c6c6',
|
||||
red = '#ff5189',
|
||||
violet = '#d183e8',
|
||||
grey = '#303030',
|
||||
}
|
||||
if Lsp then
|
||||
local msg = Lsp.message or ""
|
||||
local percentage = Lsp.percentage
|
||||
if not percentage then return "" end
|
||||
local title = Lsp.title or ""
|
||||
local spinners = { "", "", "" }
|
||||
local success_icon = { "", "", "" }
|
||||
local ms = vim.loop.hrtime() / 1000000
|
||||
local frame = math.floor(ms / 120) % #spinners
|
||||
|
||||
local bubbles_theme = {
|
||||
normal = {
|
||||
a = { fg = colors.black, bg = colors.violet },
|
||||
b = { fg = colors.white, bg = colors.grey },
|
||||
c = { fg = colors.black, bg = colors.black },
|
||||
},
|
||||
if percentage >= 70 then
|
||||
return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage)
|
||||
end
|
||||
|
||||
insert = { a = { fg = colors.black, bg = colors.blue } },
|
||||
visual = { a = { fg = colors.black, bg = colors.cyan } },
|
||||
replace = { a = { fg = colors.black, bg = colors.red } },
|
||||
return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage)
|
||||
end
|
||||
|
||||
inactive = {
|
||||
a = { fg = colors.white, bg = colors.black },
|
||||
b = { fg = colors.white, bg = colors.black },
|
||||
c = { fg = colors.black, bg = colors.black },
|
||||
},
|
||||
}
|
||||
return ""
|
||||
end
|
||||
|
||||
require("lualine").setup {
|
||||
return {
|
||||
options = {
|
||||
theme = bubbles_theme,
|
||||
theme = "catppuccin",
|
||||
component_separators = "|",
|
||||
section_separators = { left = "", right = "" },
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
{ "mode", separator = { left = "" }, right_padding = 2 },
|
||||
},
|
||||
lualine_b = { "filename", "branch" },
|
||||
lualine_c = { "fileformat" },
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "filetype", "branch", "diff" },
|
||||
lualine_c = { lsp_progress, "diagnostics" },
|
||||
lualine_x = {},
|
||||
lualine_y = { "filetype", "progress" },
|
||||
lualine_z = {
|
||||
{ "location", separator = { right = "" }, left_padding = 2 },
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = { "filename" },
|
||||
lualine_b = {},
|
||||
lualine_c = {},
|
||||
lualine_x = {},
|
||||
lualine_y = {},
|
||||
lualine_y = { "searchcount", "progress", "selectioncount" },
|
||||
lualine_z = { "location" },
|
||||
},
|
||||
tabline = {},
|
||||
extensions = {},
|
||||
tabline = {
|
||||
lualine_a = {},
|
||||
lualine_b = { { "filetype", icon_only = true }, "fileformat", "encoding" },
|
||||
lualine_c = { "require('nvim-navic').get_location()" },
|
||||
lualine_x = { { "windows", use_mode_colors = true } },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
winbar = {},
|
||||
extensions = { "aerial", "fzf", "lazy", "neo-tree", "toggleterm", "trouble" },
|
||||
}
|
||||
|
|
|
@ -1 +1,32 @@
|
|||
return { highlight = true }
|
||||
return {
|
||||
safe_output = true,
|
||||
click = true,
|
||||
icons = {
|
||||
File = " ",
|
||||
Module = " ",
|
||||
Namespace = " ",
|
||||
Package = " ",
|
||||
Class = " ",
|
||||
Method = " ",
|
||||
Property = " ",
|
||||
Field = " ",
|
||||
Constructor = " ",
|
||||
Enum = " ",
|
||||
Interface = " ",
|
||||
Function = " ",
|
||||
Variable = " ",
|
||||
Constant = " ",
|
||||
String = " ",
|
||||
Number = " ",
|
||||
Boolean = " ",
|
||||
Array = " ",
|
||||
Object = " ",
|
||||
Key = " ",
|
||||
Null = " ",
|
||||
EnumMember = " ",
|
||||
Struct = " ",
|
||||
Event = " ",
|
||||
Operator = " ",
|
||||
TypeParameter = " ",
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(_, bufnr)
|
||||
local on_attach = function(client, bufnr)
|
||||
-- Mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||
|
@ -19,5 +19,6 @@ local on_attach = function(_, bufnr)
|
|||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set("n", "<leader>i", require "lsp.formatting", bufopts)
|
||||
if client.server_capabilities.documentSymbolProvider then require("nvim-navic").attach(client, bufnr) end
|
||||
end
|
||||
return on_attach
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
return {
|
||||
"romgrk/barbar.nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
init = function() vim.g.barbar_auto_setup = false end,
|
||||
config = true,
|
||||
opts = require "config.barbar",
|
||||
version = "^1.0.0", -- optional: only update when a new 1.x version is released
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
return {
|
||||
"utilyre/barbecue.nvim",
|
||||
name = "barbecue",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"SmiteshP/nvim-navic",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
-- opts = require "config.barbecue",
|
||||
config = function() require("barbecue").setup(require "config.barbecue") end,
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
return {
|
||||
"feline-nvim/feline.nvim",
|
||||
dependencies = { require "plugins.catppuccin" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
-- config = function() require("feline").setup(require "config.feline") end,
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
return {
|
||||
"tpope/vim-fugitive",
|
||||
cmd = { "G", "Git" },
|
||||
lazy = true,
|
||||
}
|
|
@ -13,6 +13,10 @@ return {
|
|||
{ "hrsh7th/nvim-cmp" },
|
||||
{ "rafamadriz/friendly-snippets" },
|
||||
{ "windwp/nvim-autopairs" },
|
||||
{ "jose-elias-alvarez/null-ls.nvim", lazy = true },
|
||||
{ "mfussenegger/nvim-dap", lazy = true },
|
||||
{ "folke/neodev.nvim", dependencies = { "hrsh7th/nvim-cmp" }, lazy = true },
|
||||
{ "SmiteshP/nvim-navic", lazy = true, config = true, opts = require "config.nvim-navic" },
|
||||
},
|
||||
config = function()
|
||||
require "lsp.config"
|
||||
|
@ -35,7 +39,4 @@ return {
|
|||
},
|
||||
cmd = "CmpStatus",
|
||||
},
|
||||
{ "jose-elias-alvarez/null-ls.nvim", dependencies = { "neovim/nvim-lspconfig" }, lazy = true },
|
||||
{ "mfussenegger/nvim-dap", dependencies = { "neovim/nvim-lspconfig" }, lazy = true },
|
||||
{ "folke/neodev.nvim", dependencies = { "neovim/nvim-lspconfig", "hrsh7th/nvim-cmp" }, lazy = true },
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = require "config.lualine",
|
||||
event = { "BufEnter" },
|
||||
config = function() require("lualine").setup(require "config.lualine") end,
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@ return {
|
|||
"SmiteshP/nvim-navic",
|
||||
dependencies = "neovim/nvim-lspconfig",
|
||||
lazy = true,
|
||||
config = true,
|
||||
opts = require "config.nvim-navic",
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
return {
|
||||
"ahmedkhalf/project.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
event = { "BufEnter" },
|
||||
config = function() require("project_nvim").setup(require "config.project") end,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue