Browse Source

Lualine

master
Julio Biason 3 years ago
parent
commit
42370e7924
  1. 3
      .gitmodules
  2. 63
      nvim/init.lua
  3. 1
      nvim/pack/plugins/start/lualine.nvim

3
.gitmodules vendored

@ -7,3 +7,6 @@
[submodule "nvim/pack/plugins/start/nvim-treesitter"] [submodule "nvim/pack/plugins/start/nvim-treesitter"]
path = nvim/pack/plugins/start/nvim-treesitter path = nvim/pack/plugins/start/nvim-treesitter
url = https://github.com/nvim-treesitter/nvim-treesitter.git url = https://github.com/nvim-treesitter/nvim-treesitter.git
[submodule "nvim/pack/plugins/start/lualine.nvim"]
path = nvim/pack/plugins/start/lualine.nvim
url = https://github.com/nvim-lualine/lualine.nvim.git

63
nvim/init.lua

@ -1,9 +1,3 @@
local nvim_lsp = require('lspconfig')
local saga = require('lspsaga')
-- commands that don't exist in lua yet
vim.cmd [[
]]
-- general configuration -- general configuration
vim.opt.background = 'dark' -- the theme background is dark vim.opt.background = 'dark' -- the theme background is dark
@ -19,6 +13,11 @@ vim.opt.splitright = true -- vertical splits open on the right
vim.opt.splitbelow = true -- horizontal splits open on the bottom vim.opt.splitbelow = true -- horizontal splits open on the bottom
vim.g.mapleader = ' ' -- space is the leader character vim.g.mapleader = ' ' -- space is the leader character
-- commands that don't exist in lua yet
vim.cmd [[
color molokai
]]
-- Keybind: use '-' to open the file explorer -- Keybind: use '-' to open the file explorer
vim.api.nvim_set_keymap('n', '-', ':Ex<CR>', { noremap=true, silent=true }) vim.api.nvim_set_keymap('n', '-', ':Ex<CR>', { noremap=true, silent=true })
@ -26,15 +25,17 @@ vim.api.nvim_set_keymap('n', '-', ':Ex<CR>', { noremap=true, silent=true })
vim.g['rainbow_active'] = true vim.g['rainbow_active'] = true
-- lsp saga improves the display of LSP information -- lsp saga improves the display of LSP information
local saga = require('lspsaga')
saga.init_lsp_saga { saga.init_lsp_saga {
error_sign = '', error_sign = '>',
warn_sign = '', warn_sign = '#',
hint_sign = '', hint_sign = '!',
infor_sign = '', infor_sign = '?',
border_style = "round", border_style = "round",
} }
-- lsp configuration -- lsp configuration
local nvim_lsp = require('lspconfig')
local on_attach = function(client, bufnr) local on_attach = function(client, bufnr)
local function buf_set_keymap(...) local function buf_set_keymap(...)
vim.api.nvim_buf_set_keymap(bufnr, ...) vim.api.nvim_buf_set_keymap(bufnr, ...)
@ -56,11 +57,11 @@ end
-- attach the keymaps -- attach the keymaps
-- lsp servers/languages configuration -- lsp servers/languages configuration
require 'lspconfig'.rust_analyzer.setup { nvim_lsp.rust_analyzer.setup {
on_attach = on_attach on_attach = on_attach
} }
require 'lspconfig'.pyright.setup { nvim_lsp.pyright.setup {
on_attach = on_attach on_attach = on_attach
} }
@ -72,3 +73,41 @@ require 'nvim-treesitter.configs'.setup {
enable = true, enable = true,
}, },
} }
-- lualine (better statusline)
require 'lualine'.setup {
options = {
icons_enabled = true,
-- theme = 'ayu_dark',
theme = 'ayu_mirage',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {},
always_divide_middle = true,
},
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 = {
lualine_a = {},
lualine_b = {'filename'},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = {'tabs'}
},
extensions = {}
}

1
nvim/pack/plugins/start/lualine.nvim

@ -0,0 +1 @@
Subproject commit 70691ae350fdbe1f15758e3b8e2973742a7967a9
Loading…
Cancel
Save