added lualine

This commit is contained in:
2024-01-08 15:21:49 +01:00
parent 3961a8710e
commit a7053d63f0
4 changed files with 91 additions and 29 deletions

40
after/plugin/lualine.lua Normal file
View File

@@ -0,0 +1,40 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = '' },
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff', 'diagnostics' },
lualine_c = { 'filename' },
lualine_x = { 'encoding', 'fileformat', 'filetype' },
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = { 'filename' },
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}

View File

@@ -2,6 +2,12 @@ local builtin = require('telescope.builtin')
vim.keymap.set("n", "<leader>pf", builtin.find_files, {})
vim.keymap.set("n", "<C-p>", builtin.git_files, {})
vim.keymap.set("n", "<leader>ps", function()
builtin.grep_string({ search = vim.fn.input("Grep > ") });
local status, result = pcall(function() vim.fn.input("Grep > ") end)
-- prevent keyboard interrupt error
if not status then
return
end
builtin.grep_string({ search = result });
end)
vim.api.nvim_set_hl(0, "TelescopeSelection", { link = "Visual" })

View File

@@ -32,6 +32,11 @@ return require('packer').startup(function(use)
use('mbbill/undotree')
use('tpope/vim-fugitive')
use {
'nvim-lualine/lualine.nvim',
requires = { 'nvim-tree/nvim-web-devicons', opt = true }
}
use {
'VonHeikemen/lsp-zero.nvim',
branch = 'v3.x',

View File

@@ -99,6 +99,11 @@ _G.packer_plugins = {
path = "/home/j409/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
url = "https://github.com/VonHeikemen/lsp-zero.nvim"
},
["lualine.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/lualine.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
@@ -129,6 +134,12 @@ _G.packer_plugins = {
path = "/home/j409/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-web-devicons"] = {
loaded = false,
needs_bufread = false,
path = "/home/j409/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/packer.nvim",