go back to lualine
This commit is contained in:
parent
09b0a8ff4b
commit
83827e5179
1 changed files with 29 additions and 46 deletions
73
init.lua
73
init.lua
|
|
@ -14,6 +14,8 @@ vim.diagnostic.config({
|
||||||
-- add plugins
|
-- add plugins
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
"https://github.com/nvim-treesitter/nvim-treesitter",
|
"https://github.com/nvim-treesitter/nvim-treesitter",
|
||||||
|
"https://github.com/nvim-lualine/lualine.nvim",
|
||||||
|
"https://github.com/RRethy/base16-nvim",
|
||||||
"https://github.com/tinted-theming/tinted-nvim.git",
|
"https://github.com/tinted-theming/tinted-nvim.git",
|
||||||
"https://github.com/neovim/nvim-lspconfig",
|
"https://github.com/neovim/nvim-lspconfig",
|
||||||
"https://github.com/vyfor/cord.nvim",
|
"https://github.com/vyfor/cord.nvim",
|
||||||
|
|
@ -22,23 +24,12 @@ vim.pack.add({
|
||||||
-- function to set colorsceme
|
-- function to set colorsceme
|
||||||
require('tinted-nvim').setup({
|
require('tinted-nvim').setup({
|
||||||
ui = {
|
ui = {
|
||||||
transparent = true
|
transparent = false
|
||||||
},
|
},
|
||||||
highlights = {
|
highlights = {
|
||||||
overrides = function(palette)
|
integrations = {
|
||||||
return {
|
lualine = true
|
||||||
MiniStatuslineModeNormal = { fg = palette.base00, bg = palette.base0D, bold = true },
|
|
||||||
MiniStatuslineModeInsert = { fg = palette.base00, bg = palette.base0B, bold = true },
|
|
||||||
MiniStatuslineModeVisual = { fg = palette.base00, bg = palette.base0E, bold = true },
|
|
||||||
MiniStatuslineModeReplace = { fg = palette.base00, bg = palette.base08, bold = true },
|
|
||||||
MiniStatuslineModeCommand = { fg = palette.base00, bg = palette.base0A, bold = true },
|
|
||||||
MiniStatuslineModeOther = { fg = palette.base00, bg = palette.base0C, bold = true },
|
|
||||||
MiniStatuslineDevinfo = { fg = palette.base05, bg = palette.base02 },
|
|
||||||
MiniStatuslineFilename = { fg = palette.base04, bg = palette.base01 },
|
|
||||||
MiniStatuslineFileinfo = { fg = palette.base05, bg = palette.base02 },
|
|
||||||
MiniStatuslineInactive = { fg = palette.base03, bg = palette.base01 },
|
|
||||||
}
|
}
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
vim.cmd("colorscheme " .. vim.fn.system("cat /home/lucy/.local/share/tinted-theming/tinty/current_scheme"))
|
vim.cmd("colorscheme " .. vim.fn.system("cat /home/lucy/.local/share/tinted-theming/tinty/current_scheme"))
|
||||||
|
|
@ -47,39 +38,31 @@ require('mini.basics').setup()
|
||||||
require('mini.icons').setup()
|
require('mini.icons').setup()
|
||||||
require('mini.pick').setup()
|
require('mini.pick').setup()
|
||||||
require('mini.git').setup()
|
require('mini.git').setup()
|
||||||
require('mini.statusline').setup({
|
require("lualine").setup({
|
||||||
content = {
|
options = {
|
||||||
active = function()
|
section_separators = { left = "", right = "" },
|
||||||
local function lsp_names()
|
component_separators = { left = "|", right = "|" },
|
||||||
local clients = vim.lsp.get_clients({ bufnr = 0 })
|
globalstatus = true,
|
||||||
if #clients == 0 then
|
always_divide_middle = true,
|
||||||
return ""
|
},
|
||||||
end
|
sections = {
|
||||||
|
lualine_a = { "mode" },
|
||||||
local names = {}
|
lualine_b = { "diagnostics" },
|
||||||
for _, client in ipairs(clients) do
|
lualine_c = { "filename", "filesize", },
|
||||||
table.insert(names, client.name)
|
lualine_x = { "lsp_status", "filetype" },
|
||||||
end
|
lualine_y = { "" },
|
||||||
return " " .. table.concat(names, ", ")
|
lualine_z = { "location" },
|
||||||
end
|
},
|
||||||
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
tabline = {
|
||||||
local git = MiniStatusline.section_git({ trunc_width = 40 })
|
lualine_a = { { 'buffers', mode = 2, show_modified_status = true, } },
|
||||||
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
|
lualine_b = { 'branch' },
|
||||||
local filename = MiniStatusline.section_filename({ trunc_width = 140 })
|
lualine_c = {},
|
||||||
local location = MiniStatusline.section_location({ trunc_width = 10000 })
|
lualine_x = {},
|
||||||
|
lualine_y = {},
|
||||||
return MiniStatusline.combine_groups({
|
lualine_z = { 'tabs' }
|
||||||
{ hl = mode_hl, strings = { mode } },
|
|
||||||
{ hl = 'MiniStatuslineDevinfo', strings = { git, diagnostics, filename } },
|
|
||||||
'%<', -- Mark general truncate point
|
|
||||||
'%=', -- End left alignment
|
|
||||||
{ hl = 'MiniStatusLineDevIndo', strings = { lsp_names() } },
|
|
||||||
{ hl = mode_hl, strings = { location } },
|
|
||||||
})
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- setup superior lsp
|
-- setup superior lsp
|
||||||
vim.lsp.config("qml-language-server", {
|
vim.lsp.config("qml-language-server", {
|
||||||
cmd = { "qml-language-server" },
|
cmd = { "qml-language-server" },
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue