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", "<leader>pf", builtin.find_files, {})
vim.keymap.set("n", "<C-p>", builtin.git_files, {}) vim.keymap.set("n", "<C-p>", builtin.git_files, {})
vim.keymap.set("n", "<leader>ps", function() 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) end)
vim.api.nvim_set_hl(0, "TelescopeSelection", { link = "Visual" }) vim.api.nvim_set_hl(0, "TelescopeSelection", { link = "Visual" })

View File

@@ -1,50 +1,55 @@
vim.cmd.packadd('packer.nvim') vim.cmd.packadd('packer.nvim')
return require('packer').startup(function(use) return require('packer').startup(function(use)
use 'wbthomason/packer.nvim' use 'wbthomason/packer.nvim'
use 'nvim-lua/plenary.nvim' use 'nvim-lua/plenary.nvim'
use { use {
'christoomey/vim-tmux-navigator', 'christoomey/vim-tmux-navigator',
lazy = false lazy = false
} }
use { use {
'nvim-telescope/telescope.nvim', 'nvim-telescope/telescope.nvim',
requires = { {'nvim-lua/plenary.nvim'} } requires = { { 'nvim-lua/plenary.nvim' } }
} }
use { use {
"catppuccin/nvim", "catppuccin/nvim",
as = "catppuccin" as = "catppuccin"
} }
use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' }) use('nvim-treesitter/nvim-treesitter', { run = ':TSUpdate' })
use('nvim-treesitter/nvim-tree-docs') use('nvim-treesitter/nvim-tree-docs')
use{ use {
'ThePrimeagen/harpoon', 'ThePrimeagen/harpoon',
branch = 'harpoon2', branch = 'harpoon2',
requires = { { 'nvim-lua/plenary.nvim' } } requires = { { 'nvim-lua/plenary.nvim' } }
} }
use('mbbill/undotree') use('mbbill/undotree')
use('tpope/vim-fugitive') use('tpope/vim-fugitive')
use { use {
'VonHeikemen/lsp-zero.nvim', 'nvim-lualine/lualine.nvim',
branch = 'v3.x', requires = { 'nvim-tree/nvim-web-devicons', opt = true }
requires = { }
{'williamboman/mason.nvim'},
{'williamboman/mason-lspconfig.nvim'},
-- LSP Support use {
{'neovim/nvim-lspconfig'}, 'VonHeikemen/lsp-zero.nvim',
-- Autocompletion branch = 'v3.x',
{'hrsh7th/nvim-cmp'}, requires = {
{'hrsh7th/cmp-nvim-lsp'}, { 'williamboman/mason.nvim' },
{'L3MON4D3/LuaSnip'}, { 'williamboman/mason-lspconfig.nvim' },
}
} -- LSP Support
{ 'neovim/nvim-lspconfig' },
-- Autocompletion
{ 'hrsh7th/nvim-cmp' },
{ 'hrsh7th/cmp-nvim-lsp' },
{ 'L3MON4D3/LuaSnip' },
}
}
end) end)

View File

@@ -99,6 +99,11 @@ _G.packer_plugins = {
path = "/home/j409/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim", path = "/home/j409/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
url = "https://github.com/VonHeikemen/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"] = { ["mason-lspconfig.nvim"] = {
loaded = true, loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", 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", path = "/home/j409/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/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"] = { ["packer.nvim"] = {
loaded = true, loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/packer.nvim", path = "/home/j409/.local/share/nvim/site/pack/packer/start/packer.nvim",